| View previous topic :: View next topic |
| Author |
Message |
poppyu Expert Cheater
Reputation: 0
Joined: 29 Aug 2007 Posts: 147
|
Posted: Wed Mar 12, 2008 12:53 pm Post subject: VB6 Browse Button |
|
|
| how do i make a browse button which only funds SWFs and puts the address in a text box |
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Wed Mar 12, 2008 12:56 pm Post subject: |
|
|
Use Microsoft Common Dialog Control, pretty easy to use:
ComDlg.ShowOpen
Text1.Text = ComDlg.FileName
I think that's it
Add error handling for all the errors that could happen _________________
|
|
| Back to top |
|
 |
poppyu Expert Cheater
Reputation: 0
Joined: 29 Aug 2007 Posts: 147
|
Posted: Wed Mar 12, 2008 1:00 pm Post subject: |
|
|
| thanks but how do i only find SWFs and Folders in my browse thing |
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Wed Mar 12, 2008 1:01 pm Post subject: |
|
|
ComDlg.Filter = ".SWF"
There's more to filtering, but I think this way works too _________________
|
|
| Back to top |
|
 |
poppyu Expert Cheater
Reputation: 0
Joined: 29 Aug 2007 Posts: 147
|
Posted: Wed Mar 12, 2008 1:16 pm Post subject: |
|
|
| Blader wrote: | | ComDlg.Filter = ".SWF" |
still picks up other stuff |
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Wed Mar 12, 2008 1:23 pm Post subject: |
|
|
Ok got the full one:
ComDlg.Filter = "Shockwave Flash Object|*.swf" _________________
|
|
| Back to top |
|
 |
poppyu Expert Cheater
Reputation: 0
Joined: 29 Aug 2007 Posts: 147
|
Posted: Wed Mar 12, 2008 1:39 pm Post subject: |
|
|
| still no dice |
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Wed Mar 12, 2008 1:40 pm Post subject: |
|
|
That should work, let me take a look in my previous projects
EDIT: Oh I see, use this:
ComDlg.Filter = "ShockWave Flash Object (*.swf) | *.swf" _________________
|
|
| Back to top |
|
 |
poppyu Expert Cheater
Reputation: 0
Joined: 29 Aug 2007 Posts: 147
|
Posted: Wed Mar 12, 2008 1:54 pm Post subject: |
|
|
nope
wtf??
am i doin it rite
form1.commondialog1 = "ShockWave Flash Object (*.swf) | *.swf" |
|
| Back to top |
|
 |
GuM Expert Cheater
Reputation: 0
Joined: 17 Jan 2007 Posts: 185 Location: The Netherlands
|
Posted: Wed Mar 12, 2008 2:02 pm Post subject: |
|
|
| micksemps wrote: | nope
wtf??
am i doin it rite
form1.commondialog1 = "ShockWave Flash Object (*.swf) | *.swf" |
No, you have to add .Filter
Form1.CommonDialog1.Filter = "ShockWave Flash Object|*.swf"
Not sure though, I don't code in VB. |
|
| Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Wed Mar 12, 2008 2:03 pm Post subject: |
|
|
Lol you weren't using the filter property the whole time? O.O _________________
|
|
| Back to top |
|
 |
poppyu Expert Cheater
Reputation: 0
Joined: 29 Aug 2007 Posts: 147
|
Posted: Wed Mar 12, 2008 2:12 pm Post subject: |
|
|
im a idiot lol
blader ty
it works now |
|
| Back to top |
|
 |
|