Results 1 to 7 of 7

Thread: A quick App.Path ?

  1. #1

    Thread Starter
    Fanatic Member Navarone's Avatar
    Join Date
    Jun 2003
    Location
    Akron, Ohio USA
    Posts
    740

    A quick App.Path ?

    How would I convert this to VB.NET.
    VB Code:
    1. AxShockwaveFlash1.Movie(App.Path & "\XML_FLV_player.swf")


    I don't think this is correct
    VB Code:
    1. AxShockwaveFlash1.Movie(Application.StartupPath & "\XML_FLV_player.swf")
    He who never made a mistake never made a discovery?

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    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

  3. #3

    Thread Starter
    Fanatic Member Navarone's Avatar
    Join Date
    Jun 2003
    Location
    Akron, Ohio USA
    Posts
    740

    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?

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: A quick App.Path ?

    I think you are trying to use a property as a method..

    try
    VB Code:
    1. AxShockwaveFlash1.Movie = Application.StartupPath & "\XML_FLV_player.swf"

  5. #5

    Thread Starter
    Fanatic Member Navarone's Avatar
    Join Date
    Jun 2003
    Location
    Akron, Ohio USA
    Posts
    740

    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:
    1. Dim textWriter As XmlTextWriter = New XmlTextWriter(Application.StartupPath & "flv.xml", Nothing)
    He who never made a mistake never made a discovery?

  6. #6
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: A quick App.Path ?

    Quote 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:
    1. 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:
    1. Application.StartupPath & "\flv.xml"

  7. #7

    Thread Starter
    Fanatic Member Navarone's Avatar
    Join Date
    Jun 2003
    Location
    Akron, Ohio USA
    Posts
    740

    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
  •  



Click Here to Expand Forum to Full Width