By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,644 Members | 2,105 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,644 IT Pros & Developers. It's quick & easy.

VB6 load filename into textbox

swatmajor1
P: 40
Hi

I'm making a Flash player which works with the help of a text box.

What i want it to do is this;

User opens flash file (.swf),

the filename loads into textbox,

the program plays file.

Expand|Select|Wrap|Line Numbers
  1. Text1.Text = CurDir + "\" + ???? 
This the code I'm using, if anyone can help, it would be appreciated.

Swatmajor1
Nov 24 '06 #1
Share this Question
Share on Google+
6 Replies


Expert 5K+
P: 8,434
Hi
I'm making a Flash player which works with the help of a text box.
What i want it to do is this;
User opens flash file (.swf),
the filename loads into textbox,
the program plays file.
Expand|Select|Wrap|Line Numbers
  1. Text1.Text = CurDir + "\" + ???? 
This the code I'm using, if anyone can help, it would be appreciated.
It's fairly simple, really. In place of the "????" would go the name of the string (or variant) variable in which you have the file name.
Nov 24 '06 #2

swatmajor1
P: 40
It's fairly simple, really. In place of the "????" would go the name of the string (or variant) variable in which you have the file name.
Please elaborate

Swatmajor1
Nov 24 '06 #3

Expert 5K+
P: 8,434
Please elaborate
I think you need to go into a bit more detail about what code you have now, and what you need. The requirements are a bit vague so far.
Nov 24 '06 #4

swatmajor1
P: 40
This is how my program basically works.

When the desired drive, folder and file is selected in the form "frmFiles" the path with the filename is loaded into the textbox in "frmFlash". This then is loaded into the Shockwave Flash object with the code found in "frmFiles" under the cmdOK sub.

Expand|Select|Wrap|Line Numbers
  1. frmFlash.flshPlayer.Movie = frmFlash.fText1.text
What I want the program to do is open and load the path + filename into the textbox just from double clicking the desired "SWF" file while in windows explorer.

flash player VB6

here is a zip containing the VB files, I hope they help

sorry for not being more direct, new to this kind of thing

Swatmajor1
Nov 24 '06 #5

Expert 5K+
P: 8,434
... What I want the program to do is open and load the path + filename into the textbox just from double clicking the desired "SWF" file while in windows explorer.
Ahah! Now the light begins to dawn.

I don't recall the details of how to do it, but I believe what you need to do is referred to as "registering" a file type, or "associating" your program with the file type.

Now that we've clarified what you need to do, there are probably others here who can describe how to do it.

If this is just for your own use, you could try doing an "open with" on the file from Explorer, and selecting your application.
Nov 25 '06 #6

swatmajor1
P: 40
well it works. I associated the file with the program, still no success, and after 4hrs+ of searching, I got it to work. I cheated using the following code;

Expand|Select|Wrap|Line Numbers
  1. Dim file As String
  2.     file = Command
  3.     file = Replace(file, """", "")
  4.     Text1.Text = file
This then allows the flash object to read the file from its source.

Thanks for all the help killer42, it has been appreciated.

Signing off, Swatmajor1

PS check out the program at http://www.swatmajor1.co.nr
Nov 25 '06 #7

Post your reply

Sign in to post your reply or Sign up for a free account.