Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Event loops question


Reply
 
Thread Tools Display Modes
  #1  
Old 03-14-2004, 11:04 PM
zim_ulator zim_ulator is offline
Newcomer
 
Join Date: Mar 2004
Location: Massachusetts
Posts: 6
Default Event loops question


Hello all,

I'm wondering about how common it is to run a VB program based in an event loop. For example,

The project has a form FrmMain and a Module1.bas file with this code:

Code:
Option Explicit Public fMainForm As frmMain Sub Main() Set fMainForm = New frmMain fMainForm.Show End Sub

Is this widely used, and are there reasons not to use it?

TIA
Denis
Reply With Quote
  #2  
Old 03-15-2004, 12:08 AM
malloc malloc is offline
Senior Contributor
 
Join Date: Feb 2004
Location: The land of Oz
Posts: 851
Default

I've used it

You can use this method to create multiple instances of a form.

Malloc
__________________
malloc

-| Use [vb][/vb] tags | Forum guidelines | Get FireFox | Google |-
Reply With Quote
  #3  
Old 03-15-2004, 05:12 AM
BillSoo's Avatar
BillSoo BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default

It's widely used with a SDI (Single Document Interface) style interface. Using the MAIN sub gives you a chance to do setup functions, or establish links or maybe show a logon form before going to the main form.

With a MDI interface, I normally just use the form_load event of the MDIForm.
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
  #4  
Old 03-15-2004, 11:31 AM
zim_ulator zim_ulator is offline
Newcomer
 
Join Date: Mar 2004
Location: Massachusetts
Posts: 6
Default

malloc and BillSoo,

Thanks a lot for your input. Your comments are really helpful to me, a newb VBer. This board rules, as do you two.

Denis
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
simple question about for next loops Saibagz General 6 06-30-2003 04:02 AM
Next Question in Database WhIsPeRs Database and Reporting 5 06-29-2003 05:45 PM
VB Question falcon1 File I/O and Registry 27 06-27-2003 02:21 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->