@lucky, Its been long hope u aight! I need a lil help and hope u can b of assistance,
I would like a form to load immediately at system startup, Its to provide a custom login, The problems I have are -
1. Code to make the form load immediate u put on d system
2. To prevent closure of d form using alt + f4.
Thanks 4 your help.
To disable Alt+F4 from closing your form.
Public Class Form1
Dim closedForm As Boolean = False
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
e.Cancel = closedForm
End Sub
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.Alt Or e.KeyCode = Keys.F4 Then
closedForm = True
Else
closedForm = False
End If
End Sub
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
closedForm = False
End Sub
End Class
You can make so by allowing your program to run as service or application.
To make your program run like application;
To Make a program start as soon as the system starts, copy it to the startup on your program menu manually.
I will late wrote and send to you hw to make service based programs.
Take care and bye for now.