|
-
Feb 9th, 2005, 11:22 PM
#1
Thread Starter
Hyperactive Member
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:
Private Sub Command6_Click()
Shell "C:\myfolder\test.swf", vbNormalFocus
End Sub
any one know what I've done wrong?
thanks
-
Feb 9th, 2005, 11:42 PM
#2
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.
-
Feb 9th, 2005, 11:47 PM
#3
Thread Starter
Hyperactive Member
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
-
Feb 9th, 2005, 11:54 PM
#4
Re: This must be a simple error
As dglienna implied, the Shell command is used to run a program and not open a file so it doesn't matter where you put it in your program.
-
Feb 10th, 2005, 12:14 AM
#5
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...
-
Feb 10th, 2005, 12:36 AM
#6
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:
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
ShellExecute Me.hWnd, "", "iexplore.exe", SWFFILEHERE, "", 1
-
Feb 10th, 2005, 01:02 AM
#7
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.
-
Feb 10th, 2005, 08:39 PM
#8
Thread Starter
Hyperactive Member
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?
-
Feb 10th, 2005, 09:29 PM
#9
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!
-
Feb 11th, 2005, 02:11 AM
#10
Member
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
------------------------------------------------------
-
Feb 11th, 2005, 02:35 AM
#11
Re: This must be a simple error
FLASH!
I found this:
-
Feb 14th, 2005, 05:37 PM
#12
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|