Results 1 to 12 of 12

Thread: This must be a simple error

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2005
    Posts
    277

    This must be a simple error

    Hi all,
    I am trying to get an swf file to open when a command button is clicked.

    I though this would be the code needed

    VB Code:
    1. Private Sub Command6_Click()
    2. Shell "C:\myfolder\test.swf", vbNormalFocus
    3. End Sub


    any one know what I've done wrong?

    thanks

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: This must be a simple error

    I think you need to either use ShellExecute, or supply the program name in the shell statement. You must also supply the path for the program and the flash.swf.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2005
    Posts
    277

    Re: This must be a simple error

    I have tried adding it to a separate form and then loading that form from button. Will this way work better or the first do you know?

    thanks

  4. #4

  5. #5
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: This must be a simple error

    This is what dgliena was talking about:

    http://www.vbforums.com/showthread.p...t=shellexecute

    Use that instead of Shell...

  6. #6
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,390

    Re: This must be a simple error

    also with my version of flash player swf files are not ascoiated with the flash player

    so u may want 2 run it like this:

    VB Code:
    1. Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    2.  
    3. ShellExecute Me.hWnd, "", "iexplore.exe", SWFFILEHERE, "", 1


  7. #7
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: This must be a simple error

    you need to embed the player in your form, or just use IE as it has a player built in. Have an instance of IE inside of your form.

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2005
    Posts
    277

    Re: This must be a simple error

    To embed the swf file in a form do I Just insert flash from the toolbar and then select the path to the movie in the properties?

  9. #9
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: This must be a simple error

    if you have the flash player. i thought you'd have to add a reference or a component. my ide is tied up figuring out 9^9^9 using Woka's code. No telling when it'll be done!

  10. #10
    Member neanthedral's Avatar
    Join Date
    Dec 2004
    Posts
    57

    Re: This must be a simple error

    hey i checked my components and references...
    i could see no flash there..???
    but i have flash installed in my system..

    nean
    ------------------------------------------------------
    "i am neither a psycopath nor ur abnormal demi-god;
    me - i am just an average software engineer...which is far worse ..so beware.. " .NeaNthedraL
    ------------------------------------------------------

  11. #11
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: This must be a simple error

    FLASH!

    I found this:

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2005
    Posts
    277

    Re: This must be a simple error

    I can add my flash movie like this but the buttons on my flash movie wont work. Any ideas?

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