Hi,
I don't quite follow this.  How exactly is sub main going to present a menu to 
the user, this surely needs a form?  The simplest solution is to add a menu 
form which is the startup form. 

Declare variables on the menu form as instances of the 3 secondary forms (1 
instance each) and make these With Events.  Add the same event to all 3 forms 
and add a handler to the menu form.

When the user clicks on an item in the menu presented on that form, the form 
makes itself invisible and shows the appropriate form for the menu selection.  
When that form finishes it should raise the event and unload itself, the 
handler in the menu form makes that form visible and so the user has the menu 
again.

Ian




  ----- Original Message ----- 
  From: HouseDad 
  To: [email protected] 
  Sent: Friday, January 07, 2005 8:47 AM
  Subject: [vbhelp] Baby Steps - Sub MAIN





       Hello everyone!

       I am finally making an effort to write "real" programs that 
  simply aren't a single stand-alone form.

       I just want to make sure I am taking the right approach, and am 
  fishing for any suggestions as well.

       I have three programs, and I want to tie them together with a 
  sub main.  My idea is to start a new project, add the forms and the 
  sub main module, and use the sub Main as a sort of menu to select 
  which program to run.

       I am hoping that when I show a form that when the form is 
  unloaded processing will again return to the sub main and allow the 
  user to run that program again or select a different one.  

       I don't think this is going to be too complicated since the 
  three other forms are stand alone programs.  I can't just add a RUN 
  command in VB like GWBASIC to restart the program, and it seems I 
  can't use simple SHELL commands to execute others.

  [C]







  '// =======================================================
      Rules : http://ReliableAnswers.com/List/Rules.asp
      Home  : http://groups.yahoo.com/group/vbHelp/
      =======================================================
      Post  : [email protected]
      Join  : [EMAIL PROTECTED]
      Leave : [EMAIL PROTECTED]
  '// =======================================================




------------------------------------------------------------------------------
  Yahoo! Groups Links

    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/vbhelp/
      
    b.. To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]
      
    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



[Non-text portions of this message have been removed]




'// =======================================================
    Rules : http://ReliableAnswers.com/List/Rules.asp
    Home  : http://groups.yahoo.com/group/vbHelp/
    =======================================================
    Post  : [email protected]
    Join  : [EMAIL PROTECTED]
    Leave : [EMAIL PROTECTED]
'// =======================================================
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/vbhelp/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to