dberube4

Python message box

Apr 23rd, 2012
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. #Msgbox for python 2.7
  2.  
  3. from ctypes import *
  4.  
  5. #Define constants:
  6. null = c_int(0) #A C null
  7. MB_OK = 0x00000000L #Ok button
  8. MB_ICONERROR = 0x00000010L #Critical Icon
  9. MB_TOPMOST = 0x00040000L # cannot be hided.
  10. #more at http://msdn.microsoft.com/en-us/library/windows/desktop/ms645505%28v=vs.85%29.aspx
  11.  
  12. #defining function:
  13. msgBox = windll.user32.MessageBoxA
  14. #Execute function:
  15. msgBox(null,str('Title'),str('Message'), MB_OK | MB_ICONERROR | MB_TOPMOST)
Advertisement
Add Comment
Please, Sign In to add comment