Click here to Skip to main content
15,888,908 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have created an application in vb.net which asks a password if password write then it shows the related form but i am having a problem i am not able to hide the start up form

i am using in form load in start up form

VB
EnterPassword.show()
me.hide()


with this no effect

so i used alternative code

VB
EnterPassword.show()
me.Close()


this cause whole application terminated


so please help me
Posted
Updated 7-Sep-12 2:38am
v2
Comments
Malli_S 7-Sep-12 8:39am    
Try the other way.

me.hide()
EnterPassword.show()

You're showing the other form, which blocks the execution for first form.

do not hide any form if it is of no use you better unload the form use the code
implement a module like this

XML
Module App

    <STAThread()> _
    Public Sub Main()
        Application.EnableVisualStyles()
        Application.DoEvents()
        Application.Run(New Loginform()) 'implement login logic here
        Application.Run(New Form2())
    End Sub

End Module

set sub main as your startup object. your login form will automatically unload and form2 will appear after it
 
Share this answer
 
Comments
murlikrishna 7-Sep-12 10:53am    
well this is right but i am not able to select sub main as start up

i changed application type to console application then i am able to select sub main but i can see form as well as console window
Menon Santosh 8-Sep-12 5:41am    
first go to the properties of the application and uncheck the option 'enable application framework' now you can select the sub main
it is correct code
VB
EnterPassword.show()
me.hide()
Me.Opacity = 0

and set your startup form's property ShowInTaskbar=False
Happy Coding!
:)
 
Share this answer
 
v2
Comments
murlikrishna 7-Sep-12 9:05am    
i already tried this code but this code not giving an effect to form.

the

me.hide()
is working fine in remining forms except start up form but my project needs to hide startup form.
i need to give one more information that i am using visual studio 2010
Aarti Meswania 7-Sep-12 9:08am    
try
Me.Opacity = 0
murlikrishna 7-Sep-12 9:22am    
i know these alternative coding but these are visible in task manager.
it works fine in vb6.0 why not in vb2010?
i want to use standard coding

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900