Jump to content

Recommended Posts

Hello, i have issues with my code

If not WinSetTrans (line 44.45 - Both, red and yellow), Then not Show Childs                               (--- if Func _BK run on line 6, then does no matter if WinSetTrans, Childs not show !!
if WinSetTrans (line 44.45 - Both, red and yellow) , Then  Show Childs, why NEED WinSetTrans??             (--- if Func _BK run on line 6, then does no matter if WinSetTrans, Childs not show !!
if WinSetTrans Child1(RED) ONLY, then Show Child1(RED)                                                     (--- if Func _BK run on line 6, then does no matter if WinSetTrans, Child not show !!
if WinSetTrans (line 44 Child2(Yellow) ONLY), then Show Child1(RED) & Child2(Yellow), Why show Both ????     (--- if Func _BK run on line 6, then does no matter if WinSetTrans, Childs not show !!

 With $WS_POPUP (and $WS_EX_MDICHILD ) i have not above problems, but i need use $WS_CHILD
 Problems with $WS_POPUP : if change windows resolution (and restore next time), then childs change position on main form
                       : i Need WinSetTrans on all GUIS when fade,with popup i need winsettrans all guis one by one
                        : on minimize,restore Main GUI ,childs not following windows minimize/restore effect

 First i Create  Child1, Second Child2, Why Child1 is above child2 ? (i need child2 above child1, and i don't want create firts the child2 or this is only way???)

#include <GuiConstants.au3>

Global $idButton2,$pp1,$pp2,$bShow = True

$Main_GUI = GUICreate("Main", 1000,500,Default,Default)
;_BK() ;<--------- FAIL

$Child1_GUI = GUICreate("Child1", 700,200, 220, 200, $WS_CHILD+$WS_THICKFRAME,Default, $Main_GUI)
$idButton = GUICtrlCreateButton("RED",25,25,50,30)
GUISetBkColor (0xFF334C, $Child1_GUI ) ; RED

$Child2_GUI = GUICreate("Child2", 700,200, 30, 200,$WS_CHILD, Default, $Main_GUI)
$test = GUICtrlCreateButton("Yellow",10,10,250,20)
GUISetBkColor (0xFFff4C, $Child2_GUI ) ; Yellow

_BK() ;<--------- SUCCES

Func _BK()
    GUISwitch($Main_GUI)
    $pp1 = GUICtrlCreatePic("C:\Program Files (x86)\AutoIt3\Examples\GUI\msoobe.jpg",0,0,1000,500)
    GUICtrlSetState($pp1,$GUI_DISABLE)
    $pp2 = GUICtrlCreatePic("C:\Program Files (x86)\AutoIt3\Examples\GUI\mslogo.jpg",200,100,600,350)
    GUICtrlSetState($pp2,$GUI_DISABLE)
    $idButton2 = GUICtrlCreateButton("Main",0,300,280,30)
    $idButton3 = GUICtrlCreateButton("Main2",0,315,280,30)
EndFunc

GUISetState(@SW_SHOW, $Main_GUI)
GUISetState(@SW_SHOW, $Child1_GUI)
GUISetState(@SW_SHOW, $Child2_GUI)













WinSetTrans($Child1_GUI,"",200) ;RED
WinSetTrans($Child2_GUI,"",100) ; Yellow


while 1
    $iMsg = GUIGetMsg()
    Switch $iMsg
        Case -3
            _Fade($Main_GUI,"out",254)
            Exit

        Case $idButton,$test
            For $i = 254 To 0 Step - 4
                Sleep(10)
                WinSetTrans($Main_GUI,"",$i)
            Next
            For $i = 0 To 254 Step 4
                Sleep(10)
                WinSetTrans($Main_GUI,"",$i)
            Next
        Case $idButton2
            If $bShow = True Then
                GUISetState(@SW_HIDE, $Child2_GUI)
                GUISetState(@SW_HIDE, $Child1_GUI)
                $bShow = False
            Else
                GUISetState(@SW_SHOW, $Child2_GUI)
                GUISetState(@SW_SHOW, $Child1_GUI)
                $bShow = True
            EndIf
    EndSwitch
wend

Func _Fade($hHdl,$InOut,$iMax = 255,$iSpeed = 4)
    If $InOut = "out" Then
        For $i = $iMax To 0 Step - $iSpeed
            Sleep(10)
            WinSetTrans($hHdl,"",$i)
        Next
    Else
        For $i =  0 To $iMax Step $iSpeed
            Sleep(10)
            WinSetTrans($hHdl,"",$i)
        Next
    EndIf
EndFunc

 

Edited by banged

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By therks
      I'm trying to implement a scrolling list of controls. I have it sort of working using the GUIScrollBars_Ex UDF by @Melba23 found here. I also want to be able to tab through the controls, which I have accomplished by adding $WS_EX_CONTROLPARENT to the child GUI. The problem is that with that style applied, the scrollbar doesn't act like a scrollbar, instead it acts as a title bar to the child GUI letting you drag the it around (and you can even "maximize" it by double clicking).
      Any ideas?
      #include <GUIConstants.au3> #include "GUIScrollbars_Ex.au3" $iButtonCount = 30 $hParent = GUICreate('Example', 300, 230) $hChild = GUICreate('', 300, 200, 0, 0, BitOR($WS_CHILD, $WS_TABSTOP), $WS_EX_CONTROLPARENT, $hParent) For $i = 0 To $iButtonCount GUICtrlCreateButton('Button in list', 0, $i*30, 300, 30) Next GUISwitch($hParent) GUICtrlCreateButton('More Buttons', 0, 200, 150, 30) GUICtrlCreateButton('More Buttons', 150, 200, 150, 30) GUISetState(@SW_SHOW, $hParent) GUISetState(@SW_SHOW, $hChild) _GUIScrollbars_Generate($hChild, 100, $iButtonCount * 30+20) While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd  
    • By Skysnake
      I don't often have occasion to use Child GUIs.  I find the multitude of options confusing.
      The example below I made for my own purposes, to have a visual guide to what the various Style and Extended Style options lead to.
      Comments are much appreciated.  This can be extended with many more examples and comments and why certain Styles are to preferred or avoided.  Where certain types of Child GUIs are most suitable etc.
       
      The code is very basic.  It is intended to show GUI Styles, not much else.
      ;~ ******************************************************************** ;~ Author: Skysnake ;~ ;~ Title: Demo various Child Gui options ;~ Updated: 2019.01.03 ;~ ;~ Function: A demo script, demonstrates various style & Extended ;~ style options for Child GUIs ;~ Comments, ideas and suggestions very welcome :) ;~ ;~ ******************************************************************** #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <ColorConstants.au3> #include <Constants.au3> #include <WinAPI.au3> #include <ButtonConstants.au3> #include <MsgBoxConstants.au3> ShowChildGuis() Func ShowChildGuis() Local $guiParent = GUICreate("The Parent GUI", 1200, 700, 0, 0) ;WHLT $idFilemenu = GUICtrlCreateMenu(" &Menu") $ButtonCancel = GUICtrlCreateButton("&Close", 0, 0, 80, 25) GUICtrlSetTip($ButtonCancel, "Click to close all") $ButtonShowChildGui = GUICtrlCreateButton("&Show", 0, 25, 80, 25) GUICtrlSetTip($ButtonShowChildGui, "Click to show a child GUI") ;~ #comments-start --- Toggle this and same code below to show context menu for parent or child Local $idContextmenu = GUICtrlCreateContextMenu() Local $idNewsubmenu = GUICtrlCreateMenu("This is a Context Menu", $idContextmenu) Local $idNewsubmenuText = GUICtrlCreateMenuItem("text", $idNewsubmenu) Local $idContextButton = GUICtrlCreateButton("Context", 0, 50, 80, 25) GUICtrlSetTip($idContextButton, "Right Click to see Context Menu") Local $idButtoncontext = GUICtrlCreateContextMenu($idContextButton) Local $idMenuAbout = GUICtrlCreateMenuItem("This is a Context Menu", $idButtoncontext) Local $idMenuOpen = GUICtrlCreateMenuItem("Open", $idContextmenu) Local $idMenuSave = GUICtrlCreateMenuItem("Save", $idContextmenu) GUICtrlCreateMenuItem("", $idContextmenu) ; separator Local $idMenuInfo = GUICtrlCreateMenuItem("Info", $idContextmenu) ;~ #comments-end --- Toggle this and same code below to show context menu for parent or child Local $DefaultChildGui = GUICreate("Default child gui", 300, 100, 300, 300, Default, Default, $guiParent) ;;;WHLT GUICtrlCreateLabel("Default attributes" & @CRLF & "Cannot move; cannot resize", 0, 0, 500, 200) GUICtrlSetBkColor(-1, $COLOR_aqua) $iStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($DefaultChildGui), $GWL_STYLE) $iExStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($DefaultChildGui), $GWL_EXSTYLE) GUISetStyle(BitOR($iStyle, $WS_VISIBLE), $iExStyle, $DefaultChildGui) Local $gChildGuiwithMenu = GUICreate("A child gui with menu", 300, 100, 50, 100, $WS_VISIBLE, BitOR($WS_EX_WINDOWEDGE, $WS_EX_MDICHILD, $WS_THICKFRAME), $guiParent) ;;;WHLT GUICtrlCreateLabel("Menu" & @CRLF & "Can move; cannot resize", 0, 0, 500, 200) GUICtrlSetBkColor(-1, $COLOR_skyblue) $idFilemenu = GUICtrlCreateMenu(" &File ") Local $idFileMenuItem = GUICtrlCreateMenuItem("An item for the File menu ", $idFilemenu) GUICtrlCreateMenuItem("", $idFilemenu) ; create a separator line ; use same dimensions for GUI and its Label Local $iSizeWide = 300, $iSizeHi = 100 GUICreate("A child gui", $iSizeWide, $iSizeHi, 100, 200, $WS_VISIBLE, BitOR($WS_EX_WINDOWEDGE, $WS_EX_TOPMOST, $WS_EX_MDICHILD, $WS_THICKFRAME), $guiParent) ;;;WHLT GUICtrlCreateLabel("Can move; cannot resize" & @CRLF & "Always on top", 0, 0, $iSizeWide, $iSizeHi) GUICtrlSetBkColor(-1, $COLOR_red) GUICreate("Child Gui Resizable", 300, 100, 200, 50, BitOR($WS_POPUP, $WS_SIZEBOX, $WS_CLIPCHILDREN, $WS_VISIBLE), $WS_EX_MDICHILD, $guiParent) ;;;WHLT GUICtrlCreateLabel("Popup Cannot move; can resize" & @CRLF & "Background", 0, 0, 500, 200) ; $WS_CHILD, GUICtrlSetBkColor(-1, $COLOR_blue) ; toggle the line below :) ;$idBackgroundmenu = GUICtrlCreateMenu(" &Menu ") ; give it a menu GUICreate("Child GUI, caption, resize", 300, 100, 300, 100, BitOR($WS_VISIBLE, $WS_POPUP, $WS_CAPTION), BitOR($WS_EX_TOOLWINDOW, $WS_EX_MDICHILD, $WS_EX_ACCEPTFILES), $guiParent) GUICtrlCreateLabel("Popup With Caption: Can move; cannot resize", 0, 0, 500, 200) GUICtrlSetBkColor(-1, $COLOR_yellow) GUICreate("Child GUI, abc", 300, 100, 400, 150, BitOR($WS_POPUP, $WS_VISIBLE, 0), $WS_EX_MDICHILD, $guiParent) GUICtrlCreateLabel("Popup Cannot move; cannot resize", 0, 0, 500, 200) GUICtrlSetBkColor(-1, $COLOR_green) ; Child GUI below has a control ............................. ............................................. Local $gChildWithControls = GUICreate("Child GUI with Buttons", 400, 400, 500, 200, BitOR($WS_CAPTION, $WS_CHILD), -1, $guiParent) GUISetFont(14, $gChildWithControls) Local $cLabel = GUICtrlCreateLabel("Can move; cannot resize", 0, 0, 400, 50) GUICtrlSetBkColor($cLabel, $COLOR_white) Local $idChild_ButtonOkay = GUICtrlCreateButton("Okay", 0, 50, 80, 30) Local $idChild_ButtonHide = GUICtrlCreateButton("Hide", 0, 80, 80, 30) GUICtrlSetTip($idChild_ButtonHide, "Click to hide this child GUI") ;~ #comments-start --- Toggle this and same code below to show context menu for parent or child ;~ Local $idContextmenu = GUICtrlCreateContextMenu() ;~ Local $idNewsubmenu = GUICtrlCreateMenu("This is a Context Menu", $idContextmenu) ;~ Local $idNewsubmenuText = GUICtrlCreateMenuItem("text", $idNewsubmenu) ;~ Local $idContextButton = GUICtrlCreateButton("Context", 0, 110, 80, 30) ;~ GUICtrlSetTip($idContextButton, "Right Click to see Context Menu") ;~ Local $idButtoncontext = GUICtrlCreateContextMenu($idContextButton) ;~ Local $idMenuAbout = GUICtrlCreateMenuItem("This is a Context Menu", $idButtoncontext) ;~ Local $idMenuOpen = GUICtrlCreateMenuItem("Open", $idContextmenu) ;~ Local $idMenuSave = GUICtrlCreateMenuItem("Save", $idContextmenu) ;~ GUICtrlCreateMenuItem("", $idContextmenu) ; separator ;~ Local $idMenuInfo = GUICtrlCreateMenuItem("Info", $idContextmenu) ;~ #comments-end --- Toggle this and same code below to show context menu for parent or child GUISetState(@SW_HIDE, $gChildWithControls) ;.......................................................................................................... Local $gToolbar = GUICreate("A floating Tool Window", 300, 50, 100, 25, $WS_VISIBLE, $WS_EX_TOOLWINDOW, $guiParent) GUICtrlCreateLabel("A floating toolbar", 0, 0, 500, 200) ; this does not show :) GUICtrlSetBkColor(-1, $COLOR_lime) ;~ $iStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($gToolbar), $GWL_STYLE) ;~ $iExStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($gToolbar), $GWL_EXSTYLE) ; BitOR($WS_EX_TOOLWINDOW, $WS_EX_MDICHILD) ;~ GUISetStyle(BitOR($iStyle, $WS_VISIBLE), $iExStyle, $gToolbar) $idToolmenu = GUICtrlCreateMenu(" &Tool ") Local $idToolMenuItem = GUICtrlCreateMenuItem("An item for the Tool menu ", $idToolmenu) Local $idToolMenuItemsecond = GUICtrlCreateMenuItem("A second item for the Tool menu ", $idToolmenu) GUICtrlCreateMenuItem("", $idToolmenu) ; create a separator line $idPrintmenu = GUICtrlCreateMenu(" &Print ") Local $idToolMenuItemPrint = GUICtrlCreateMenuItem("A Print item for the Toolbar print menu ", $idPrintmenu) GUICtrlCreateMenuItem("", $idPrintmenu) ; create a separator line #Region --- After GUI BEFORE loop starts GUISetState(@SW_SHOW, $guiParent) #EndRegion --- After GUI BEFORE loop starts While 1 ;Local $nMsg = GUIGetMsg() Switch GUIGetMsg() ; $nMsg Case $GUI_EVENT_CLOSE, $ButtonCancel GUIDelete($guiParent) ExitLoop Case $idContextButton MsgBox($MB_SYSTEMMODAL, "Button Clicked", 'Right Click to see the Contect Menu') Case $ButtonShowChildGui GUISetState(@SW_ENABLE, $gChildWithControls) GUISetState(@SW_SHOW, $gChildWithControls) Case $idChild_ButtonHide ; <<<<<<<<<<<<<<< Child Gui Control Actioned in main loop ConsoleWrite("Yup, you clicked it" & @CRLF) GUISetState(@SW_HIDE, $gChildWithControls) Case $idChild_ButtonOkay ; <<<<<<<<<<<<<<< Child Gui Control Actioned in main loop ConsoleWrite("Yup, you clicked it" & @CRLF) MsgBox($MB_SYSTEMMODAL, "Button Clicked", 'Okay') EndSwitch WEnd GUIDelete() EndFunc ;==>ShowChildGuis  
       
    • By smellyfingers
      Hey, i hope someone can point me in the right direction, i have a page with tables, inside i have TD,TR,INPUT tags, the input tags is buttons and i need to click on one of theese buttons but they have the same value and type so the only way that i am going to know that it's the correct button is to find out the name of the innerhtml of the TD before (the parent node) because the input comes after, like this
      <TABLE> <TR> <TD> Name of the td </TD> <TR> <TD colSpan=3<INPUT> value=my button type=button</INPUT></TD> <TR> <TD> Other name of a td </TD> <TR> <TD colSpan=3<INPUT> value=my button type=button</INPUT></TD> <TR> I know how to find all td's and inputs but not (in a loop) look for the td's and once it has found it click on the corresponding or "closest" input, maybe a nested loop?
      I made a for loop using _IETagnameGetCollection($ie,"TD") and after it found the TD i tried looking for nextSibling but that might be impossible with INPUT perhaps?
    • By InunoTaishou
      When creating an mdi child using _WinApi_SetParent the close event for the parent is not run until the child window is closed. Is there any way to close the child windows when the parent's close button is pressed? It seems that when you close from the task bar the parent close function is run first.
      #include <WinAPI.au3> #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) Global $hParent = GUICreate("Parent", 800, 600) Global $hChild = GUICreate("Child", 300, 200, 0, 0) _WinAPI_SetParent($hChild, $hParent) GUISetState(@SW_SHOW, $hParent) GUISetState(@SW_SHOW, $hChild) GUISetOnEvent($GUI_EVENT_CLOSE, CloseWinParent, $hParent) GUISetOnEvent($GUI_EVENT_CLOSE, CloseWinChild, $hChild) While (True) Sleep(100) WEnd Func CloseWinParent() ConsoleWrite("CloseWinParent" & @LF) GUIDelete($hParent) Exit 0 EndFunc Func CloseWinChild() ConsoleWrite("CloseWinChild" & @LF) GUIDelete($hChild) EndFunc Also, looking at the help file
      This is wrong. I've used _WinApi_SetParent in the past to set autoit created programs to the child of other programs. Perhaps it was like this in the past but Windows 7 and greater different applications can be child and parent.
    • By ericbartha
      Hey everyone,

      I am trying to get a child GUI "log in" box to drag with the main window of the application, yet it is not. I've read through a bunch of other threads with similar issues, but cannot seem to find a resolution. I've only started learning to make GUI's 3 days ago, so I am hoping someone a little more experienced can identify my flaw. Here's my code:
      #include <Inet.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <FontConstants.au3> #include <ButtonConstants.au3> #include <AutoItConstants.au3> Global $sMainDir = "G:\Eric\LoginGUITesting\" formLogIn() Func formLogIn() Local $iFormBGState = WinGetState("BT Dashboard") If BitAND($iFormBGState, 1) Then ; Do Nothing Else Local $f_programBG = GUICreate("BT Dashboard", @DesktopWidth, @DesktopHeight - 40, 0, 0, $WS_MAXIMIZEBOX + $WS_MINIMIZEBOX) GUISetBkColor(0x333333, $f_programBG) GUISetIcon($sMainDir & "Images\hacuIcon.ico") GUISetState(@SW_SHOW, $f_programBG) WinSetState($f_programBG,"",@SW_MAXIMIZE) EndIf Local $f_logIn = GUICreate("f_logIn", 350, 400, -1, -1,$WS_POPUP, $WS_EX_TOPMOST, $f_programBG) GUISetBkColor(0xFFFFFFF) GUISetState(@SW_SHOW, $f_logIn) Local $shape_headerLine = GUICtrlCreateGraphic(30, 70, 290, 2) GUICtrlSetBkColor($shape_headerLine, 0xEAEAEA) Local $l_header = GUICtrlCreateLabel("Login Form", 30, 20, 200, 50) GUICtrlSetFont($l_header, 22, 400, "", "Segoe UI", $CLEARTYPE_QUALITY) GUICtrlSetBkColor($l_header, 0xFFFFFF) GUICtrlSetColor($l_header, 0x009BAA) $tabHolder = GUICtrlCreateTab(0, 0, 1, 1) GUICtrlSetBkColor($tabHolder, 0xFFFFFF) Local $sUserNameFocus = "Email Address" Local $i_userName = GUICtrlCreateInput("", 60, 128, 250, 29) GUICtrlSendMsg($i_userName, $EM_SETCUEBANNER, False, $sUserNameFocus) GUICtrlSetBkColor($i_userName, 0xF0EEF0) GUICtrlSetColor($i_userName, 0x333333) GUICtrlSetFont($i_userName, 12, 500, "", "Segoe UI", $CLEARTYPE_QUALITY) GUICtrlSetTip($i_userName, "Enter a valid email address", "Username", $TIP_INFOICON, $TIP_CENTER) GUICtrlCreatePic($sMainDir & "Images\userIcon.bmp", 36, 136, 12, 12, $BS_BITMAP) Local $sPasswordFocus = "Password" Local $i_password = GUICtrlCreateInput("", 60, 176, 250, 29) GUICtrlSendMsg($i_password, $EM_SETCUEBANNER, False, $sPasswordFocus) GUICtrlSetBkColor($i_password, 0xF0EEF0) GUICtrlSetColor($i_password, 0x333333) GUICtrlSetFont($i_password, 12, 500, "", "Segoe UI", $CLEARTYPE_QUALITY) GUICtrlSetTip($i_password, "Enter your matching password", "Password", $TIP_INFOICON, $TIP_CENTER) GUICtrlCreatePic($sMainDir & "Images\passIcon.bmp", 35, 183, 15, 15, $BS_BITMAP) Local $l_forgotPass = GUICtrlCreateLabel("Forgot your password?", 60, 230, 120, 17) GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI") GUICtrlSetColor($l_forgotPass, 0x009BAA) GUICtrlSetFont($l_forgotPass, 9, 500, "", "Segoe UI", $CLEARTYPE_QUALITY) Local $l_requestLogin = GUICtrlCreateLabel("Request credentials", 60, 260, 103, 17) GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI") GUICtrlSetColor($l_requestLogin, 0x009BAA) GUICtrlSetFont($l_requestLogin, 9, 500, "", "Segoe UI", $CLEARTYPE_QUALITY) Local $b_logIn = GUICtrlCreateButton("", 0, 325, 350, 75, $BS_BITMAP) GUICtrlSetImage($b_logIn, $sMainDir & "Images\loginButton.bmp") While 1 Local $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $l_forgotPass GUIDelete("f_logIn") formResetPass() Case $l_requestLogin MsgBox(0,"","Login Requested") Case $b_logIn Local $inputReturn = GUICtrlRead($i_userName) MsgBox(0,"", $inputReturn) EndSwitch WEnd EndFunc Func formResetPass() Local $f_passReset = GUICreate("f_passReset", 350, 300, -1, -1, $WS_POPUP + $WS_TABSTOP) GUISetBkColor(0xFFFFFF) Local $l_header = GUICtrlCreateLabel("Password Reset", 30, 20, 200, 50) GUICtrlSetFont($l_header, 22, 400, "", "Segoe UI", $CLEARTYPE_QUALITY) GUICtrlSetBkColor($l_header, 0xFFFFFF) GUICtrlSetColor($l_header, 0x009BAA) Local $shape_headerLine = GUICtrlCreateGraphic(30, 70, 290, 2) GUICtrlSetBkColor($shape_headerLine, 0xEAEAEA) $tabHolder = GUICtrlCreateTab(0, 0, 1, 1) GUICtrlSetBkColor($tabHolder, 0xFFFFFF) Local $sUserNameFocus = "Email Address" Local $i_userName = GUICtrlCreateInput("", 60, 128, 250, 29) GUICtrlSendMsg($i_userName, $EM_SETCUEBANNER, False, $sUserNameFocus) GUICtrlSetBkColor($i_userName, 0xF0EEF0) GUICtrlSetColor($i_userName, 0x333333) GUICtrlSetFont($i_userName, 12, 500, "", "Segoe UI", $CLEARTYPE_QUALITY) GUICtrlSetTip($i_userName, "Enter a valid email address", "Username", $TIP_INFOICON, $TIP_CENTER) GUICtrlCreatePic($sMainDir & "Images\userIcon.bmp", 36, 136, 12, 12, $BS_BITMAP) Local $l_ReturnLogIn = GUICtrlCreateLabel("Return to the Login Screen", 60, 175, 140, 17) GUICtrlSetFont(-1, 8, 400, 0, "Segoe UI") GUICtrlSetColor($l_ReturnLogIn, 0x009BAA) GUICtrlSetFont($l_ReturnLogIn, 9, 500, "", "Segoe UI", $CLEARTYPE_QUALITY) Local $b_passReset = GUICtrlCreateButton("", 0, 225, 350, 75, $BS_BITMAP) GUICtrlSetImage($b_passReset, $sMainDir & "Images\passResetButton.bmp") GUISetState(@SW_SHOW) While 1 Local $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $l_ReturnLogIn formLogIn() GUIDelete("f_passReset") Case $b_passReset Local $inputReturn = GUICtrlRead($i_userName) If $inputReturn = "" Then MsgBox(0,"Error","Please enter a valid e-mail Address") Else ; email variables removed ProgressOn("Password Reset", "Sending Reset Email" , "Initiating...") ProgressSet(0) ProgressSet(20, "Sending email to " & $sToAddress & "...") ; disabled and removed Local $emailCheck = _INetSmtpMail() If Not $emailCheck Then MsgBox(0,"","Email could not be sent. Please try again later or contact your system admin.") ProgressOff Else ProgressSet(60, "Checking for successfully sent email...") ProgressSet(100, "Successfully sent password reset email...") Sleep(200) ProgressOff() MsgBox(0,"","Thank you. You should receieve an email shortly with instructions on how to reset your password.") formLogIn() GUIDelete("f_passReset") EndIf EndIf EndSwitch WEnd EndFunc I am really lost on this one, so any help would be appreciated! Oh - and since the GUI does contain custom images, here is a screenshot to help you visualize.

      Thanks, everyone!

      Eric
×
×
  • Create New...