Click here to Skip to main content
15,888,313 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to set custom maximize and normalize button .....how to do it in the same button once click its maximize and again click its normalize how to do it
Posted
Comments
theanil 3-Feb-12 12:56pm    
not clear, explain clearly what you want?

If WindowState = FormWindowState.Normal Then

WindowState = FormWindowState.Maximize
Else

WindowState = FormWindowState.Normal
End If
 
Share this answer
 
 
Share this answer
 
Place a button and in the button_click event you need to write some thing like this
Sample code:
VB
private void button1_Click(object sender, EventArgs e)
{   if(windowstate==FormWindowState.Maximized)
     {
       WindowState = FormWindowState.Minimized;
     }
    else
     {
        WindowState = FormWindowState.Maximized;

     }
    
}


Thanks,
SP
 
Share this answer
 
Comments
[no name] 4-Feb-12 0:24am    
Thanks

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