How to maximize my program's window at start ?

Just starting out? Need help? Post your questions and find answers here.
JoJo
New User
New User
Posts: 4
Joined: Thu Nov 13, 2003 11:33 am

How to maximize my program's window at start ?

Post by JoJo »

Hey Guys,

I know how to get the clientarea of the screen and my program automatically uses that information when opened, but it still isn't the same when I press afterwards maximise.

How can I get my window to automatically maximise at startup ? without having to press the button in the right top corner.

Thanks for your ideas.
Pupil
Enthusiast
Enthusiast
Posts: 715
Joined: Fri Apr 25, 2003 3:56 pm

Post by Pupil »

try something like:

Code: Select all

ShowWindow_(WindowID(), #SW_MAXIMIZE)
JoJo
New User
New User
Posts: 4
Joined: Thu Nov 13, 2003 11:33 am

Thanks for the quick reply

Post by JoJo »

I think this api call should be also on the FAQ, which I checked out before writing my request here.
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Re: Thanks for the quick reply

Post by Berikco »

JoJo wrote:I think this api call should be also on the FAQ, which I checked out before writing my request here.
of course not...
And the 20000 other API calls also? :)
This is not a PureBasic command, there are tons of API resources available on the internet.
User avatar
GedB
Addict
Addict
Posts: 1313
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Post by GedB »

JoJo,

Heres a full example:

Code: Select all

If OpenWindow(0, 234, 140, 600, 300,  #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_Invisible, "New window ( 0 )")
  ShowWindow_(WindowID(),#SW_Maximize)

  Repeat
    Event = WaitWindowEvent()
  Until Event = #PB_Event_CloseWindow
EndIf
What you really need is the AllAPI guide http://www.mentalis.org/agnet/apiguide.shtml
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post by Edwin Knoppert »

Normally a Winmain provides the window showcmd.
Imagne a shortcut with a modified setting.

GetProcessInfo() is required in pb i guess to obtain this value again..
??
Post Reply