Results 1 to 7 of 7

Thread: build a user interface

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    build a user interface

    Hi
    I have built 3 VB6 projects,what I want is to build a user interface from which the user can select the project he wants to enter into.
    is it possible to do this kind of interface?if yes,could you give me some ideas?

    For instance,i imagine a form with 3 command buttons,if the user clicks on command1,so Project1 is launched,if the user clicks on command2,so project2 is launched...

    Thanks in advance

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: build a user interface

    launched in the IDE?? or launched as a standalone app (exe)?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: build a user interface

    A good way to go in this cases is: have only 1 EXE (start interface) and the rest of the projects must be DLLs (dynamic libraries), but i see you already have those projects as separated standard EXE projects, so the way to go could be: make the interface as another standard EXE project and ShellExecute the app selected by the user.
    Last edited by jcis; Jul 19th, 2006 at 12:52 PM.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    Re: build a user interface

    make the interface as another standard EXE project and ShellExecute the app selected by the user.
    jcis can you be more specific?could you give me more details because I don't know about ShellExcecute

    Thanks in advance

  5. #5
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: build a user interface

    Example using 2 apps, assuming this:
    - your interface and the other apps will be in the same folder
    - The name of your first app executable is: App1.exe
    - The name of your second app executable is: App2.exe
    - Your interface is a project with 2 commandbuttons (Command1 and Command2)
    Then the code for your interface would be..
    VB Code:
    1. Private Sub Command1_Click()
    2.     OpenApp App.Path & "\App1.exe"
    3. End Sub
    4.  
    5. Private Sub Command2_Click()
    6.     OpenApp App.Path & "\App2.exe"
    7. End Sub
    8.  
    9. Private Sub OpenApp(pPath As String)
    10.     Shell pPath, vbNormalFocus
    11. End Sub
    Run your interface and press both buttons, each one will open the corresponding app.
    This is just an example, you use your real app file names.
    If you want to close the interface after the user selection then add Unload Me after the Shell line.
    Last edited by jcis; Jul 19th, 2006 at 02:51 PM.

  6. #6
    Hyperactive Member
    Join Date
    Dec 2005
    Location
    Toronto, Canada
    Posts
    357

    Re: build a user interface

    Hey,
    I am quite not that familiar with the topic u suggested. But is it possible that you can combine the three projects into one, create a new form to have and have it to startup... or are the projects just a little too big. Btw, isn't it possible to actually just open a file using Visual Basic. I am not quite sure, but I think it is possible to open files if you have an exact path... Anyways, sorry if I am wrong...
    Khanjan
    Hey... If you found this post helpful please rate it.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2006
    Posts
    977

    Re: build a user interface

    Thanks jcis
    I'll try your suggestion,i think it will work

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