|
-
Jun 1st, 2006, 02:35 PM
#1
Thread Starter
Fanatic Member
A quick App.Path ?
How would I convert this to VB.NET.
VB Code:
AxShockwaveFlash1.Movie(App.Path & "\XML_FLV_player.swf")
I don't think this is correct
VB Code:
AxShockwaveFlash1.Movie(Application.StartupPath & "\XML_FLV_player.swf")
He who never made a mistake never made a discovery?
-
Jun 1st, 2006, 02:38 PM
#2
Re: A quick App.Path ?
that should be correct. is it not working for you?
make sure that the XML_FLV_player.swf is in the BIN folder
-
Jun 1st, 2006, 02:45 PM
#3
Thread Starter
Fanatic Member
Re: A quick App.Path ?
Well I am not sure I get this error when I run the application
C:\Documents and Settings\Don\My Documents\Visual Studio Projects\FLV Player\Form1.vb(132): Property access must assign to the property or use its value.
He who never made a mistake never made a discovery?
-
Jun 1st, 2006, 02:48 PM
#4
Re: A quick App.Path ?
I think you are trying to use a property as a method..
try
VB Code:
AxShockwaveFlash1.Movie = Application.StartupPath & "\XML_FLV_player.swf"
-
Jun 1st, 2006, 02:57 PM
#5
Thread Starter
Fanatic Member
Re: A quick App.Path ?
Hey thanks that worked great. One more question regarding the app.path,
When I write my xml file I want to write to the application path. I guess in this case write to the bin. Is this correct?
VB Code:
Dim textWriter As XmlTextWriter = New XmlTextWriter(Application.StartupPath & "flv.xml", Nothing)
He who never made a mistake never made a discovery?
-
Jun 1st, 2006, 03:13 PM
#6
Re: A quick App.Path ?
 Originally Posted by Navarone
Hey thanks that worked great. One more question regarding the app.path,
When I write my xml file I want to write to the application path. I guess in this case write to the bin. Is this correct?
VB Code:
Dim textWriter As XmlTextWriter = New XmlTextWriter(Application.StartupPath & "flv.xml", Nothing)
yes, while developing in the IDE, the BIN folder will be your application.startuppath, because that is where the IDE compiles the exe to before it runs it..
just remember that application.startuppath does NOT include the ending \ so you need to include that when specifying a file
VB Code:
Application.StartupPath & "\flv.xml"
-
Jun 1st, 2006, 03:23 PM
#7
Thread Starter
Fanatic Member
Re: A quick App.Path ?
hey thanks, thats done it!
He who never made a mistake never made a discovery?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|