Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Tutorial base visual basic 6 - Come spegnere, riavviare, e disconnettere il computer

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,205
Loading...
Alert icon
Sign in or sign up now!
Alert icon
Ratings have been disabled for this video.

Uploaded by on Aug 11, 2010

Programma che permettere di spegnere, riavviare e disconnettere il computer, facile e semplice da creare con solo poche righe di codice


codice:
Private Sub Command1_Click()
Select Case Option1.CausesValidation And Option2.CausesValidation And Option3.CausesValidation
Case Option1.Value = True And Option2.Value = False And Option3.Value = False
Riavvia
Case Option1.Value = False And Option2.Value = True And Option3.Value = False
Spegni
Case Option1.Value = False And Option2.Value = False And Option3.Value = True
Disconnetti
End Select
End Sub

ora negli optionbutton inserite un codice per ognuno a seconda il compito che deve eseguire il nostro programma

Private Sub Riavvia()
Shell ("shutdown -r -t 00") 'questo serve per riavviare il pc
End Sub
Private Sub Spegni()
Shell ("shutdown -s -t 00") 'questo per spegnere
End Sub
Private Sub Disconnetti()
Shell ("shutdown -l -t 00") 'questo per disconnettere
End Sub

rinominate gli optionbutton in "spegni" "riavvia" "disconnetti"

Category:

Education

Tags:

License:

Standard YouTube License

Link to this comment:

Share to:

Video Responses

This video is a response to Visual Basic Simple Animation
see all

All Comments (0)

Sign In or Sign Up now to post a comment!
Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more