Forum

Use the Windows Api...
 
Notifications
Clear all

Use the Windows Api to turn off; Restart and Suspend activity PC

3 Posts
2 Users
0 Reactions
75 Views
(@a-maurizio)
Posts: 214
Reputable Member
Topic starter
 

Hello everyone my name is Maurizio
And my problem and this: in a Userform I inserted three OptionButton and a button.
Now the purpose of this project would be to be able "Stop; Ri Start, Suspend, and disconnect my PC" Everything Leveraging the Windows API.
Now I my I tried to create this little program that will send Volenteri, But I can not get what I want because: I currently any button press, I just log off.
For here there is anyone of you a rough idea of how to succeed in ottebere everything else Thanks

 
Posted : 21/01/2017 7:16 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Maurizio,

The Shutdown and Restart buttons were mis-named in the form designer so I fixed that.

I also Grouped the 3 x radio buttons together.

In your CommandButton4_Click() sub you don't need to use .Value when referencing the value of the buttons, the buttons are only ever true or false.

Try the attached workbook.

Regards

Phil

 
Posted : 25/01/2017 11:30 pm
(@a-maurizio)
Posts: 214
Reputable Member
Topic starter
 

Hello Philip Treacy Thanks for Your Support, and very nice what you will study it with me Submitted Warning.
Even itself still is, the True in the Meantime I had already solved, just that I know If I can never dare Put in My Finite projects in these types of Forum.
You know I would never offend anyone!
Thank you for your Involvement Sincere greetings from A.Maurizio

 

(P.S) However, the Mio and That
 
Posted : 26/01/2017 5:05 pm
Share: