0. Create a form and add a button
1. Itpub personal space s6d: vu0ul
Execute the following button event Itpub personal space Za \ I; ^ + M, G "PR q0j
Private void btnformmax_click (Object sender, eventargs E)
+ Tbh5? 'E0 { Itpub personal space & mk4ozc; FP
If (this. windowstate = formwindowstate. maximized)
B x? P # P, h8t0 { Itpub personal space 2lm. [3] m
This. windowstate = formwindowstate. normal;
. B. eV ~ Q [-@! O0 }
R (iem4 {# bg0 Else Itpub personal space K $ lv & rohu
{ Itpub personal space W8 ^ WM | �qy @
This. windowstate = formwindowstate. maximized; Itpub personal space ^ 0vq9h ^
} Itpub personal space X: H; f'au9p9zo _
} Itpub personal space J, P/X/f9or
When the form is maximized, the taskbar is not covered in full screen mode.
Q @/XC ^ V6 [px0 This. formborderstyle. The default value is sizable.
2. Itpub personal space 3u & U9]) _ 0dn * C
Execute the following button event Itpub personal space [# U % TST: N % |
Private void btnformmax_click (Object sender, eventargs E) Itpub personal space: \, l! X-J (_ "QW
{
Nnyic0 ^ FV $ ln _ ly0 If (this. windowstate = formwindowstate. maximized)
| Gq2p7} o! Pt0 {
% M] 5 | vlf0 This. windowstate = formwindowstate. normal;
O * L ^ * M $ l4md. JF (zx0 } Itpub personal space \ h'h ~;~
Else
7elw $ ii0 {
| B} @ + V} 1N qac0 This. formborderstyle. = formborderstyle. None;
\/G0o & kb t0w0 This. windowstate = formwindowstate. maximized;
ECN % WQ-l} B0 }
\ + Yn0lc0 }
When the form is maximized, the full screen and the taskbar are overwritten.
6f0s + N M7 [0At this time, this. formborderstyle. None does not display the Form title bar and other related information.
3.
Kak y0hmnf0 Execute the following button event
~ 3eo3ntp0 Private void btnformmax_click (Object sender, eventargs E)
1nu | 5 \ 8ao? -~ H0 { Itpub personal space} "F # M # x1k0c �x
If (this. windowstate = formwindowstate. maximized) Itpub personal space, B 'BC; bze * AC xz Z
{ Itpub personal space igj] G + Y % L + IE
This. windowstate = formwindowstate. normal;
5B % T + L. x @ (zl/E0 } Itpub personal space/WC zcwg
Else Itpub personal space? M {! Srpy7p
{ Itpub personal space QT ^ f \
This. formborderstyle. = formborderstyle. None;
; PCY * Cy 'pz) G0 This. maximumsize = new size (screen. primaryscreen. workingarea. Width, screen. primaryscreen. workingarea. Height ); Itpub personal space \ qh9q CN-oC
This. windowstate = formwindowstate. maximized;
V1y, c8rw0 } Itpub personal space 7y6loq & mhhk # Y
}
When the form is maximized, the taskbar is not covered in full screen mode.
/E + gqkc5fiy] 0At this time, this. formborderstyle. None does not display the Form title bar and other related information.
Reprinted from: http://space.itpub.net/12639172/viewspace-501587