ShelbySue Posted March 13, 2008 Share Posted March 13, 2008 I am trying to draw on a picture. Is there anyway to change the display order of these controls? I also was hoping to draw on a label control, but that, also, seems to have display order priority. I have included a sample that draws a graphic control both before and after picture to eliminate the question about WHEN you create the control. (Pauses inserted for clarification.) expandcollapse popup#include <GuiConstants.au3> $p1 = "C:\Documents and Settings\...\1.jpg" if not FileExists($p1) Then msgbox(0,"","File Missing") Exit endif $total_width = 507 $total_hi = 516 $left = 75 $top = 5 $g2 = GuiCreate("MyGUI", $total_width, $total_hi,-1, -1 ,-1,$WS_EX_TOPMOST) GuiSetState() $b4 = GUICtrlCreateGraphic(5,50,125,200) GUICtrlSetBkColor($b4,0x00ff00) GUICtrlSetColor($b4,0xff0000) sleep(1000) $Pic_1 = GuiCtrlCreatePic($p1, $left, $top, 150, 260) sleep(1000) $b5 = GUICtrlCreateGraphic(200,50,125,200) GUICtrlSetBkColor($b5,0x00fffff) GUICtrlSetColor($b5,0xff0000) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Exit Link to comment Share on other sites More sharing options...
martin Posted March 13, 2008 Share Posted March 13, 2008 I am trying to draw on a picture. Is there anyway to change the display order of these controls? I also was hoping to draw on a label control, but that, also, seems to have display order priority. I have included a sample that draws a graphic control both before and after picture to eliminate the question about WHEN you create the control. (Pauses inserted for clarification.) expandcollapse popup#include <GuiConstants.au3> $p1 = "C:\Documents and Settings\...\1.jpg" if not FileExists($p1) Then msgbox(0,"","File Missing") Exit endif $total_width = 507 $total_hi = 516 $left = 75 $top = 5 $g2 = GuiCreate("MyGUI", $total_width, $total_hi,-1, -1 ,-1,$WS_EX_TOPMOST) GuiSetState() $b4 = GUICtrlCreateGraphic(5,50,125,200) GUICtrlSetBkColor($b4,0x00ff00) GUICtrlSetColor($b4,0xff0000) sleep(1000) $Pic_1 = GuiCtrlCreatePic($p1, $left, $top, 150, 260) sleep(1000) $b5 = GUICtrlCreateGraphic(200,50,125,200) GUICtrlSetBkColor($b5,0x00fffff) GUICtrlSetColor($b5,0xff0000) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Exit The style $WS_CLIPSIBLINGS will help with some of what you want. expandcollapse popup#include <GuiConstants.au3> $p1 = "D:\My Documents\images\laburnum.jpg" if not FileExists($p1) Then msgbox(0,"","File Missing") Exit endif $total_width = 507 $total_hi = 516 $left = 75 $top = 5 $g2 = GuiCreate("MyGUI", $total_width, $total_hi,-1, -1 ,-1,$WS_EX_TOPMOST) GuiSetState() $b4 = GUICtrlCreateGraphic(5,50,125,200) GUICtrlSetBkColor($b4,0x00ff00) GUICtrlSetColor($b4,0xff0000) sleep(1000) ;$Pic_1 = GuiCtrlCreatePic($p1, $left, $top, 150, 260,$WS_CLIPSIBLINGS) sleep(1000) $b5 = GUICtrlCreateGraphic(200,50,125,200) GUICtrlSetBkColor($b5,0x00fffff) GUICtrlSetColor($b5,0xff0000) $Pic_1 = GuiCtrlCreatePic($p1, $left, $top, 150, 260,$WS_CLIPSIBLINGS) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Exit Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. 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