I wanna make a Shutdown manager :icon_cheesygrin:

Dim SETGETimeOut As Integer = " -t " & NumericSecondsValue.Value.ToString
        Dim SETGETComment As String = " -c " & CommentBox.Text
        'Dim SETGETNetwork As String = " -m "
        'Dim SETGETForceclose As String =" -f"
        Shell("shutdown -s" & SETGETimeOut & SETGETComment, AppWinStyle.NormalFocus, False, 0)

Recommended Answers

All 8 Replies

But there's a huge problem here
if some are empty it wont work so i want to know is there someway to code it in a way that it would sense if its nothing and only add those that have something filled in im talking about -c -t and -f and -m
Cmd - Fucntions :D

It will probable be some sort of Function needed to do this event but im not sure how to make one based on this code too much on brain at the moment :icon_eek:

Anybody please ??

>>if some are empty it wont work
What exactly are these "some"?

thee above those that need a string like -t -m -c
T= Time out
M= Network Computer
C= Comment for Shutdown Box

First of all

Dim SETGETimeOut As Integer = " -t " & NumericSecondsValue.Value.ToString

You declare SETGETimeOut As Integer but assign a string value to it...

How can it be possible..

And yes you can do that. Just put some if else condition into your code and check for empty or nonempty value and finally make the command....

commented: +=1 for eagle.eye:) +12

dude you so far from the point:-O, thats not what im trying to do :D

commented: .asking for help and not providing any details. -3

Do u need any API for that???

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.