FeReNGi Posted September 8, 2006 Posted September 8, 2006 Can i move the windows from next function ? SplashScreen("Install", "This Program") Func SplashScreen($SplashText, $ProgramText) Local $Strlen = StringLen($ProgramText) Local $Font="Comic Sans MS" GUICreate("SplashScreen", 550, 130, -1, 1, $WS_POPUP, BitOR($WS_EX_DLGMODALFRAME, $WS_EX_TOPMOST,$WS_EX_TOOLWINDOW, $WS_EX_CLIENTEDGE )) ; GUICtrlCreatePic(@TempDir & "\Header.JPG",10, 10, 0, 0, 0) GUICtrlCreateLabel($ProgramText, 500 - ($Strlen*10 ), 25, 120 + ($Strlen*10) , 30) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont (-1, 16, 400, 2, $Font) $GuiSplashText = GUICtrlCreateLabel($Splashtext, 20, 90, 510, -1) GUICtrlSetFont (-1, 12, 400, 4, $Font) GUISetState(@SW_SHOW) EndFunc Now i can't move the window ServicesPE|LoadVMDK
GaryFrost Posted September 8, 2006 Posted September 8, 2006 (edited) #include <GuiConstants.au3> Global $lbl_ptext $gui = SplashScreen("Install", "This Program") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $lbl_ptext Or $msg = $GUI_EVENT_PRIMARYDOWN _Drag($gui) EndSelect WEnd Func SplashScreen($SplashText, $ProgramText) Local $Strlen = StringLen($ProgramText) Local $Font="Comic Sans MS" Local $gui = GUICreate("SplashScreen", 550, 130, -1, 1, $WS_POPUP, BitOR($WS_EX_DLGMODALFRAME, $WS_EX_TOPMOST,$WS_EX_TOOLWINDOW, $WS_EX_CLIENTEDGE )) ; GUICtrlCreatePic(@TempDir & "\Header.JPG",10, 10, 0, 0, 0) $lbl_ptext = GUICtrlCreateLabel($ProgramText, 500 - ($Strlen*10 ), 25, 120 + ($Strlen*10) , 30) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont (-1, 16, 400, 2, $Font) $GuiSplashText = GUICtrlCreateLabel($Splashtext, 20, 90, 510, -1) GUICtrlSetFont (-1, 12, 400, 4, $Font) GUISetState(@SW_SHOW) Return $gui EndFunc Func _Drag ($h_gui) DllCall("user32.dll", "int", "ReleaseCapture") DllCall("user32.dll", "int", "SendMessage", "hWnd", $h_gui, "int", 0xA1, "int", 2, "int", 0) EndFunc ;==>_Drag Edited September 8, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
FeReNGi Posted September 11, 2006 Author Posted September 11, 2006 (edited) This doesn't work in the time i want to do something else. The splashscreen should be there when other code is executed and also i like to move this window in the meantime. Is this possibel ? While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $lbl_ptext Or $msg = $GUI_EVENT_PRIMARYDOWN _Drag($gui) Case Else code to be executed EndSelect WEnd Edited September 11, 2006 by FeReNGi ServicesPE|LoadVMDK
GaryFrost Posted September 11, 2006 Posted September 11, 2006 expandcollapse popup#include <GuiConstants.au3> Global $lbl_ptext, $GuiSplashText $gui = SplashScreen("Install", "This Program") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $lbl_ptext Or $msg = $GUI_EVENT_PRIMARYDOWN _Drag($gui) Case $msg = $GuiSplashText MsgBox(0,"Doing", "something else") EndSelect WEnd Func SplashScreen($SplashText, $ProgramText) Local $Strlen = StringLen($ProgramText) Local $Font="Comic Sans MS" Local $gui = GUICreate("SplashScreen", 550, 130, -1, 1, $WS_POPUP, BitOR($WS_EX_DLGMODALFRAME, $WS_EX_TOPMOST,$WS_EX_TOOLWINDOW, $WS_EX_CLIENTEDGE )) ; GUICtrlCreatePic(@TempDir & "\Header.JPG",10, 10, 0, 0, 0) $lbl_ptext = GUICtrlCreateLabel($ProgramText, 500 - ($Strlen*10 ), 25, 120 + ($Strlen*10) , 30) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont (-1, 16, 400, 2, $Font) $GuiSplashText = GUICtrlCreateLabel($Splashtext, 20, 90, 510, -1) GUICtrlSetFont (-1, 12, 400, 4, $Font) GUISetState(@SW_SHOW) Return $gui EndFunc Func _Drag ($h_gui) DllCall("user32.dll", "int", "ReleaseCapture") DllCall("user32.dll", "int", "SendMessage", "hWnd", $h_gui, "int", 0xA1, "int", 2, "int", 0) EndFunc ;==>_Drag carefull with using the case else SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
FeReNGi Posted September 12, 2006 Author Posted September 12, 2006 this works but i have to do something in the splashscreen before the program goes futher. Can this trick not be done by the adlibenable function ? AdlibEnable ('_drag',100) ServicesPE|LoadVMDK
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now