|
-
May 22nd, 2006, 01:27 PM
#1
Thread Starter
Hyperactive Member
What is the cleanest way of doing this? (Form loading)
Hi,
To load a form, I normally use:
VB Code:
Load formname
formname.Visible = True
However, in order to set a form as modal, it seems I have to use:
I'm concerned that using a function (show) may be detrimental to the performance of my software. (The software needs to be as quick and as clean as possible). Which form loading method is better? AND (if the first way), how can I create a modal (on top dominant) form?
Many thanks,
Jord
-
May 22nd, 2006, 01:30 PM
#2
Re: What is the cleanest way of doing this? (Form loading)
A form can not be made visiable unless it is loaded. Thisboth loads and shows the form with one command.
-
May 22nd, 2006, 01:35 PM
#3
Re: What is the cleanest way of doing this? (Form loading)
I use this
VB Code:
Load form1
form1.Show vbModal
Both of the methods you are using above do the same thing as far as loading the form so it shouldn't affect load time.
and you need to use .show to create a modal form
-
May 22nd, 2006, 01:37 PM
#4
Re: What is the cleanest way of doing this? (Form loading)
Use the Load form1 in your splash screen and then when ready to show the form do a form1.show vbmodal. Since its already loaded it will not reload with .show.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 22nd, 2006, 04:03 PM
#5
Thread Starter
Hyperactive Member
Re: What is the cleanest way of doing this? (Form loading)
Thanks for help guys.
I now have another quick question, is there any way ot get rid of the annoying behaviour exhibited when the mouse click is elsewhere on the screen (other than over the modal form). The modal form flashes and an annoying 'bong' sound is played. How could I get rid of this?
Jord
-
May 22nd, 2006, 04:08 PM
#6
Re: What is the cleanest way of doing this? (Form loading)
Thats not a quick question. 
AFAIK, that would require some form of system wide hook and would seem to be way too much trouble then what its worth.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 22nd, 2006, 04:32 PM
#7
Re: What is the cleanest way of doing this? (Form loading)
or just switch off your speakers
-
May 22nd, 2006, 05:48 PM
#8
Thread Starter
Hyperactive Member
Re: What is the cleanest way of doing this? (Form loading)
 Originally Posted by RobDog888
Thats not a quick question.
The question was quick - I never said the answer would be
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|