Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
Private Sub successform_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        If File.Exists("C:\WINDOWS\tscc.txt") Then
            msgbox "hi"
            
        Else
            me.hide()
            Form1.Show()
        End If
    End Sub




when tscc.txt file does not exist it should show form1 at the same time success form (me.hide()) should be hide. but in my case its getting visible [i.e. else part me.hide() getting visible]
Posted
Comments
Savalia Manoj M 26-Sep-12 6:55am    
Also try to add Unload Current form in else part.
May be help you

1 solution

Start here: Form.Load Event[^]
Form.Load Event

Occurs before a form is displayed for the first time.


How do you want to hide form, if it's not displayed?

More:
Form Class[^]
Hide()[^]
Show()[^]
Visible[^].
 
Share this answer
 

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