CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Embeding files

  1. #1
    Join Date
    Sep 2001
    Location
    Australia
    Posts
    1

    Embeding files

    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


  2. #2

    Re: Embeding files

    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/im...ertaplanet.gif'>
    </center>

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

Featured