Jump to content

[Resolved] Anygui/Windows


fxg4758
 Share

Recommended Posts

Hi. Can someone tell if have sucess in create a button on a child WindowsForms10.window. In the first window, i can put buttons, but in the next windows what i think will be child, nothing happens. Can anybody helped me? Thanks.

Edited by fxg4758
Link to comment
Share on other sites

This is a script in which the child window has a button..

#include <GUIConstants.au3>
#include<WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Parent", 276, 206, 193, 125)
$Group1 = GUICtrlCreateGroup("Group1", 0, 0, 273, 201)
$Label1 = GUICtrlCreateLabel("This is a parent gui..", 88, 40, 99, 17)
$Button1 = GUICtrlCreateButton("Child", 64, 136, 145, 33, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
        child() 
    EndSwitch
WEnd


Func child()
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Child", 276, 206, 193, 125,"","",$Form1)
$Group2 = GUICtrlCreateGroup("Group1", 0, 0, 273, 201)
$Label2 = GUICtrlCreateLabel("This is a child gui..", 88, 40, 91, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button2 = GUICtrlCreateButton("EXIT", 64, 136, 145, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        case $Button2
            Exit

    EndSwitch
WEnd
[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
Link to comment
Share on other sites

Could you please be more specific in your problem?

Can you tell us:

  • What exactly you want to achieve-

    • Applications you are automating
    • Also use as much detail as possible
  • What you current code is (please post it if possible)

So we can go about helping.

Thanks,

Brett

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...