Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am developing a simple software application in vb.net.
there i kept form property - windowstate as maximized
but then it is hiding my taskbar and i dont want that.
I want the form to be shown above the task bar in full size.
i.e. it should not hide my task bar. How to do it.
Posted
Updated 23-May-21 11:24am
v2

You probably have your taskbar set to "hidden" until you mouse-over it. When you mouse-over it, it is displayed on top of the maximized application without changing the application's size at the same time. That's a bug in Windows as far as I'm concerned - NOT your application.
 
Share this answer
 
Comments
snehalagrawal 7-Nov-11 11:42am    
But then in another similar software application (i took it from someone) it is not hiding my taskbar. and i found similar properties for both the projects. Dont know how they r achieving it... ? :(
snehalagrawal 7-Nov-11 11:49am    
Between i checked it, it is not so... my taskbar is not set to "hidden".
and as i said above another program working fine on the same system...
LanFanNinja 7-Nov-11 13:56pm    
WindowState = FormWindowState.Maximized works fine for me on Windows 7 I cannot imagine what could be wrong?
If you Set Form's Border Property to None and Forms WindowState to Maximized then Taskbar Will be Hidden....
Here's a Solution Try and Comment your Experience

If you Need Taskbar and No Border to Your Form Just Change WindowsState to Normal and use This Code
VB
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Me.Top = 0
    Me.Left = 0
    Me.Height = Screen.PrimaryScreen.WorkingArea.Height
    Me.Width = Screen.PrimaryScreen.WorkingArea.Width
End Sub

Happy Coding......
 
Share this answer
 
v3
Comments
snehalagrawal 11-Nov-11 12:34pm    
Yes... :) this code is working... :)
Thanks a tonne...!
But in the other project i have as said above they have not done this coding,
still their program working fine (as does not hides task bar)... :(
How come...? Que still on my mind...!!!
Ashok19r91d 11-Nov-11 12:51pm    
Please Let me Know About Your Form...
Check and Comment Forms Following Properties in Both Projects
Forms's BorderStyle, WindowState, StartupPosition, Height and Width...

I'll Try to explain how manage that...

I Think They Set All Above Properties in Design Time
But Know that Using Above Code Helps to Display Taskbar (whatever it's Height) and Whatever the Screen Resolution, But Setting These Values in Design time will not Serves Above said Properties...
this is my solution

just add this in the code where you maximized the form
VB
Dim scr as Screen = Screen.FromControl(me)   'get the screen where the app locate
Me.MaximizedBounds = scr.WorkingArea         'set the max Size to workingarea  



hope this 2 line solve your problems
 
Share this answer
 
v2
Comments
Dave Kreskowiak 21-Apr-21 20:27pm    
And if the app isn't on the PrimaryScreen? Then what? You're making some bad assumptions with your code.
SHEIVON GAMBOA 21-Apr-21 20:54pm    
thanks but for most people just use one screen..

but yes..

to get the current screen just need to look the app in the screen
by this line of code

Dim scr = Screen.FromControl(me)

Me.MaximizedBounds = scr.WorkingArea

Dave Kreskowiak 21-Apr-21 23:26pm    
Hah! You haven't seen my home office, nor where I work. Single monitors are rare.

My desk currently has 4 monitors on it, only 1 of which isn't the same size as the others.

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