Jump to content

[Solved] Maximize button is grayed out?


Recommended Posts

Hello there,

I'm trying to make a program with an ie object in it but when i run the script the maximize button is grayed out?
Does someone know how to fix this?

The code i have is:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

Global $URL, $oIE, $BSendURL, $gMain

Opt("GUIOnEventMode", 1)

Main()
Func Main()
$gMain = GUICreate("Calculator", 801, 688, 178, 227)
$oIE = ObjCreate ("Shell.Explorer.2")
$GUIIE = GUICtrlCreateObj ($oIE, 1, 1, 800, 500)
$oIEEvents = ObjEvent ($oIE,"IEEvent","DWebBrowserEvents2")
If $URL = 0 Then
    $URL = "http://www.pathofexile.com/fullscreen-passive-skill-tree/AAAAAwMB"
EndIf
$oIE.navigate ($URL)
GUISetState(@SW_SHOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
GUICtrlSetResizing ($GUIIE, $GUI_DOCKAUTO)
EndFunc

Func Close()
Exit
EndFunc

While 1
    Sleep(50)
WEnd

While $oIE.busy
    Sleep (30)
WEnd
Edited by satanttin
Link to comment
Share on other sites

  • Moderators

When you don't specify anything for GUICreate, the Default style applied is this:

$WS_MINIMIZEBOX + $WS_CAPTION + $WS_POPUP + $WS_SYSMENU

You need to add:

$WS_MAXIMIZEBOX

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

Glad to help. And we all have those Ah-HA! moments; that's what the forum is here for :)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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