Sign in to follow this  
Followers 0
MachinistProgrammer

MsgBox++.au3 better looking mesage boxes

10 posts in this topic

#1 ·  Posted (edited)

the look of the message box was semi-inspired by norton360 message boxes

#info#=========================================================

flags - 1 = ok

- 2 = yes no

- 3 = retry ignore abort

getting the output

- if $output = 0 then, clicked on the X 1 then, clicked on ok 2 then, clicked on yes 3 then, clicked on no

4 then, clicked on retry 5 then, clicked on abort 6 then, clicked on ignore

setting the style

- use global $mcolour1 = <colour code 1>, $mcolour2 = <colour code 2> to set the colour

#==============================================================

example script

#include <MsgBox++.au3>
Global $mcolour1 = 0xffffff, $mcolour2 = 0x0d1d1d1d ;sets the colour to black and white
_MsgBoxCreate(1,"    an example script for MsgBox++","to set the colour use","global $mcolour1 = <colour code 1>, $mcolour2 ="," <colour code 2> to set the colour")
_MsgBoxCreate(2,"                        yes and no","the output for the last box was " & $output,"","")
_MsgBoxCreate(3,"            retry, abort and ignore","the output for the last box was " & $output,"","")
_MsgBoxCreate(1,"                        finnished","the output for the lst box was " & $output,"","")

msgbox++.au3

Edited by sycam0inc

All my projects live on github

Share this post


Link to post
Share on other sites



Ditto, the ability to move the MsgBox is key. Still, good work.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

hi

nice code

thank you

window moved

modified MsgBox++.au3

msgbox++.au3

Edited by mesale0077
2 people like this

Share this post


Link to post
Share on other sites

hi

nice code

thank you

window moved

modified MsgBox++.au3

thanks

but i fixed the glitch of it not being in the middle of the screen

#include <GUIConstantsEx.au3>
#include <guictrlonhover.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <WinAPI.au3>
#include <GUIConstantsEx.au3>
;#FUNCTIONS# ====================================================================================================================
;_MsgBoxCreate
;_MsgBoxCuStyle
; ===============================================================================================================================
Global $mcolour2 = 0x191919, $mcolour1 = 0x8C8C8C
; #FUNCTION# ====================================================================================================================
; Name...........: _MsgBoxCreate
; Description ...: Better looking message boxes with custom styles
; Syntax.........:  _MsgBoxCreate($mflag = 1,$mtitle = "title",$mline1 = "line 1",$mline2 = "line 2",$mline3 = "line 3")
; Parameters ....: $mflag      - Flag for message box 1 = ok 2 = yes/no 3 = retry/ignore/Cancel
;                 $mtitle     - Title of message box
;                 $mline1     - The first line of the message box
;                 $mline2     - The second line of the message box
;                 $mline3     - The third line of the message box
; Output.........: $output    - if $output = 0 then, clicked on the X 1 then, clicked on ok 2 then, clicked on yes 3 then, clicked on no
;                                4 then, clicked on retry 5 then, clicked on abort 6 then, clicked on ignore
;
; styles.........:              global $mcolour1 = <colour code 1>, $mcolour2 = <colour code 2> to set the colour
; Author ........: Sycam inc (sean campbell)
; Remarks .......: none
; Related .......:
; ===============================================================================================================================
Func _MsgBoxCreate($mflag,$mtitle,$mline1,$mline2,$mline3)
$1 = @DesktopWidth/2
$width = $1-300
$2 = @DesktopHeight/2
$hight = $2-200
global $msgboxgui = GUICreate($mtitle, 600, 400,$width,$hight, BitOR($WS_POPUP, $WS_SYSMENU, $WS_EX_LAYERED))
GUISetBkColor($mcolour1)
$exit = GUICtrlCreateLabel("",585,0,15,15,$GUI_GR_RECT)
$Graphic1 = GUICtrlCreateGraphic(0, 0, 600, 75)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mcolour2, $mcolour2)
GUICtrlSetGraphic(-1, $GUI_GR_RECT, 0, 0, 600, 75)
GUICtrlSetGraphic(-1, $GUI_GR_PENSIZE, 4)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mcolour1, $GUI_GR_NOBKCOLOR)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 600, 0)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 585, 15)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 585, 0)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 600, 15)
$Graphic2 = GUICtrlCreateGraphic(0, 325, 605, 80)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mColour2, $mcolour2)
GUICtrlSetGraphic(-1, $GUI_GR_RECT, 0, 0, 600, 75)
if $mflag = 1 Then
$ok = GUICtrlCreateLabel("            ok", 200, 200, 200, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mcolour1)
Else
   if $mflag = 2 Then
   $yes = GUICtrlCreateLabel("           yes", 90, 200, 200, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mColour1)
$no = GUICtrlCreateLabel("            no", 310, 200, 200, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
GUICtrlSetColor(-1, $mColour1)
Else
  If $mflag = 3 Then
  $retry = GUICtrlCreateLabel("        retry", 10, 200, 180, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mColour1)
$abort = GUICtrlCreateLabel("         abort", 210, 200, 180, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mColour1)
$ignore = GUICtrlCreateLabel("       ignore", 410, 200, 180, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mColour1)
EndIf
EndIf
EndIf
$Label2 = GUICtrlCreateLabel($mtitle, 20, 15, 560, 50)
GUICtrlSetFont(-1, 28, 400, 0, "Impact")
GUICtrlSetColor(-1, $mColour1)
GUICtrlSetBkColor(-1,$mColour2)
$Label3 = GUICtrlCreateLabel($mline1, 100, 100, 400, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, $mColour2)
$Label4 = GUICtrlCreateLabel($mline2, 100, 125, 400, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, $mColour2)
$Label5 = GUICtrlCreateLabel($mline3, 100, 150, 600, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, $mColour2)
GUISetState(@SW_SHOW)
if $mflag = 1 Then
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Exit
   Case $GUI_EVENT_PRIMARYDOWN
                Drag()
   Case $exit
   GUIDelete($msgboxgui)
   Global $output = 0
   ExitLoop
   Case $ok
   Global $output = 1
   GUIDelete($msgboxgui)
   ExitLoop
  ;Case $msgboxgui
EndSwitch
WEnd
Else
if $mflag = 2 Then
   While 1
$nMsg = GUIGetMsg()
Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Exit
   Case $GUI_EVENT_PRIMARYDOWN
                Drag()
   Case $exit
   GUIDelete($msgboxgui)
   Global $output = 0
   ExitLoop
     Case $yes
   Global $output = 2
   GUIDelete($msgboxgui)
   ExitLoop
   Case $no
   Global $output = 3
   GUIDelete($msgboxgui)
   ExitLoop
  ; Case $msgboxgui
EndSwitch
WEnd
Else
if $mflag = 3 then
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Exit
   Case $GUI_EVENT_PRIMARYDOWN
                Drag()
  
   Case $exit
   GUIDelete($msgboxgui)
   Global $output = 0
   ExitLoop
   Case $retry
   Global $output = 4
   GUIDelete($msgboxgui)
   ExitLoop
   Case $ignore
   Global $output = 6
   GUIDelete($msgboxgui)
   ExitLoop
   case $abort
   Global $output = 5
   GUIDelete($msgboxgui)
   ExitLoop
     ;Case $msgboxgui
EndSwitch
WEnd
EndIf
EndIf
EndIf
EndFunc
Func Drag()
        dllcall("user32.dll","int","ReleaseCapture")
        dllcall("user32.dll","int","SendMessage","hWnd", $msgboxgui,"int",$WM_NCLBUTTONDOWN,"int", $HTCAPTION,"int", 0)
EndFunc

All my projects live on github

Share this post


Link to post
Share on other sites

thanks

but i fixed the glitch of it not being in the middle of the screen

#include <GUIConstantsEx.au3>
#include <guictrlonhover.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <WinAPI.au3>
#include <GUIConstantsEx.au3>
;#FUNCTIONS# ====================================================================================================================
;_MsgBoxCreate
;_MsgBoxCuStyle
; ===============================================================================================================================
Global $mcolour2 = 0x191919, $mcolour1 = 0x8C8C8C
; #FUNCTION# ====================================================================================================================
; Name...........: _MsgBoxCreate
; Description ...: Better looking message boxes with custom styles
; Syntax.........: _MsgBoxCreate($mflag = 1,$mtitle = "title",$mline1 = "line 1",$mline2 = "line 2",$mline3 = "line 3")
; Parameters ....: $mflag    - Flag for message box 1 = ok 2 = yes/no 3 = retry/ignore/Cancel
;                $mtitle     - Title of message box
;                $mline1     - The first line of the message box
;                $mline2     - The second line of the message box
;                $mline3     - The third line of the message box
; Output.........: $output   - if $output = 0 then, clicked on the X 1 then, clicked on ok 2 then, clicked on yes 3 then, clicked on no
;                                4 then, clicked on retry 5 then, clicked on abort 6 then, clicked on ignore
;
; styles.........:           global $mcolour1 = <colour code 1>, $mcolour2 = <colour code 2> to set the colour
; Author ........: Sycam inc (sean campbell)
; Remarks .......: none
; Related .......:
; ===============================================================================================================================
Func _MsgBoxCreate($mflag,$mtitle,$mline1,$mline2,$mline3)
$1 = @DesktopWidth/2
$width = $1-300
$2 = @DesktopHeight/2
$hight = $2-200
global $msgboxgui = GUICreate($mtitle, 600, 400,$width,$hight, BitOR($WS_POPUP, $WS_SYSMENU, $WS_EX_LAYERED))
GUISetBkColor($mcolour1)
$exit = GUICtrlCreateLabel("",585,0,15,15,$GUI_GR_RECT)
$Graphic1 = GUICtrlCreateGraphic(0, 0, 600, 75)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mcolour2, $mcolour2)
GUICtrlSetGraphic(-1, $GUI_GR_RECT, 0, 0, 600, 75)
GUICtrlSetGraphic(-1, $GUI_GR_PENSIZE, 4)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mcolour1, $GUI_GR_NOBKCOLOR)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 600, 0)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 585, 15)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 585, 0)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 600, 15)
$Graphic2 = GUICtrlCreateGraphic(0, 325, 605, 80)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mColour2, $mcolour2)
GUICtrlSetGraphic(-1, $GUI_GR_RECT, 0, 0, 600, 75)
if $mflag = 1 Then
$ok = GUICtrlCreateLabel("           ok", 200, 200, 200, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mcolour1)
Else
if $mflag = 2 Then
$yes = GUICtrlCreateLabel("          yes", 90, 200, 200, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mColour1)
$no = GUICtrlCreateLabel("           no", 310, 200, 200, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
GUICtrlSetColor(-1, $mColour1)
Else
If $mflag = 3 Then
$retry = GUICtrlCreateLabel("        retry", 10, 200, 180, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mColour1)
$abort = GUICtrlCreateLabel("        abort", 210, 200, 180, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mColour1)
$ignore = GUICtrlCreateLabel("       ignore", 410, 200, 180, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mColour1)
EndIf
EndIf
EndIf
$Label2 = GUICtrlCreateLabel($mtitle, 20, 15, 560, 50)
GUICtrlSetFont(-1, 28, 400, 0, "Impact")
GUICtrlSetColor(-1, $mColour1)
GUICtrlSetBkColor(-1,$mColour2)
$Label3 = GUICtrlCreateLabel($mline1, 100, 100, 400, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, $mColour2)
$Label4 = GUICtrlCreateLabel($mline2, 100, 125, 400, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, $mColour2)
$Label5 = GUICtrlCreateLabel($mline3, 100, 150, 600, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, $mColour2)
GUISetState(@SW_SHOW)
if $mflag = 1 Then
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_PRIMARYDOWN
             Drag()
Case $exit
GUIDelete($msgboxgui)
Global $output = 0
ExitLoop
Case $ok
Global $output = 1
GUIDelete($msgboxgui)
ExitLoop
;Case $msgboxgui
EndSwitch
WEnd
Else
if $mflag = 2 Then
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_PRIMARYDOWN
             Drag()
Case $exit
GUIDelete($msgboxgui)
Global $output = 0
ExitLoop
     Case $yes
Global $output = 2
GUIDelete($msgboxgui)
ExitLoop
Case $no
Global $output = 3
GUIDelete($msgboxgui)
ExitLoop
; Case $msgboxgui
EndSwitch
WEnd
Else
if $mflag = 3 then
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_PRIMARYDOWN
             Drag()

Case $exit
GUIDelete($msgboxgui)
Global $output = 0
ExitLoop
Case $retry
Global $output = 4
GUIDelete($msgboxgui)
ExitLoop
Case $ignore
Global $output = 6
GUIDelete($msgboxgui)
ExitLoop
case $abort
Global $output = 5
GUIDelete($msgboxgui)
ExitLoop
     ;Case $msgboxgui
EndSwitch
WEnd
EndIf
EndIf
EndIf
EndFunc
Func Drag()
     dllcall("user32.dll","int","ReleaseCapture")
     dllcall("user32.dll","int","SendMessage","hWnd", $msgboxgui,"int",$WM_NCLBUTTONDOWN,"int", $HTCAPTION,"int", 0)
EndFunc

nice

but nice your code

again thank you

fixed the middle of the screen

ı think change

global $msgboxgui = GUICreate($mtitle, 600, 400,-1,-1, BitOR($WS_POPUP, $WS_SYSMENU, $WS_EX_LAYERED))

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <WinAPI.au3>
#include <GUIConstantsEx.au3>
;#FUNCTIONS# ====================================================================================================================
;_MsgBoxCreate
;_MsgBoxCuStyle
; ===============================================================================================================================
Global $mcolour2 = 0x191919, $mcolour1 = 0x8C8C8C
; #FUNCTION# ====================================================================================================================
; Name...........: _MsgBoxCreate
; Description ...: Better looking message boxes with custom styles
; Syntax.........: _MsgBoxCreate($mflag = 1,$mtitle = "title",$mline1 = "line 1",$mline2 = "line 2",$mline3 = "line 3")
; Parameters ....: $mflag    - Flag for message box 1 = ok 2 = yes/no 3 = retry/ignore/Cancel
;                $mtitle     - Title of message box
;                $mline1     - The first line of the message box
;                $mline2     - The second line of the message box
;                $mline3     - The third line of the message box
; Output.........: $output   - if $output = 0 then, clicked on the X 1 then, clicked on ok 2 then, clicked on yes 3 then, clicked on no
;                                4 then, clicked on retry 5 then, clicked on abort 6 then, clicked on ignore
;
; styles.........:           global $mcolour1 = <colour code 1>, $mcolour2 = <colour code 2> to set the colour
; Author ........: Sycam inc (sean campbell)
; Remarks .......: none
; Related .......:
; ===============================================================================================================================
Func _MsgBoxCreate($mflag,$mtitle,$mline1,$mline2,$mline3)
;$1 = @DesktopWidth/2
;$width = $1-300
;$2 = @DesktopHeight/2
;$hight = $2-200
global $msgboxgui = GUICreate($mtitle, 600, 400,-1,-1, BitOR($WS_POPUP, $WS_SYSMENU, $WS_EX_LAYERED))
GUISetBkColor($mcolour1)
$exit = GUICtrlCreateLabel("",585,0,15,15,$GUI_GR_RECT)
$Graphic1 = GUICtrlCreateGraphic(0, 0, 600, 75)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mcolour2, $mcolour2)
GUICtrlSetGraphic(-1, $GUI_GR_RECT, 0, 0, 600, 75)
GUICtrlSetGraphic(-1, $GUI_GR_PENSIZE, 4)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mcolour1, $GUI_GR_NOBKCOLOR)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 600, 0)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 585, 15)
GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 585, 0)
GUICtrlSetGraphic(-1, $GUI_GR_LINE, 600, 15)
$Graphic2 = GUICtrlCreateGraphic(0, 325, 605, 80)
GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mColour2, $mcolour2)
GUICtrlSetGraphic(-1, $GUI_GR_RECT, 0, 0, 600, 75)
if $mflag = 1 Then
$ok = GUICtrlCreateLabel("           ok", 200, 200, 200, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mcolour1)
Else
if $mflag = 2 Then
$yes = GUICtrlCreateLabel("          yes", 90, 200, 200, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mColour1)
$no = GUICtrlCreateLabel("           no", 310, 200, 200, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
GUICtrlSetColor(-1, $mColour1)
Else
If $mflag = 3 Then
$retry = GUICtrlCreateLabel("        retry", 10, 200, 180, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mColour1)
$abort = GUICtrlCreateLabel("        abort", 210, 200, 180, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mColour1)
$ignore = GUICtrlCreateLabel("       ignore", 410, 200, 180, 35)
GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro")
GUICtrlSetBkColor(-1, $mColour2)
guictrlsetcolor(-1,$mColour1)
EndIf
EndIf
EndIf
$Label2 = GUICtrlCreateLabel($mtitle, 20, 15, 560, 50)
GUICtrlSetFont(-1, 28, 400, 0, "Impact")
GUICtrlSetColor(-1, $mColour1)
GUICtrlSetBkColor(-1,$mColour2)
$Label3 = GUICtrlCreateLabel($mline1, 100, 100, 400, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, $mColour2)
$Label4 = GUICtrlCreateLabel($mline2, 100, 125, 400, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, $mColour2)
$Label5 = GUICtrlCreateLabel($mline3, 100, 150, 600, 25)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, $mColour2)
GUISetState(@SW_SHOW)
if $mflag = 1 Then
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_PRIMARYDOWN
             Drag()
Case $exit
GUIDelete($msgboxgui)
Global $output = 0
ExitLoop
Case $ok
Global $output = 1
GUIDelete($msgboxgui)
ExitLoop
;Case $msgboxgui
EndSwitch
WEnd
Else
if $mflag = 2 Then
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_PRIMARYDOWN
             Drag()
Case $exit
GUIDelete($msgboxgui)
Global $output = 0
ExitLoop
     Case $yes
Global $output = 2
GUIDelete($msgboxgui)
ExitLoop
Case $no
Global $output = 3
GUIDelete($msgboxgui)
ExitLoop
; Case $msgboxgui
EndSwitch
WEnd
Else
if $mflag = 3 then
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_PRIMARYDOWN
             Drag()

Case $exit
GUIDelete($msgboxgui)
Global $output = 0
ExitLoop
Case $retry
Global $output = 4
GUIDelete($msgboxgui)
ExitLoop
Case $ignore
Global $output = 6
GUIDelete($msgboxgui)
ExitLoop
case $abort
Global $output = 5
GUIDelete($msgboxgui)
ExitLoop
     ;Case $msgboxgui
EndSwitch
WEnd
EndIf
EndIf
EndIf
EndFunc
Func Drag()
     dllcall("user32.dll","int","ReleaseCapture")
     dllcall("user32.dll","int","SendMessage","hWnd", $msgboxgui,"int",$WM_NCLBUTTONDOWN,"int", $HTCAPTION,"int", 0)
EndFunc

msgbox++.au3

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Sorry didn't know about the pm (don't use forums much)

Edited by sycam0inc

All my projects live on github

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

LOL. Perhaps you should send him a PM, and it's not very polite to interpellate people like that.

If some of them are interested by your project, they will show up and answer on the topic in question.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Please don't use the Global keyword within a function.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0