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 :thumb:
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.
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
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.
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
Re: What is the cleanest way of doing this? (Form loading)
Thats not a quick question. :D
AFAIK, that would require some form of system wide hook and would seem to be way too much trouble then what its worth. :(
Re: What is the cleanest way of doing this? (Form loading)
or just switch off your speakers :D
Re: What is the cleanest way of doing this? (Form loading)
Quote:
Originally Posted by RobDog888
Thats not a quick question.
The question was quick - I never said the answer would be :lol: