|
-
Nov 7th, 2002, 05:55 AM
#1
Thread Starter
Frenzied Member
**Resolved** Whats the deal with the 256?
VB Code:
'In general section
Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Const EWX_FORCE = 4
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Sub Form_Load()
'KPD-Team 1998
'URL: [url]http://www.allapi.net/[/url]
[b][color=red] msg = MsgBox("This program is going to reboot your computer. Press OK to continue or Cancel to stop.", vbCritical + vbOKCancel + 256, App.Title)[/color][/b]
If msg = vbCancel Then End
'reboot the computer
ret& = ExitWindowsEx(EWX_FORCE Or EWX_REBOOT, 0)
End Sub
So whats the deal with 2^8
Last edited by KayJay; Nov 7th, 2002 at 06:04 AM.
"Brothers, you asked for it."
...Francisco Domingo Carlos Andres Sebastian D'Anconia
-
Nov 7th, 2002, 05:59 AM
#2
Fanatic Member
This is the same as
vbDefaultButton2
They should have used this really..
Leather Face is comin...
MCSD
-
Nov 7th, 2002, 06:01 AM
#3
Thread Starter
Frenzied Member
ok..
Whats the difference then? having it or not is the same thing.
VB Code:
Private Sub Command1_Click()
MsgBox "This program is going to reboot your computer. Press OK to continue or Cancel to stop.", vbCritical + vbOKCancel + 256, App.Title
MsgBox "This program is going to reboot your computer. Press OK to continue or Cancel to stop.", vbCritical + vbOKCancel + vbDefaultButton2, App.Title
MsgBox "This program is going to reboot your computer. Press OK to continue or Cancel to stop.", vbDefaultButton2, App.Title
End Sub
"Brothers, you asked for it."
...Francisco Domingo Carlos Andres Sebastian D'Anconia
-
Nov 7th, 2002, 06:01 AM
#4
PowerPoster
Constant Value Description
vbOKOnly 0 Display OK button only.
vbOKCancel 1 Display OK and Cancel buttons.
vbAbortRetryIgnore 2 Display Abort, Retry, and Ignore buttons.
vbYesNoCancel 3 Display Yes, No, and Cancel buttons.
vbYesNo 4 Display Yes and No buttons.
vbRetryCancel 5 Display Retry and Cancel buttons.
vbCritical 16 Display Critical Message icon.
vbQuestion 32 Display Warning Query icon.
vbExclamation 48 Display Warning Message icon.
vbInformation 64 Display Information Message icon.
vbDefaultButton1 0 First button is default.
vbDefaultButton2 256 Second button is default.
vbDefaultButton3 512 Third button is default.
vbDefaultButton4 768 Fourth button is default.
so somebody just got too lazy to type vbDefaultButton2
-
Nov 7th, 2002, 06:03 AM
#5
Thread Starter
Frenzied Member
Got it. Thanx guys. Should be more observant
"Brothers, you asked for it."
...Francisco Domingo Carlos Andres Sebastian D'Anconia
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|