Sendmessage Api, Maximize Form
using send message api, im trying to maximize my form....
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Const WM_SIZE = &H5 Private Sub Command1_Click()SendMessage Me.hwnd, WM_SIZE, 1, 0End Sub
anyone know why this wont work? i read in the api viewer by microsfot that the wParam for maximize is 1 while using the WM_SIZE wMsg? it wont work....
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Maximize A Normal Form Similar To A Child Form In An MDI
I have an MDI form and a child form in a Project exe
I refer to a dll which has a normal form
Through a menu option in the MDI, I have called the normal form (DLL)
While maximizing, the mdi formâ€™s menu bar and tool bar are getting hidden
This needs to work exactly like a child form when you maximize
Could you help please?
how do i start the program in the maximized view??
Maximize My Form!
Hey guys. I've searched around on the site but haven't found much and dunno if this can happen. I need a form I have minimized in the system tray to maximize at say 2:15 or something. So when it hits a certain time, the form will maximize up on the screen. I think I have code to do it, just don't know where to do it at. Is anything active at all times, even when minimized? Thanks guys!
how can i make my text box on the form get bigger in proportion with the form as it is resized or maximized?
i was wondering if there was a way i could center a label in the midle of a form when its maximized. like have the form on there and the form small and then when u run it maximize it and it'll center in the midle of the form.
i've tried a lot of different ways like label1.top = form1.top/2 and stuff like that but it always goes to the top f the form when i maxize it....
How To Maximize A Form?
In my project, which starts with "Sub Main", I call to a form which then gets opened. This form's Window state is 2 - maximized, but it does not open in a maximized state. I've enclosed my Sub Main code below. What do I or should I do to open my form in a maximized state?
Public Sub Main() '==========================================================================' Sub Procedure Details Section'==========================================================================' Purpose: Initialize application at startup' Input:' Output: '==========================================================================' Error Handler GoTo Section'========================================================================== On Error GoTo Error_Handler '==========================================================================' Variables Section'========================================================================== Dim strErrMsg As String'==========================================================================' Code Section'========================================================================== Load frmImport>>>>>> Can I put something here to maximize my form? <<<<<<<< frmImport.Show'==========================================================================' Procedure Exit Section'==========================================================================Exit_Sub: Exit Sub'==========================================================================' Error Handling Section'==========================================================================Error_Handler: strErrMsg = "An unexpected error occurred in procedure: Main" & vbCrLf & _ "Error number: " & Str(Err.Number) & vbCrLf & _ "Description: " & Err.Description MsgBox strErrMsg, vbExclamation, "Application Error Warning" Err.Clear Resume Exit_Sub End Sub
is it possible to maximize a form through code (same as clicking on the maximize button). If i select "maximize" as the window state, it covers the taskbar.
Maximize A Form?
How do i Maximize a form that is Minimize in a Mdiform using code?
Maximize A Form
I have a form minimized on Try Icon bar, I need to
maximized this form throught another second form.
How can I do that
I call this code from the second form
but this does not work
Dim f2 As New frmErrMain
f2.WindowState = FormWindowState.Maximized
i do not want to say:
because the form is already opened I just want to Maximize.
Thanks in advanced
Maximize A Form
How do I maximize a form when it loads?
How Do I Maximize A Form?
Similar to my previous post, I am wondering about forms being maximized. This time, I want to do the maximizing programatically. I'm working in Excel 2007 and four forms load when opening the file.
I want to make one of the forms maximize on load, but I can't figure out how to do this. I've seen some suggestions to use DoCmd.Maximize, but Excel doesn't seem to know about DoCmd. I've also seen solutions that simply maximize the application (Excel) and then size the form to the same size as the application. But this isn't really maximizing the form...is it? Correct me if I'm wrong, but the Maximize button would still be enabled on the form, rather than the Restore button, wouldn't it?
Is there a way to truely maximize a form in Excel programatically? Thanks in advance.
Edited by - bungee41 on 6/30/2008 1:12:05 PM
is there something I can do so that a mdi child form always open maximized no matter what the size of the mdi parent form ?
Maximize Form HELP..
I don't want the form to be displayed on all the screen width when it is maximized by the user ? can i do it? How?
Form Maximize Button
How do i disable the maximize button on the form, i cant do the borderstyle, it doesnt show a style that disables the maximize button, how do i?
Maximize Mdi Form Containing Web Browswer
I was wondering is someone could give me some insight on how to maximize a web browser inside of a mdi form to cover the entire screen including the taskbar. Maximize properties do not seem to work.
Maximize Form On Load
Hello i'm writing some forms with VBA in Access.
Is it possible to maximize a form when it is opened?
It seems such a simple task to me, but in reality it seems to be impossible?
can this be??
Form Maximize Take Time
I have problem here. The form take about 10 seconds to maximize when I close the other application. Why? Attach below is the module I use in my application
frmMenu.WindowState = vbMinimized
ShellExecAndWait "D:PFPrecision Farming.mxd", True, frmMenu
frmMenu.WindowState = vbMaximized
Maximize MDIchild Form
i've been having some problems with forms layout, i've created a form who is MDICHILD only with a datagrid nothing else. But when i try in properties set windows state as MAXIMIZED when i call form he doesn't show anything. Otherwise when i set windows state as normal or minimized it works just fine. what can it be ?
How 2 Do Form Minimize, Maximize
I wanted to make a borderless windows with minimize and maximize functions ......i wanted to add this functionality to my software using command buttons and not the control box... how can this be done ....please help me with some source code....i'm using vb6.0.
Maximize Form, An Have It Look Good..
Alright, when i try to maximize my form, it looks all cracked out, and i want to know how to make it so when you maximize it it looks normal, so that the webbrwoser part, also maximizes into how it looks in IE etc.
Can I Automagically Maximize A Form?
Is there a way to automatically have a form be maximized whenever it is loaded? I searched through the old posts and couldn't find a straight answer to this one...Thanks
How To Stop MDI Form To Get Maximize ??
is there any way to stop MDI form to be maximized .. i want to disable the maximize button of MDI form and want to stop Resizing of MDI form also !!! any way to do this or any API Function to do this ??
How To Mak Controls Maximize W/the Form
How do you set your controls to adjust with the form when it is maximized? ex. When I place a picbox on a form at the top, in the program when I max. the form the picbox stays the same size. It doesn't max. with the form.
Minimize / Maximize VB Form
In my coding for a form (say, form_A.frm), I wish to minimize it (form_A.frm) after user presses a button. Likewise, I want to maximize the form (form_A.frm) later when an event is triggered.
I know there is a Shell command that allows maximize of an application by using 'vbMaximizedFocus' as WindowStyle. But this is meant for applications, and not VB forms, am I right? How do I get a form minimized / maximized?
Thankies in advance!
Capture Maximize Form Event
I am learning to write form variables to the registry to be called the next time the program is run. I am saving the top, height, left, width variables and then set them on the form load event when the program runs again. I have found that when I maximize the form, quit and then restart, the form has the slightly smaller size then the maximized form and is not in the maximized mode. For Example, at this point pressing the maximize button causes the form to maximize completely. I would like to store whether or not the form was maximized when I close the program and then maximize the form the next time it runs. Any ideas on maximize or a better way of retrieving these variables will be appreciated.
Remove Maximize Button From MDI Form
How can I remove the maximize button from a MDI form, leaving the minimize and the close buttons?
I know how to prevent it from getting maximized, but I'd like to REMOVE the button.
Code/Form View Maximize
VB5 remembered that I keep my code and form views maximized in the IDE. Not happening in VB6. This is such a basic feature, so what am I missing? Thanks.
Form Resize, Maximize, Minimize, Etc.
How do I fire up an event when the maximize/minimize/resize button was clicked on the title bar of a form?
I guess there's a way if you have the timer running when it checks for window state, but I am looking for more "intelligent" way to do it
How To Disable Maximize Button In MDI Form
Can anyone please tell me how to disable maximize button in MDI Form. I also want to disable form resize function on that MDI Form. I have a little idea that if I use API programming I could do it. But I dont know how to do it. Plz help me...THANKS
Maximize Form Screen Resolution
I have designed a form with about 53 controls on it. I want the form to be in the Maximized state when it is loaded without covering the Taskbar. Also, the form and the controls should be adjusted according to the different screen resolutions. How can this be done? Please help.
How Do You Maximize The Form To Not Even Show Taskbar?
Alright, i want my form to be like...when they hit " lock it up " i want the frmlockedup to be maximized, so it takes up the WHOLE screen so that no one can screw with it (its a program to lock your pc)
if you could help me out i'd appreciate it! thanks!
Disabling Maximize Button On A MDI Form
How can I disable the Maximize button on my MDI form? Can't find the property. I know the button is there for a reason but I don't wanna write code to resize all the child forms.
Objects On Form Resize On Maximize
When the user maximizes the form, how do i have the objects also resize to fit the form?
Example. if i maximize the form the frame enlarges, but the command buttons dont enlarge they just stay the same size but get reposisitioned on the form when it gets enlarged.
Both Maximize Form And Resize Controls
I use a resizing control which automatically resizes all the controls on the form.
When I maximize a form by code (Form1.Windowstate = 2) the form is maximized, but the controls aren't.
When I place the Form1.Windowstate = 2 in the Form1.Active event the controls are sized.
But I don't want this, because the user can see the maximizing of the form.
Is there an other way to maximize the form and bot resize the controls, so the form pops up at once maximized with the resized controls?
Control Placement On Form Maximize...
How do I place my controls evenly when I maximize my forms ?
I placed the controls during design time in normate window mode.When I maximize the form, there is a lot of blank space.How do I place the controls evenly?
Disable Maximize Button On MDI Form?
is there any way i can disable the maximize button on a MDI form..
before anyone tells me to disable the maxbutton in the properties the MDI forms dont have that option.
Edited by - CopyrightPhilly2k4 on 11/9/2004 5:09:14 PM
Disabling The Maximize Button On An MDI Form.
On a normal form it's possible to disable the Maximize Window button by settings the property MaxButton to FALSE. But on an MDI form this property doesn't exist. Is there a way to disable this button by using the SendMessage API or is there another way to handle it?
Thanks in advance,
Whats The Code To Maximize A Form?
I have a form, and it is cluttered with various buttons, images, etc.
When I click `Run` it doesn`t open up full size.
Can anyone tell me the code for making the form open up to its maximum size upon running the code.
Form Without Cover Taskbar (Maximize & BorderStyle=0)
i have a form with BorderStyle = 0 and WindowState = 2 - Maximized.
when i run it the form is display in full desktop screen which cover the taskbar.
Is there any way to make a form display with BorderStyle=0 and WindowState=2 Maximized and without cover the taskbar ?
I have been using full screen height minus the height of the taskbar but the taskbar is shown in grey color without anything (no button, icons and time). Thanks
Disable Minimize And Maximize Button Of A Form?
I would like to disable minimize and maximize button of a Form. I don't know why the code in this link doesn't work. Also, who can tell me how I disable them by doing so before creating the window? And I want to only keep X close window?
Thank you very much!