UCM
Centurion
Just in case any of you out there were curious as to an answer for this question, heres some things to think about:
* If you use a form instead of a module then you CAN hide it if it is the startup object in your project
* Since your startup object would be a form instead of a module, you can quickly and easily add things like system tray icons as well as context menus on these icons
* With a form set up as your startup object, you can create other forms in code from this form just like you could if you used a module
There are I'm sure many many other great reasons to choose forms over modules.
Now on to the big question, "How do I make my startup form invisible at startup??" The answer is much simpler than to be expected:
First, let's make form1 the startup form in project properties
Second, set form1's controlbox property to 'False'
Third, set form1's formborderstyle property to 'None'
Fourth, set form1's size to the minimum it can be, '8, 8'
Fifth, set form1's transparancy key as well as form1's backcolor property to 'Control' ( In the System colors tab )
And Sixth, add the following code to the form_load event on form1:
Note: There is no need to use Me.Hide() since it will have no effect
Note: If you want to hide the form from the task bar then just make form1's showintaskbar property to false, you can use the form1.text property as much as you like.
Result is that form1 now has control just like normal, except that it doesn't appear on the screen at all thus giving you full control over any form related OOP and form control benifits while removing any need for a module...
* If you use a form instead of a module then you CAN hide it if it is the startup object in your project
* Since your startup object would be a form instead of a module, you can quickly and easily add things like system tray icons as well as context menus on these icons
* With a form set up as your startup object, you can create other forms in code from this form just like you could if you used a module
There are I'm sure many many other great reasons to choose forms over modules.
Now on to the big question, "How do I make my startup form invisible at startup??" The answer is much simpler than to be expected:
First, let's make form1 the startup form in project properties
Second, set form1's controlbox property to 'False'
Third, set form1's formborderstyle property to 'None'
Fourth, set form1's size to the minimum it can be, '8, 8'
Fifth, set form1's transparancy key as well as form1's backcolor property to 'Control' ( In the System colors tab )
And Sixth, add the following code to the form_load event on form1:
Visual Basic:
Me.Top = 4
Me.Left = 0
Note: If you want to hide the form from the task bar then just make form1's showintaskbar property to false, you can use the form1.text property as much as you like.
Result is that form1 now has control just like normal, except that it doesn't appear on the screen at all thus giving you full control over any form related OOP and form control benifits while removing any need for a module...