Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Shell("Shutdown /s /t 60 /c See_You_Again!!!")
If ComboBox1.Text = "IKWAS-JATI1" Then
Button1("See_You_Again")
End If
End Sub
Asked
Active
Viewed 1,047 times
0

alistaire
- 42,459
- 4
- 77
- 117

Nur Dyiana
- 1
- 1
- 3
-
What you are trying to achieve – sujith karivelil Mar 17 '16 at 03:42
-
for my project .. to shutdown another pc use vb at computer lab . – Nur Dyiana Mar 17 '16 at 03:51
1 Answers
0
I think you are trying to set the button Text based on ComboBox1.Text
if so you have to use Button1.Text
, Hence your snippet will be:
If ComboBox1.Text = "IKWAS-JATI1" Then
Button1.Text = "See_You_Again"
End If

sujith karivelil
- 28,671
- 6
- 55
- 88
-
-
before this yes but .. i have problem when i choose pcw and i want shutdown it .. it doesn't work .. it automatically shutdown my pc .. – Nur Dyiana Mar 17 '16 at 03:58
-
whats wrong with my coding ? did i have add "Shutdown /r -m \\IKWAS-JATI1 /t 60 /c See_You_Again!!!" – Nur Dyiana Mar 17 '16 at 04:00
-
http://stackoverflow.com/questions/734005/is-it-possible-to-shut-down-a-remote-pc-programatically-through-net-applicati May help you – sujith karivelil Mar 17 '16 at 04:03
-
@NurDyiana : If you're trying to shutdown another computer you must of course include it's name or address when you start the `shutdown` process. Besides, what's wrong with un-lucky's solution, and what is Shell35? – Visual Vincent Mar 17 '16 at 17:30