Full screen Form

4

4Space

Hi, anyone know how to make a Form full screen?? I'm almost there, I just
wondered if there's any way to have my form over the taskbar.

Cheers,

4Space
 
4

4Space

Actually, this isn't a .NET issue. I can get full screen on another machine,
so it looks like a driver issue. How sad.

Cheers,

4Space
 
M

Morten Wennevik

this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Maximized;
 
H

Herfried K. Wagner [MVP]

* Morten Wennevik said:
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Maximized;

If the taskbar is not set to "auto hide", it will be shown in front of
the form.
 
M

Morten Wennevik

Interesting.
I didn't know that since I always have set it to auto hide, so for me this
would always work.
 
M

Morten Wennevik

Odd really, since when I set my taskbar to NOT hide this code still showed
the form in fullscreen.

In any case, if it doesn't, you can always add

this.Topmost = true;
 
4

4Space

Yes this is what I did. Unfortunately it doesn't appear to work on my
laptop. I do think it is a driver issue.

4Space

Odd really, since when I set my taskbar to NOT hide this code still showed
the form in fullscreen.

In any case, if it doesn't, you can always add

this.Topmost = true;
 
H

Herfried K. Wagner [MVP]

* "4Space said:
Yes this is what I did. Unfortunately it doesn't appear to work on my
laptop. I do think it is a driver issue.

This doesn't work on my non-laptop running Windows XP Pro too.
 
4

4Space

Just our of interest, I have an IBM ThinkPad T40 with an ATI Mobility card.
What do you have?

It does work on my colleague's Dell laptop though.

Cheers
 
H

Herfried K. Wagner [MVP]

* "4Space said:
Just our of interest, I have an IBM ThinkPad T40 with an ATI Mobility card.
What do you have?

It does work on my colleague's Dell laptop though.

A 2 year old NVIDIA GeForce2 MX/MX 400.
 
L

Lorne Smith

4Space said:
Hi, anyone know how to make a Form full screen?? I'm almost there, I just
wondered if there's any way to have my form over the taskbar.

Cheers,

4Space

If you're writing an app which will be used by anyone else, then seriously,
I wouldn't recommend you do this. I've come across a couple of programs in
the past which have covered my taskbar and they were VERY quickly
uninstalled again... You should not try to override a users OS settings,
it's impolite! :)

Lorne
 
4

4Space

Lorne Smith said:
If you're writing an app which will be used by anyone else, then seriously,
I wouldn't recommend you do this. I've come across a couple of programs in
the past which have covered my taskbar and they were VERY quickly
uninstalled again... You should not try to override a users OS settings,
it's impolite! :)

Thanks Lorne :) But this will be a dedicated machine in an engineering
environment, possibly even with a touch screen. It will be full screen,
alt-tab and ctrl-alt-del (etc.) will also be disabled.

Cheers,

4Space
 
L

Lorne Smith

4Space said:
Thanks Lorne :) But this will be a dedicated machine in an engineering
environment, possibly even with a touch screen. It will be full screen,
alt-tab and ctrl-alt-del (etc.) will also be disabled.

Cheers,

4Space

Ah, that explains a lot then :)
 
L

Lorne Smith

Forgot to add something... It should help you... the following code segment
from VB6 does what you are looking for using API calls... Should be easy to
translate but it will be unmanaged code....

///
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Long,
ByVal nCmdShow As Long) As Long

Private TaskBar As Long

TaskBar = FindWindow("Shell_TrayWnd", vbNullString)
ShowWindow TaskBar, 0
\\\

This will hide the taskbar for you... Call 'ShowWindow TaskBar, 4' to reshow
it...

HTH

Lorne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top