Hi, much peaple want to knwo coding and things like that, the probleme is they cant make a Msg show up and they start with a Hack... -_-
I will show a tutorial of simple codes and tutorials for helpe on that
.
In a Form project
Thirst if u want to make a nice programe you have to know the diferent ways to make a Msg box.
The more simple is this 1:
Code:
MsgBox("you text here")
you can add it wen:
1- Pressed button-->
add a button and press 2 times fast on it to see the code and wrhite this:
2- With a Progress Bar -->
Add a timer a Progress bar and make the timer enable.
In the Timer1 add this code:
Code:
ProgressBar1.Increment(1)
If ProgressBar1.Value = 50 Then
MsgBox("its almost there")
End If
"50" is the value of the progressbar(wen it is in 50% it will show that message)
But you can add a difrent type of Msg, for ex a msg with options, like Cancel, Ok, etc.
Here a ex:
Code:
MsgBox("Do you want to save the changes?", MsgBoxStyle.YesNoCancel, "New Document")
And to add Codes to the options make this:
Code:
MsgBox("Do you want to save the changes?", MsgBoxStyle.YesNoCancel, "New Document")
If MsgBoxResult.Cancel Then
End If
If MsgBoxResult.Yes Then
Me.Close()
End If
If MsgBoxResult.No Then
MsgBox("just add the options you want")
End If
Or a Critical message:
Code:
MsgBox("text for the error :P", MsgBoxStyle.Critical, "Msg title")
Simple codes that can helpe you:
If u want to enable somthing put this code:
Code:
"Object1".Enable = true
Or
]If u want to Make somthing invisible, or change opacity:
Code:
"object1".Visible = False
or
Code:
"object1"Opacity = 40
(change to the value you want)
If u want to change to othere form:
if u want to hide somthing:
(be carefull, somtimes is hard to make it show up, if u dont make a button or somthing :P)
if u want to add hotkeys:
open form1 and you will up there a little lightning with Load wrhited, just Press thre and select "Key Down"
in key down code add this:
Code:
If e.KeyCode = Keys.Insert Then
(add here the key function)
End If
if u want to work with radio Buttons and if they are wen they are checked you can add functions like this:
Code:
If RadioButton1.Checked = True Then
Add here your function
End If
with check Box is the same code, just change the object name:
Code:
If CheckBox1.Checked = True Then
Add here your function
End If
If you want to know more things, just PM /me
