473,385 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
6 4866
Killer42
8,435 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
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
Killer42
8,435 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
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
Killer42
8,435 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
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

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

Similar topics

2
by: Koala Beer | last post by:
Hi, Here is something i can't figure out what i am doing wrong: I use a OpenFileDialog to select a file. I put the result string from the FileName property in a textbox on my form. Later on I...
3
by: Chris | last post by:
Hi, In Delphi there is the possibilty to load a textfile into a textfield (memo) without writing too much code. It goes like memo1.Lines.LoadFromFile('myfile.txt'); What is the C# equivalent...
9
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter...
5
by: Ariel Dolan | last post by:
Can I use HtmlInputFile to only get the selected file name but not actually upload the file? Clicking the control's Browse button let's the user select a file. All I need is the HtmlInputFile...
4
by: Frank | last post by:
I am loading data through a OleDbDatareader. The load is started from a form by the user, but the actual load is done in a separate class, which is accessed from my form. Now, I want the user to...
2
by: jzheng22 | last post by:
Hi all, I am new to VB .NET. I am currently wring a simple GUI, a TextBox (multilined), a button and an OpenFileDialog. When user click the button, the OpenFileDialog fired and after user...
6
by: Ron M. Newman | last post by:
Hi, the load method of the AppDomain doesn't take a string filename. If you have a new AppDomain object you created and a string with the full pathname of an assembly, how do you load it there? I...
6
by: Dave Kelly | last post by:
Sorry for the long post, it is easier to discard information than to have to wait for it to arrive. So here goes: This code worked perfectly when I was an Earthlink customer. Sprint decided...
2
by: pankajsingh5k | last post by:
Dear All, Please help me... I had read an article to lazy load a tab in a tabcontainer using an update panel on http://mattberseth.com/blog/2007/07/how_to_lazyload_tabpanels_with.html ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.