Click here to Skip to main content
15,912,205 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to open new form from a datagridview row? Pin
Rashar10-May-07 2:23
Rashar10-May-07 2:23 
GeneralRe: How to open new form from a datagridview row? Pin
Hansduncan10-May-07 4:05
Hansduncan10-May-07 4:05 
GeneralRe: How to open new form from a datagridview row? [modified] Pin
Rashar10-May-07 5:43
Rashar10-May-07 5:43 
GeneralRe: How to open new form from a datagridview row? Pin
Hansduncan10-May-07 8:21
Hansduncan10-May-07 8:21 
Questionsystem shutdown Pin
M269-May-07 7:13
M269-May-07 7:13 
AnswerRe: system shutdown Pin
Dave Kreskowiak9-May-07 7:20
mveDave Kreskowiak9-May-07 7:20 
Generalok ... this is my code Pin
M2610-May-07 6:19
M2610-May-07 6:19 
GeneralRe: ok ... this is my code Pin
Dave Kreskowiak10-May-07 12:37
mveDave Kreskowiak10-May-07 12:37 
OK. You really need to read the documentation on ExitWindowsEx[^]. If you use 0 for the second parameter, you can delay system shutdown considerably because this tells Windows that this is more-or-less an unplanned shutdown and XP and above will treat it like a crash. The ShutdownReason parameter is there for a reason, use it.

Also, if any application says that it's not OK to shutdown, it can abort the shutdown.

Your ignoring the return code. If this the return code is 0, then an error occured and you'll have to call the Win32 API function GetLastError to figure out why the call failed.

And last, but not least, you need to request the SE_SHUTDOWN_NAME privilege before you call ExitWindowsEx. You can find out how to do this by following the link on the ExitWindowsEx page for AdjustTokenPrivileges.


A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


QuestionPlay Midi File/MP3 from Application Pin
RichardBerry9-May-07 4:33
RichardBerry9-May-07 4:33 
AnswerRe: Play Midi File/MP3 from Application Pin
Dave Kreskowiak9-May-07 6:24
mveDave Kreskowiak9-May-07 6:24 
GeneralRe: Play Midi File/MP3 from Application Pin
RichardBerry9-May-07 22:47
RichardBerry9-May-07 22:47 
GeneralPrint DataSet (DataGrid) Pin
moiid639-May-07 4:10
moiid639-May-07 4:10 
GeneralRe: Print DataSet (DataGrid) Pin
Dave Kreskowiak9-May-07 4:48
mveDave Kreskowiak9-May-07 4:48 
QuestionPlease Help!! Please Pin
tcombs079-May-07 3:07
tcombs079-May-07 3:07 
AnswerRe: Please Help!! Please Pin
SimulationofSai9-May-07 4:18
SimulationofSai9-May-07 4:18 
GeneralRe: Please Help!! Please Pin
tcombs0710-May-07 8:00
tcombs0710-May-07 8:00 
Questionsend code Pin
bcsf05a0229-May-07 2:27
bcsf05a0229-May-07 2:27 
AnswerRe: send code Pin
Dave Kreskowiak9-May-07 3:18
mveDave Kreskowiak9-May-07 3:18 
Questionhow to insert values into msaccess from vb.net win app? Pin
sathyan_82949-May-07 2:25
sathyan_82949-May-07 2:25 
AnswerRe: how to insert values into msaccess from vb.net win app? Pin
Christian Graus9-May-07 15:05
protectorChristian Graus9-May-07 15:05 
Questionhow to insert the entering values into msaccess from vb.net windows application? Pin
sathyan_82949-May-07 2:23
sathyan_82949-May-07 2:23 
Questionvb connection with sql server 2000 Pin
bcsf05a0229-May-07 2:23
bcsf05a0229-May-07 2:23 
Questionhow to insert or save the entering values into msaccess from vb.net windows application? Pin
sathyan_82949-May-07 2:20
sathyan_82949-May-07 2:20 
AnswerRe: how to insert or save the entering values into msaccess from vb.net windows application? Pin
Tarakeshwar Reddy9-May-07 3:20
professionalTarakeshwar Reddy9-May-07 3:20 
Questionvb connection with sql server 2000 Pin
bcsf05a0229-May-07 2:19
bcsf05a0229-May-07 2:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.