hi , i have 3 forms, the login form, profile form and notice form ... my problem is if ever my LAN connection lost the profile form will LOGOUT automatically if ever there is someone who logged on and show login form ,if not the login form will hide, then show the notice form that there is no connection then all active forms the profile and login form will hide and only the notice form will show, then if the connection is back, the notice form will hide and show the login form, can u help me ?

I am assuming you are using the Lan monitoring code from yesterday's post.
Where the msgbox pops up, replace that code with
If you have included the timer to monitor the connection then it will continue to execute at the given time Interval. When the You Are Connected condition returns then just reverse
Notice_frm.Hiden

If IsWebConnected(msg) = false then
    msgbox "Your Connection Was Lost"
    Notice_frm.Show
    SignIn_frm.Hide
    Main_frm.Hide
Else
    Main_frm.Show
    'Do they need to sign back in?
    SignIn_frm.show
    SignIn_frm.ID_txt.SetFocus
    msgbox "Your Connection Is Restored"
End If

Note: do not try to set focus on a hidden form.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.