Dilan Posted May 5, 2011 Share Posted May 5, 2011 (edited) Hi ! Anne body can help me Help me to add "tabs" to the PNG form Dialog This is my script . but i cant add Tabs to it.( i add the tabs but not showing)expandcollapse popup#NoTrayIcon #include #include #include #include #include #include #include Opt("MustDeclareVars", 0) @sc Global Const $AC_SRC_ALPHA = 1 Global $old_string = "", $runthis = "" Global $launchDir = @DesktopDir FileInstall("grey.gif",@TempDir &"\grey.gif",1) FileInstall("Skin.png",@TempDir &"\Skin.png",1) _GDIPlus_Startup() $pngSrc = @TempDir &"\Skin.png" $hImage = _GDIPlus_ImageLoadFromFile($pngSrc) $width = _GDIPlus_ImageGetWidth($hImage) $height = _GDIPlus_ImageGetHeight($hImage) $GUI = GUICreate("Live", $width, $height, -1, -1, $WS_POPUP, $WS_EX_LAYERED) SetBitmap($GUI, $hImage, 0) GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST") GUISetState() WinSetOnTop($GUI, "", 1) For $i = 0 To 255 Step 10 SetBitmap($GUI, $hImage, $i) Next $controlGui = GUICreate("ControlGUI", $width, $height, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $GUI) GUICtrlCreatePic(@TempDir &"\grey.gif", 0, 0, $width, $height) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateLabel("Welcome", 20, 30, 540, 50) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetColor(-1, 0xFFFFFF) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete($controlGui) For $i = 255 To 0 Step -10 SetBitmap($GUI, $hImage, $i) Next ExitLoop EndSelect WEnd _WinAPI_DeleteObject($hImage) _GDIPlus_Shutdown() Func SetBitmap($hGUI, $hImage, $iOpacity) Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend $hScrDC = _WinAPI_GetDC(0) $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC) $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap) $tSize = DllStructCreate($tagSIZE) $pSize = DllStructGetPtr($tSize) DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth($hImage)) DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage)) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha", $iOpacity) DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA) _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA) _WinAPI_ReleaseDC(0, $hScrDC) _WinAPI_SelectObject($hMemDC, $hOld) _WinAPI_DeleteObject($hBitmap) _WinAPI_DeleteDC($hMemDC) EndFunc Func _ShellExecute($sCmd, $sArg = "", $sFolder = "", $rState = @SW_SHOWNORMAL) $aRet = DllCall("shell32.dll", "long", "ShellExecute", _ "hwnd", 0, _ "string", "", _ "string", $sCmd, _ "string", $sArg, _ "string", $sFolder, _ "int", $rState) If @error Then Return 0 $RetVal = $aRet[0] If $RetVal > 32 Then Return 1 Else Return 0 EndIf EndFuncThanks (I'm sorry about my English)This is the own FilesPng Dialog.zip Edited May 5, 2011 by Dilan Link to comment Share on other sites More sharing options...
smartee Posted May 5, 2011 Share Posted May 5, 2011 hi Dilan,Welcome to the forums Look at Its a great inspiration/start.Hope this helps -smartee Link to comment Share on other sites More sharing options...
Dilan Posted May 5, 2011 Author Share Posted May 5, 2011 Hi ThankZZZZZZZZZ U Link to comment Share on other sites More sharing options...
Dilan Posted May 5, 2011 Author Share Posted May 5, 2011 (edited) How Can Add tabs like that (Image) to my project (own Script in main post) Edited May 5, 2011 by Dilan Link to comment Share on other sites More sharing options...
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