Click to See Complete Forum and Search --> : Embeding files


zoned
September 4th, 2001, 02:26 AM
I was wondering if anyone could help me with a certain problem, how do you embed a file into an exe so that when you press a button on the form it runs the file in its associated program. For example, I want to embed a avi file into an exe so that it can be run in a movie player but the avi file is actually IN the exe and not separate.

Thanks

berta
September 4th, 2001, 04:39 AM
i don't know to have undestand the problem...
but look for this API..


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

public Const SW_SHOWDEFAULT = 10
public Const SW_SHOWMAXIMIZED = 3
public Const SW_SHOWMINIMIZED = 2

public sub OpenFile()
ShellExecute myform.hwnd,"open","myfile.avi","",app.path,SW_SHOWDEFAULT
end sub




<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/images/bertaplanet.gif'>
</center>