467,874 Members | 1,748 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,874 developers. It's quick & easy.

VB6 load filename into textbox

swatmajor1
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
  • viewed: 4541
Share:
6 Replies
Expert 8TB
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
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 8TB
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
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 8TB
... 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
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.

Similar topics

3 posts views Thread by Chris | last post: by
9 posts views Thread by John Kirksey | last post: by
5 posts views Thread by Ariel Dolan | last post: by
4 posts views Thread by Frank | last post: by
6 posts views Thread by Ron M. Newman | last post: by
6 posts views Thread by Dave Kelly | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.