How to make a screen blocker that dis-ables it closing
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
5 posts
Page 1 of 1
Level = ★★☆☆☆
Ok, lets begin earlier this time!
To start, make a new project, name it MOM (so that when hiot ctrl+alt+delete and go to processes, there are 2 MOM.exe files, and you wont be-able to find out which is which)
Now, dont worry about sizes, or border styles, cause in the code, on form1_load, it will auto do it, so you dont have to!
Next, add the following:
TextBox1+2 change the PasswordCharacter to [*]
Then add an extra button, and dont even worry about it, it will just be an emergency button, just in-case something goes wrong during testing... We will delete it after the program is forsure done.
Coding time! lmao;
Our emergency button code
Now, drag the groupbox(which should have button2 and textbox2 in it) over textbox1 and button1
Lock button (button1) code
Thats it! wahooo;
Now debug it! After it is sucessful, delete that emergency button.
----------------------------------------EXTRA FUN STUFF TO DO WITH PROGRAM!------------------------------------------------
Level = ★☆☆☆☆
Just to have some fun while its locked, lets make it so you can DRAW! Just like in my paint tutorial, lets begin!
Using the same program, double click form1, and do the following:
under public class form1 put this:
Ok, lets begin earlier this time!
To start, make a new project, name it MOM (so that when hiot ctrl+alt+delete and go to processes, there are 2 MOM.exe files, and you wont be-able to find out which is which)
Now, dont worry about sizes, or border styles, cause in the code, on form1_load, it will auto do it, so you dont have to!
Next, add the following:
- ● 1 group box (not text)
● 2 textbox's (textbox1 outside the groupbox and textbox2 inside the groupbox)
● 2 buttons(same, button1 outside of the groupbox and button2 inside)
TextBox1+2 change the PasswordCharacter to [*]
Then add an extra button, and dont even worry about it, it will just be an emergency button, just in-case something goes wrong during testing... We will delete it after the program is forsure done.
Coding time! lmao;
Our emergency button code
Code: Select all
That was easy :shock:End
Now, drag the groupbox(which should have button2 and textbox2 in it) over textbox1 and button1
Lock button (button1) code
Code: Select all
UnLock (button2) code
If TextBox1.Text = "Enter lock code here" Then
MsgBox("You must enter a password code!!!")
ElseIf TextBox1.Text = "" Then
MsgBox("You must enter a password code!!!")
Else
GroupBox1.Visible = True
Button1.Visible = False
TextBox1.Visible = False
End If
Code: Select all
Now, under form1_load paste this
If Textbox2.Text = Textbox1.Text Then
end
elseif textbox2.Text = "" Then
MsgBox("You didnt enter anything", MsgBoxStyle.Critical, "ERROR")
else
MsgBox("Wrong Password, please try again", MsgBoxStyle.Critical, "ERROR")
Code: Select all
GroupBox1.Visible = False
Me.Top = 0
Me.Left = 0
Me.Width = "1386"
Me.Height = "788"
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
Thats it! wahooo;
Now debug it! After it is sucessful, delete that emergency button.
----------------------------------------EXTRA FUN STUFF TO DO WITH PROGRAM!------------------------------------------------
Level = ★☆☆☆☆
Just to have some fun while its locked, lets make it so you can DRAW! Just like in my paint tutorial, lets begin!
Using the same program, double click form1, and do the following:
- open:
- ● form1_MouseClick
● form1_MouseMove
● form1_MouseDown
● form1_MouseUp
- ● PictureBox1 (docked in parent cantainer & send it to back(Right click<Send To Back))
- ● form1_MouseClick
under public class form1 put this:
Code: Select all
Under the Form1_MouseDown
Dim down = False
Code: Select all
under Form1_MouseUp
down = true
Code: Select all
Under Form1_MouseClick AND Form1_MouseMove put this
down = false
Code: Select all
You should be done! wahooo;If down = True Then
PictureBox1.CreateGraphics.FillEllipse(Brushes.Black, e.X, e.Y, 15, 15)
End If
Nice tutorial there, keep it up.
One thing though, not all computer will have MOM.exe in their process list.
if you want to name it so they can not figure out which program it is I suggest naming it something like explorer.exe
One thing though, not all computer will have MOM.exe in their process list.
if you want to name it so they can not figure out which program it is I suggest naming it something like explorer.exe
NoWayIn wrote:Nice tutorial there, keep it up.Haha :p Nice, You can also add a feature that blocks Alt-Ctrl-Delete
One thing though, not all computer will have MOM.exe in their process list.
if you want to name it so they can not figure out which program it is I suggest naming it something like explorer.exe
Great tutorial man, you deserve reputation!
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023