I made a Virtual Scroll Bar like Thing Using Buttons and Graphic(also with Labels ,Pictures, and Buttons)...........
The Problem is when i Drag the Graphic, Label ,Picture, or Button it Dissapers..........
I have Already Tried to set the BK_COLOR of label to Transparent .............
But No luck ,..............
Please Help Me Out................
Code..........::
AutoIt
#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.6.1 Author: Phoenix XL Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Local $sgui=GUICreate('Testing........',500,400,100,100) Local $sBtn[2]=[GUICtrlCreateButton('UP',225,20,50,30),GUICtrlCreateButton('DOWN',225,350,50,30)] Local $sLabel=GUICtrlCreateGraphic(225,70,50,35) GuiCtrlSetState(-1,$GUI_ONTOP) GUICtrlSetBkColor(-1, 0x000000) GUIRegisterMsg($WM_COMMAND,'WM_COMMAND') GUISetState() Local $nMsg,$sPos While $nMsg<>-3 $nMsg=GUIGetMsg() $sPos=ControlGetPos($sgui,'',$sLabel) ConsoleWrite($sPos[1]+$sPos[3]&@CRLF) Switch $nMsg Case $sBtn[0] If $sPos[1]+$sPos[3]<=70+25 Then ContinueLoop ControlMove($sgui,'',$sLabel,$sPos[0],$sPos[1]-1) Case $sBtn[1] If $sPos[1]+$sPos[3]>=345 Then ContinueLoop ControlMove($sgui,'',$sLabel,$sPos[0],$sPos[1]+1) EndSwitch WEnd Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) Local $nID = BitAND($wParam, 0xFFFF),$sMousePos Switch BitShift($wParam, 16) ; message code Case 0,1 ; $STN_CLICKED or Double While 1 $sMousePos=GUIGetCursorInfo($sgui) If Not $sMousePos[2] Then ExitLoop If $sMousePos[1]<=345-35 And $sMousePos[1]>=70-10 Then ControlMove($sgui,'',$sLabel,225,$sMousePos[1]) EndIf WEnd EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND Func _MakeLong($LoWord,$HiWord) Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF)) EndFunc







