Jump to content

Recommended Posts

Posted

Hi all. I´m starting to work in Autoit and i enjoy a lot. Now, i have a doubt: how i can make a gui over a WindowsForms.SysTabControl32, that already have controls and got tree tabs. I want to do a gui that will stay about that controls on WindowsForms.SysTabControl32, but only show in the active window and if i click in another tab2 or tab3 of WindowsForms.SysTabControl32, the gui must hide until i click in the tab1. Can anyone help me? :) . Thanks for any information.

Posted

fxg4758

This?

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
$buffer = False

$hGUI = GUICreate("GUI Test", 800, 600)

$hTabs = GUICtrlCreateTab(10, 10, 780, 580)
$hTabPage1 = GUICtrlCreateTabItem("Tab 1")
$hTabPage2 = GUICtrlCreateTabItem("Tab 2")
$hTabPage3 = GUICtrlCreateTabItem("Tab 3")
$hTabPage4 = GUICtrlCreateTabItem("Tab 4")

GUICtrlCreateTabItem("")

$hGUI2 = GUICreate("", 745, 520, 25, 60, $WS_POPUP, $WS_EX_MDICHILD, $hGUI)
$cTab = GUICtrlCreateTab(10, 10, 500, 400)

GUICtrlCreateTabItem("Tab 1")
GUICtrlCreateTabItem("Tab 2")
GUICtrlCreateTabItem("")
;GUISetBkColor(0x000000, $hGUI2)

GUISetState(@SW_SHOW, $hGUI)

While 1
    $nMsg = GUIGetMsg()
    Select
        Case $nMsg = $GUI_EVENT_CLOSE
            Exit
        Case GUICtrlRead($hTabs, 1) = $hTabPage3
            If Not $buffer Then
                $buffer = True
                GUISetState(@SW_SHOW, $hGUI2)
                ;GUISwitch($hGUI)
            EndIf
        Case GUICtrlRead($hTabs, 1) = $hTabPage1 Or $hTabPage2 Or $hTabPage3
            If $buffer Then
                $buffer = False
                GUISetState(@SW_HIDE, $hGUI2)
                ;GUISwitch($hGUI)
            EndIf
    EndSelect
WEnd
Posted

Thanks rasim, i already see that code. But want i to know is if i put a gui over WindowsForms.SysTabControl32 (external app), how i can bind the gui to show only in tab1 of thee tabs. I don´t to create a gui with tabs, but work over in a external app with already have a control tab with three controls IDS. Thanks for any help.

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
×
×
  • Create New...