#include #include #include #include #include #include #include #include #include #include #include #include #include #include ; ----------------------------------------------------------------------------------------- _GDIPlus_Startup() Global Const $SC_DRAGMOVE = 0xF012 $hPNG1 = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\PNG1.png") $hPNG2 = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\PNG2.png") $iw1 = _GDIPlus_ImageGetWidth($hPNG1) $ih1 = _GDIPlus_ImageGetHeight($hPNG1) $iw2 = _GDIPlus_ImageGetWidth($hPNG2) $ih2 = _GDIPlus_ImageGetHeight($hPNG2) $hGUIPNG1 = GUICreate("", $iw1, $ih1, @DesktopWidth-$iW1, @DesktopHeight-($iH1*1.2), -1, BitOR($WS_EX_LAYERED, $WS_EX_TOOLWINDOW)) _SetBitmap($hGUIPNG1, $hPNG1, 255, $iw1, $ih1) $hGUIPNG2 = GUICreate("", $iw2, $ih2, -1, -1, -1, $WS_EX_LAYERED) _SetBitmap($hGUIPNG2, $hPNG2, 255, $iw2, $ih2) Func _WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam) _SendMessage($hGUIPNG1, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) EndFunc ;==>_WM_LBUTTONDOWN Func _SetBitmap($hGUI, $hImage, $iOpacity, $n_width = 200, $n_height = 200) 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", $n_width) DllStructSetData($tSize, "Y", $n_height) $tSource = DllStructCreate($tagPOINT) $pSource = DllStructGetPtr($tSource) $tBlend = DllStructCreate($tagBLENDFUNCTION) $pBlend = DllStructGetPtr($tBlend) DllStructSetData($tBlend, "Alpha", $iOpacity) DllStructSetData($tBlend, "Format", 1) _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 ;==>_SetBitmap ; ---------------------------------- GUISetState(@SW_SHOW, $hGUIPNG1) GUISetState(@SW_SHOW, $hGUIPNG2) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE