Jump to content

Flashing GUI


Recommended Posts

Hi Guys

Can you please help me fixing the gui i have created.

Everytime i run this gui it creates all the tabs and then comes back to the first and i have put the focus on to the first tab.

I dont know what is the mistake i am doind that it should not flash like this.

Cant i have the focus on the first tab before it creates the other tabs.

Flashing gui doesnt look nice.

Thanks

Here is the code.

CODE
#include <GUIConstants.au3>

#include <IE.au3>

#include <string.au3>

#include <GUIComboBox.au3>

#include <GuiTab.au3>

#include <GuiListView.au3>

#include <GuiTab.au3>

#Include <GuiStatusBar.au3>

#include <Date.au3>

#include "Misc.au3"

#include <Array.au3>

AutoItSetOption ( "TrayAutoPause", 0 )

AutoItSetOption("SendCapslockMode",0)

Opt("TrayIconDebug", 1)

Opt("WinTitleMatchMode", 2)

Opt("RunErrorsFatal", 0) ; set run error to silent @error = 1

TrayCreateItem("")

$releaseitem = TrayCreateItem("Release notes")

TrayCreateItem("")

$aboutitem = TrayCreateItem("About")

TraySetState()

Global $old_string = ""

Global $defaultstatus = _Now()

$Q = 20 ; Top

$E = 90 ; Left

$W = 12 ; Group Left

$S = 130

$GUI = GUICreate("My GUI", 475,860, 750,20,$WS_TABSTOP+$WS_MINIMIZEBOX+$WS_CAPTION+$ES_MULTILINE+$ES_WANTRETURN)

GUISetBkColor (0xE0FFFF)

GUISetState(@SW_SHOW)

Global $StartDate

DRAW_GUI()

Func DRAW_GUI()

global $tab=GUICtrlCreateTab (0,0, 470,860)

$tab0=GUICtrlCreateTabitem ("FIrst TAB")

;~ _GUICtrlTab_SetBkColor($GUI, $tab, 0xE0FFFF)

$group_C_Hist = GUICtrlCreateGroup("History", $W, 60, 350, 120)

Global $myedit_C=GUICtrlCreateEdit (" edit information"& @CRLF, 20, 80, 310, 85,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_C = GUICtrlCreateButton("Copy", 365, 90, 90, 25)

Global $btn_History = GUICtrlCreateButton("History", 365, 120, 90, 25)

Global $btn_Navi = GUICtrlCreateButton("Navigate ", 365, 150, 90, 25)

GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group

Global $btn_refresh = GUICtrlCreateButton("Refresh", 130, 775, 65, 25)

Global $btn_Reset = GUICtrlCreateButton("Reset", 210, 775, 65, 25)

$group1 = GUICtrlCreateGroup("group1", $W, 190, 350, 200)

GUICtrlCreateLabel("No", $Q, 205)

Global $NameReport1input1 = GUICtrlCreateInput("", $E, 205, 85, 18)

GUICtrlCreateLabel("ES", $Q, 225)

Global $NameReport1input2 = GUICtrlCreateInput("", $E, 225, 85, 18)

GUICtrlCreateLabel("E", $Q, 245)

Global $NameReport1input3 = GUICtrlCreateInput("", $E, 245, 85, 18)

GUICtrlCreateLabel("Line 1:", $Q, 305)

Global $NameReport1input6 = GUICtrlCreateInput("0x", $E, 305, 85, 18)

GUICtrlCreateLabel("Line 2:", 190, 305)

Global $NameReport1input7 = GUICtrlCreateInput("0x", 230, 305, 85, 18)

GUICtrlCreateLabel("Results:", $Q, 325)

Global $myedit=GUICtrlCreateEdit ("Results x 3"& @CRLF &"Not Received" & @CRLF, $E, 325, 250, 60,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group

Global $checkCN = GUICtrlCreateCheckbox ("Don't ", 365, 250, 70, 20)

global $btn_ON = GUICtrlCreateButton("Copy", 365, 270, 90, 25)

global $btn_read_on = GUICtrlCreateButton("Get", 365, 300, 90, 25)

$group3 = GUICtrlCreateGroup("group2", $W, 400, 350, 120)

Global $myedit_2=GUICtrlCreateEdit (" Tool Shows ", 20, 420, 310, 80,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_IT = GUICtrlCreateButton("Copy", 365, 435, 90, 25)

Global $btn_open_IT = GUICtrlCreateButton("Open IT", 365, 465, 90, 25)

GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group

$group3 = GUICtrlCreateGroup("group3", $W, 550, 350, 120)

Global $myedit_3=GUICtrlCreateEdit ("Node subscriber brief for same time shows no evidence of a network fault." , 20, 575, 310, 80,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_3 = GUICtrlCreateButton("Copy", 365, 600, 90, 25)

GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group;~ NEXT TAB

$tab1=GUICtrlCreateTabitem ("ES- ")

;~ _GUICtrlTab_SetBkColor($GUI, $tab, 0xE0FFFF)

$group1 = GUICtrlCreateGroup("group5", $W, 35, 350, 350)

GUICtrlCreateLabel("ES", $Q, 53)

Global $ES1 = GUICtrlCreateInput("", $S, 53, 85, 18)

Global $EM = GUICtrlCreateLabel("EM - ", 265, 50, 85, 18)

GUICtrlCreateLabel("Time:", $Q, 73)

Global $ES2 = GUICtrlCreateInput("", $S, 73, 120, 18)

Global $EC_CF = GUICtrlCreateLabel("CF", 265, 70, 85, 18)

GUICtrlCreateLabel("Level: ", $Q, 115)

Global $ES4 = GUICtrlCreateInput("0", $S, 115, 85, 18)

Global $EC_SA = GUICtrlCreateLabel("SA", 265, 110, 120, 18)

GUICtrlCreateLabel("time:", $Q, 155)

Global $ES6 = GUICtrlCreateInput("0", $S, 155, 85, 18)

GUICtrlCreateLabel("Dead :", $Q, 175)

Global $ES7 = GUICtrlCreateInput("0", $S, 175, 85, 18)

GUICtrlCreateLabel("Hello :", $Q, 195)

Global $ES8 = GUICtrlCreateInput("0", $S, 195, 85, 18)

GUICtrlCreateLabel("# : ", $Q, 255)

Global $ES11 = GUICtrlCreateInput("0", $S, 255, 85, 18)

GUICtrlCreateLabel("Refresh :", $Q, 275)

Global $ES12 = GUICtrlCreateInput("0", $S, 275, 85, 18)

GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group

Global $btn_EC = GUICtrlCreateButton("Copy", 365, 190, 90, 25)

$group_group6 = GUICtrlCreateGroup("hello2", $W, 390, 350, 100)

Global $myedit_group6=GUICtrlCreateEdit ("No Evidence "& @CRLF, 20, 405, 335, 80,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_group6 = GUICtrlCreateButton("COPY", 365, 430, 90, 25)

GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group

$group_hello = GUICtrlCreateGroup("hello3", $W, 495, 350, 100)

Global $myedit_hello=GUICtrlCreateEdit ("Line.", 20, 510, 335, 80,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_hello = GUICtrlCreateButton("COPY", 365, 530, 90, 25)

GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group

;~ Group

$group_ = GUICtrlCreateGroup(" ", $W, 600, 350, 230)

GUICtrlCreateLabel("Up:", $Q, 680)

Global $SC2 = GUICtrlCreateInput("", $S, 680, 85, 18)

GUICtrlCreateLabel("Up", $Q, 700)

Global $SC3 = GUICtrlCreateInput("", $S, 700, 85, 18)

GUICtrlCreateLabel("Down", $Q, 720)

Global $SC4 = GUICtrlCreateInput("", $S, 720, 85, 18)

GUICtrlCreateLabel("SN: ", $Q, 740)

Global $SC5 = GUICtrlCreateInput("", $S, 740, 85, 18)

GUICtrlCreateLabel("Hit:", $Q, 760)

Global $SC6 = GUICtrlCreateInput("", $S, 760, 85, 18)

Global $myedit_SC2 = GUICtrlCreateEdit ("Hours", 130, 615, 160, 40,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_SC = GUICtrlCreateButton("COPY", 365, 660, 90, 25)

Global $btn_open_SC = GUICtrlCreateButton("Read ", 365, 690, 90, 25)

;~ Global $btn_open_ _test = GUICtrlCreateButton("Test", 365, 720, 50, 25)

GUICtrlCreateGroup("", -99, -99, 1, 1)

;~ Customer Contact GROUP

GUICtrlCreateGroup("", -99, -99, 1, 1) ;close group

;~ $tab_test=GUICtrlCreateTabitem ("Test")

;~ GUICtrlCreateTabitem ("")

GUICtrlCreateTabitem ("")

;~ TAB Notepad

$tab2=GUICtrlCreateTabitem ("Notepad")

;~ _GUICtrlTab_SetBkColor($GUI, $tab, 0xE0FFFF)

$group_Con = GUICtrlCreateGroup("Contact", $W, 30, 350, 90)

Global $myedit_Con=GUICtrlCreateEdit (""& @CRLF, 20, 45, 335, 65,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_Con = GUICtrlCreateButton("COPY", 365, 65, 90, 25)

$group_Notepad = GUICtrlCreateGroup("Notepad", $W, 130, 430, 625)

Global $myedit_NOTEPAD=GUICtrlCreateEdit ("** ****************************************************************************************************

***8"&@CRLF, 20, 145, 410, 600,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_NOTEPAD = GUICtrlCreateButton("Copy Notepad", 130, 790, 80, 25)

Global $btn_NOTEPAD_RESET = GUICtrlCreateButton("Reset Notepad", 220, 790, 80, 25)

GUICtrlCreateTabitem ("")

$tab3=GUICtrlCreateTabitem ("TAB 4")

;~ _GUICtrlTab_SetBkColor($GUI, $tab, 0xE0FFFF)

Global $ie_no = _IECreateEmbedded ()

$GUIActiveX = GUICtrlCreateObj($ie_no, 5, 40, 460, 360)

Global $CP_embed = _IECreateEmbedded ()

$GUIActiveX1 = GUICtrlCreateObj($CP_embed, 5,410,460,360)

GUICtrlCreateTabitem ("")

$tab4=GUICtrlCreateTabitem ("Tab")

;~ _GUICtrlTab_SetBkColor($GUI, $tab, 0xE0FFFF)

Global $ie_N = _IECreateEmbedded ()

$GUIActiveX = GUICtrlCreateObj($ie_N, 5, 25, 460, 290)

Global $ie_PT = _IECreateEmbedded ()

$GUIActiveX = GUICtrlCreateObj($ie_PT, 5,320,460,290)

Global $ie_noc = _IECreateEmbedded ()

$GUIActiveX = GUICtrlCreateObj($ie_noc, 5,615,460,240)

GUICtrlCreateTabitem ("")

$tab5=GUICtrlCreateTabitem ("TAB5")

;~ _GUICtrlTab_SetBkColor($GUI, $tab, 0xE0FFFF)

;~

_IEErrorHandlerRegister ()

Global $Links_IE = _IECreateEmbedded ()

$GUIActiveX = GUICtrlCreateObj($Links_IE, 5, 25, 460, 600)

_IENavigate ($Links_IE, "about:blank")

;~ $Links_IE = _IECreate ()

;~ _IEDocInsertHTML($oBody, "<h2>This HTML is inserted Before End</h2>", "beforeend")

Body_write()

GUICtrlCreateTabitem ("")

$tab6=GUICtrlCreateTabitem ("hyperLINKS")

;~ _GUICtrlTab_SetBkColor($GUI, $tab, 0xE0FFFF)

$group_Notepad = GUICtrlCreateGroup("Notepad", $W, 130, 430, 625)

Global $myedit_NOTEPAD=GUICtrlCreateEdit ("** ****************************************************************************************************

***8"&@CRLF, 20, 145, 410, 600,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_NOTEPAD = GUICtrlCreateButton("Copy Notepad", 130, 790, 80, 25)

Global $btn_NOTEPAD_RESET = GUICtrlCreateButton("Reset Notepad", 220, 790, 80, 25)

$group_Notepad = GUICtrlCreateGroup("Notepad", $W, 130, 430, 625)

Global $myedit_NOTEPAD=GUICtrlCreateEdit ("** ****************************************************************************************************

***8"&@CRLF, 20, 145, 410, 600,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_NOTEPAD = GUICtrlCreateButton("Copy Notepad", 130, 790, 80, 25)

Global $btn_NOTEPAD_RESET = GUICtrlCreateButton("Reset Notepad", 220, 790, 80, 25)

$group_Notepad = GUICtrlCreateGroup("Notepad", $W, 130, 430, 625)

Global $myedit_NOTEPAD=GUICtrlCreateEdit ("** ****************************************************************************************************

***8"&@CRLF, 20, 145, 410, 600,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_NOTEPAD = GUICtrlCreateButton("Copy Notepad", 130, 790, 80, 25)

Global $btn_NOTEPAD_RESET = GUICtrlCreateButton("Reset Notepad", 220, 790, 80, 25)

$group_Notepad = GUICtrlCreateGroup("Notepad", $W, 130, 430, 625)

Global $myedit_NOTEPAD=GUICtrlCreateEdit ("** ****************************************************************************************************

***8"&@CRLF, 20, 145, 410, 600,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_NOTEPAD = GUICtrlCreateButton("Copy Notepad", 130, 790, 80, 25)

Global $btn_NOTEPAD_RESET = GUICtrlCreateButton("Reset Notepad", 220, 790, 80, 25)

$group_Notepad = GUICtrlCreateGroup("Notepad", $W, 130, 430, 625)

Global $myedit_NOTEPAD=GUICtrlCreateEdit ("** ****************************************************************************************************

***8"&@CRLF, 20, 145, 410, 600,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_NOTEPAD = GUICtrlCreateButton("Copy Notepad", 130, 790, 80, 25)

Global $btn_NOTEPAD_RESET = GUICtrlCreateButton("Reset Notepad", 220, 790, 80, 25)

GUICtrlCreateTabitem ("")

$tab7=GUICtrlCreateTabitem ("Tab7")

$group_Notepad = GUICtrlCreateGroup("Notepad", $W, 130, 430, 625)

Global $myedit_NOTEPAD=GUICtrlCreateEdit ("** ****************************************************************************************************

***8"&@CRLF, 20, 145, 410, 600,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_NOTEPAD = GUICtrlCreateButton("Copy Notepad", 130, 790, 80, 25)

Global $btn_NOTEPAD_RESET = GUICtrlCreateButton("Reset Notepad", 220, 790, 80, 25)

$group_Notepad = GUICtrlCreateGroup("Notepad", $W, 130, 430, 625)

Global $myedit_NOTEPAD=GUICtrlCreateEdit ("** ****************************************************************************************************

***8"&@CRLF, 20, 145, 410, 600,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_NOTEPAD = GUICtrlCreateButton("Copy Notepad", 130, 790, 80, 25)

Global $btn_NOTEPAD_RESET = GUICtrlCreateButton("Reset Notepad", 220, 790, 80, 25)

$group_Notepad = GUICtrlCreateGroup("Notepad", $W, 130, 430, 625)

Global $myedit_NOTEPAD=GUICtrlCreateEdit ("** ****************************************************************************************************

***8"&@CRLF, 20, 145, 410, 600,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_NOTEPAD = GUICtrlCreateButton("Copy Notepad", 130, 790, 80, 25)

Global $btn_NOTEPAD_RESET = GUICtrlCreateButton("Reset Notepad", 220, 790, 80, 25)

$group_Notepad = GUICtrlCreateGroup("Notepad", $W, 130, 430, 625)

Global $myedit_NOTEPAD=GUICtrlCreateEdit ("** ****************************************************************************************************

***8"&@CRLF, 20, 145, 410, 600,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_NOTEPAD = GUICtrlCreateButton("Copy Notepad", 130, 790, 80, 25)

Global $btn_NOTEPAD_RESET = GUICtrlCreateButton("Reset Notepad", 220, 790, 80, 25)

$group_Notepad = GUICtrlCreateGroup("Notepad", $W, 130, 430, 625)

Global $myedit_NOTEPAD=GUICtrlCreateEdit ("** ****************************************************************************************************

***8"&@CRLF, 20, 145, 410, 600,$ES_AUTOVSCROLL+$WS_VSCROLL+$ES_AUTOHSCROLL+$WS_HSCROLL+$ES_MULTILINE+$ES_WANTRETURN)

Global $btn_NOTEPAD = GUICtrlCreateButton("Copy Notepad", 130, 790, 80, 25)

Global $btn_NOTEPAD_RESET = GUICtrlCreateButton("Reset Notepad", 220, 790, 80, 25)

;~ _GUICtrlTab_SetBkColor($GUI, $tab, 0xE0FFFF)

GUICtrlCreateTabitem ("")

$tab6=GUICtrlCreateTabitem ("Tab8")

;~ _GUICtrlTab_SetBkColor($GUI, $tab, 0xE0FFFF)

GUICtrlCreateTabitem ("")

;~ Focus on First TAB

_GUICtrlTab_SetCurFocus ($tab, 0)

EndFunc

Func Body_write()

$sHTML = ""

$sHTML &= "<HTML>" & @CR

$sHTML &= "<HEAD>" & @CR

$sHTML &= "<TITLE>_IE_Example('frameset')</TITLE>" & @CR

$sHTML &= "<STYLE TYPE='text/css'>"& @CR

$sHTML &= "<!--A" & @CR

$sHTML &= "{text-decoration:none}"& @CR

$sHTML &= "-->"& @CR

$sHTML &= "</STYLE>" & @CR

$sHTML &= "</HEAD>" & @CR

EndFunc

While 1

$msg = TrayGetMsg()

$msg1 = GUIGetMsg()

Select

Case $msg = $aboutitem

about()

Case $msg = $releaseitem

release()

Case $msg1 = $GUI_EVENT_CLOSE

$Sure = MsgBox(1,"Sure", "Do you want to Exit")

IF $Sure = 1 Then

If ProcessExists("Extra_Checks.exe") Then

ProcessClose("Extra_Checks.exe")

EndIf

Exit

EndIf

EndSelect

sleep(5)

WEnd

Edited by SmOke_N
Link to comment
Share on other sites

Hi,

but your code in this order

DRAW_GUI()

GUISetState(@SW_SHOW)

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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...