Click here to Skip to main content
15,906,645 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Sir,
I create a window form in vb.net ,i false the maximize and minimize buton of page i want when we Click the menu Button the page is automatically set the full screen according the system screen we want through coding . Plz Help me sir i very confussed sir
Thank
Arvind Kumar Singh
Posted
Comments
Sunasara Imdadhusen 30-Mar-11 0:30am    
Are you using MDI Parent or Child form?
Arvind_singh 30-Mar-11 0:41am    
Yes sir ;

Hello Arvind

In C# you can do it like this

<br />
//for maximize<br />
private void button1_Click(object sender, EventArgs e)<br />
        {<br />
            this.WindowState = FormWindowState.Maximized;<br />
        }<br />
//to return in normal size<br />
        private void button2_Click(object sender, EventArgs e)<br />
        {<br />
            this.WindowState = FormWindowState.Normal;<br />
        }<br />
//for Minimize<br />
private void button3_Click(object sender, EventArgs e)<br />
        {<br />
            this.WindowState = FormWindowState.Minimized;<br />
        }<br />


for VB.net

you can use
Me.WindowState = FormWindowState.Maximized
 
Share this answer
 
Comments
Arvind_singh 30-Mar-11 1:01am    
Thanks sir
Sunasara Imdadhusen 30-Mar-11 1:12am    
nice answer!!
You can iterate through the Application.Forms collection like so
VB
For Each frm As Form in Application.OpenForms
    frm.WindowState = FormWindowState.Minimized
Next frm


Thanks,
Imdadhusen
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900