473,388 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

minimize form

Hello everyone,
my question is, is there a code to minimize / maxmize a form when
clicking a button? I tried some codes and it didn't work. I got the blue
line...

Thanks for any help.
Oct 31 '08 #1
4 4384
What have you tried? Was it this?
http://msdn.microsoft.com/en-us/libr...ndowstate.aspx
"karim" <ka***@discussions.microsoft.comwrote in message
news:D9**********************************@microsof t.com...
Hello everyone,
my question is, is there a code to minimize / maxmize a form when
clicking a button? I tried some codes and it didn't work. I got the blue
line...

Thanks for any help.
Oct 31 '08 #2
Hello James, the code I tried to use and play around with is: Me.MinimumSize...
but as I said before, nothing happened and there is always error line under
it.

"James Hahn" wrote:
What have you tried? Was it this?
http://msdn.microsoft.com/en-us/libr...ndowstate.aspx
"karim" <ka***@discussions.microsoft.comwrote in message
news:D9**********************************@microsof t.com...
Hello everyone,
my question is, is there a code to minimize / maxmize a form when
clicking a button? I tried some codes and it didn't work. I got the blue
line...

Thanks for any help.

Oct 31 '08 #3

"karim" <ka***@discussions.microsoft.comkirjoitti viestissä
news:D9**********************************@microsof t.com...
Hello everyone,
my question is, is there a code to minimize / maxmize a form when
clicking a button? I tried some codes and it didn't work. I got the blue
line...
Me.WindowState = FormWindowState.Minimized
Me.WindowState = FormWindowState.Maximized

Those code lines should work.

-Teemu

Oct 31 '08 #4
On Oct 31, 11:56*am, karim <ka...@discussions.microsoft.comwrote:
Hello everyone,
* * * * my question is, is there a code to minimize / maxmize a form when
clicking a button? I tried some codes and it didn't work. I got the blue
line...

Thanks for any help.
As Teemu stated, you must use form's WindowState property
by setting a value from FormWindowState enum as follows:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
' To minimize
Me.WindowState = FormWindowState.Minimized
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
' To maximize
Me.WindowState = FormWindowState.Maximized
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
' To normalize
Me.WindowState = FormWindowState.Normal
End Sub

HTH,

Onur Güzel
Oct 31 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Bhargavan | last post by:
Hey Group, When I minimize and then maximize a form (in windows application), I see a significant drop in memory usuage in the task manager. I tried to do the same thing programatically during the...
2
by: andreas | last post by:
Hi, How to minimize with code all de childforms in the parentform. I want to put a menuitem with text "MInimize all" in a parent form to minimize all the child forms in the parent form at once....
4
by: steve | last post by:
hi all, i was wondering how is it possible to add an extra box ( i think they are called boxes: upper right corner ...) in a form that will minimize it in the system tray? You know some...
0
by: Bill | last post by:
Hi I have a parent child forms. I want the close, maximize, and minimize buttons to be removed. One the child form I have set the maximize and minimize buttons to false. I have the child form...
3
by: Don | last post by:
If you have a form that calls another form via the following code: Dim myForm as Form2 myForm = New Form2 myForm.Owner = Me MyForm.ShowDialog and you minimize the second form, the first form...
2
by: tony | last post by:
Hello! I have a mainManu where I can chose to display some window forms. When the mainMenu is minimized I need to minimize every window form that is started from the mainMenu. So I need to...
11
by: M O J O | last post by:
Hi, I'm creating my own Sidebar (like in Vista). In my XP's quick menu, I have a button called "Show Desktop". When I click it all forms are minimized. Since I don't want my SideBar to be...
0
by: AllenW | last post by:
I have a VB.Net 2005 application that moves the mouse cursor via software and generates mouse clicks anywhere on the monitor using SendInput. The code that moves the mouse and decides when to issue...
4
by: EmilH | last post by:
Hi, Can anybody show me how to minimize/maximize a window dynamically? I placed buttons for each of these commands and want to place the code which will minimize and maximize the window. ...
5
by: =?Utf-8?B?SmFtZXMgV29uZw==?= | last post by:
Dear all, I'd like to know if there is any method to minimize command mode window when a console program is running. In my case, there are several console programs which run periodically in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.