10
Answers

How to do a form as fullscreen in c# windows application

S J

S J

4y
839
1
hi
 
when i run my form should bein maximize mode, with taskbar everything is noormal. when i start to run my form should be in  fullscreen. how to do i wrote something like
 
private void Form1_Load(object sender, EventArgs e)
{
this.TopMost = true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.WindowState = FormWindowState.Maximized;
}
 
but its not working fine. i am getting problems
iam not unable to see any close mark,min,max symbols 
mysystem is going to hang.not working any keys anyhing not working.
how to solve this anybody help me 
 
Answers (10)
1
Rajanikant Hawaldar

Rajanikant Hawaldar

32 38.8k 451.2k 4y
  1. this.TopMost = true;  
That line interferes with alt+tab to switch to other application. ("TopMost" means the window stays on top of other windows, unless they are also marked "TopMost".)
Accepted
1
S J

S J

NA 171 27.1k 4y
oh yes, its not unsderstood to everyone okay i wont delete next time
1
Rajanikant Hawaldar

Rajanikant Hawaldar

32 38.8k 451.2k 4y
Hello @S J, Henceforth do not delete your replies, you deleted your replies see and see now below conversion looks incorrect to everyone who search / look for the same issue
1
Rajanikant Hawaldar

Rajanikant Hawaldar

32 38.8k 451.2k 4y
ok
1
Rajanikant Hawaldar

Rajanikant Hawaldar

32 38.8k 451.2k 4y
if you keep FormBorderStyle as None then ControlBox will not be visiable
1
Rajanikant Hawaldar

Rajanikant Hawaldar

32 38.8k 451.2k 4y
yes go ahead only if its related to this task otherwise you have to post new thread
1
S J

S J

NA 171 27.1k 4y
yes fine working. thanku 
1
Rajanikant Hawaldar

Rajanikant Hawaldar

32 38.8k 451.2k 4y
Then change form border style to FixedSingle
0
Rajanikant Hawaldar

Rajanikant Hawaldar

32 38.8k 451.2k 4y
Are using .Net Framework or .Net Core?
0
Rajanikant Hawaldar

Rajanikant Hawaldar

32 38.8k 451.2k 4y
I am not facing any issues with your code. When you set FormBorderStyle as System.Windows.Forms.FormBorderStyle.None ControlBox will not be visible because its located on Border area. If you want to use FormBorderStyle as None then you have implement shortcut key in Form Keydown event to close form or add button to close form.
 
Add one button then attach click event write code as this.Close(); after launch app click on button and confirm first app is really hanged on not, Add textbox and try to edit.