Mohit 0 Posted September 28, 2010 See i created a pic with this control. But i want to update the pic with other pic when i press the other buttons that i created..... Share this post Link to post Share on other sites
wolf9228 65 Posted September 28, 2010 See i created a pic with this control. But i want to update the pic with other pic when i press the other buttons that i created..... #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("My GUI picture", 350, 300, -1, -1, $WS_SIZEBOX + $WS_SYSMENU) $Button_1 = GUICtrlCreateButton("Update", 10, 10, 100,40) $CtrlId = GUICtrlCreatePic("C:\Image1.bmp", 70, 100, 200, 50) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 UpdatePicCtrl($CtrlId,"C:\Image2.bmp", 70, 150, 200, 50) EndSelect WEnd Func UpdatePicCtrl($CtrlId,$ImageFileName,$left,$top ,$width ,$height ) GUICtrlSetPos ($CtrlId, $left,$top ,$width ,$height ) GUICtrlSetImage ($CtrlId,$ImageFileName) EndFunc صرح السماء كان هنا Share this post Link to post Share on other sites
Mohit 0 Posted September 28, 2010 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("My GUI picture", 350, 300, -1, -1, $WS_SIZEBOX + $WS_SYSMENU) $Button_1 = GUICtrlCreateButton("Update", 10, 10, 100,40) $CtrlId = GUICtrlCreatePic("C:\Image1.bmp", 70, 100, 200, 50) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 UpdatePicCtrl($CtrlId,"C:\Image2.bmp", 70, 150, 200, 50) EndSelect WEnd Func UpdatePicCtrl($CtrlId,$ImageFileName,$left,$top ,$width ,$height ) GUICtrlSetPos ($CtrlId, $left,$top ,$width ,$height ) GUICtrlSetImage ($CtrlId,$ImageFileName) EndFunc I will try that..... Share this post Link to post Share on other sites
Mohit 0 Posted September 29, 2010 this doesn't work pls help. Share this post Link to post Share on other sites