AJ6594 Posted December 31, 2008 Share Posted December 31, 2008 I need 4 GUI's on my desktop and I want them to display a number (obtained from a string in a different func).... then update when the number changes. Here is what I have, but I am sure this is poorly coded.... $1 = GUICreate("1", 150, 50, 42, 1100,$WS_POPUP,$WS_EX_TOPMOST) GUISetState(@SW_SHOW) ; display the GUI GUICtrlCreateLabel($number1, 0, 0) $2 = GUICreate("2", 150, 50, 842, 1100,$WS_POPUP,$WS_EX_TOPMOST) GUISetState(@SW_SHOW) ; display the GUI GUICtrlCreateLabel($number2, 0, 0) $3 = GUICreate("3", 150, 50, 1642, 1100,$WS_POPUP,$WS_EX_TOPMOST) GUISetState(@SW_SHOW) ; display the GUI GUICtrlCreateLabel($number3, 0, 0) $4 = GUICreate("4", 150, 50, 2442, 1100,$WS_POPUP,$WS_EX_TOPMOST) GUISetState(@SW_SHOW) ; display the GUI GUICtrlCreateLabel($number4, 0, 0) While 1 ; number1 - 4 are globals ; current_number() returns the current number If $number1 <> current_number1() Then $number1 = current_number1() GUISwitch($1) GUICtrlCreateLabel($number1, 30, 30) ; this is how I update the GUI EndIf If $number2 <>current_ number2() Then $number2 = current_number2() GUISwitch($2) GUICtrlCreateLabel($number2, 30, 30) EndIf If $number3 <> current_number3() Then $number3 = current_number3() GUISwitch($3) GUICtrlCreateLabel($number3, 30, 30) EndIf If $number4 <> current_number4() Then $number4 = current_number4() GUISwitch($4) GUICtrlCreateLabel($number4, 30, 30) EndIf WEnd Sometimes the number fails to update in one or more GUI's. Suggestions welcome. Link to comment Share on other sites More sharing options...
rasim Posted January 1, 2009 Share Posted January 1, 2009 @AJ6594Your example does not work. If you want to get the help, post a small and working example to duplicate your problem. Also use the code tags. 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