|
-
Jul 26th, 2010, 08:54 AM
#1
Thread Starter
Frenzied Member
How to really fill up all screens?
I'm building an application that essentially attempts to fill up all of the user's screens with a maximized form. On most machines this works. I'm simply using My.Computer.Screen.AllScreens enumeration to get a reference to all the user's screens (assuming a multi-screen setup). I'm then using the following to set the forms:
Code:
For i As Integer = 0 To My.Computer.Screen.AllScreens.Count - 1
frm = New BlankForm
BlankScreens.Add(frm)
frm.Location = New Point(My.Computer.Screen.AllScreens(i).Bounds.Left, 0)
frm.Show()
Next
For whatever reason, this is not always working, and only showing on one screen. Is there a better way at accomplishing this?
-
Jul 26th, 2010, 10:37 AM
#2
Re: How to really fill up all screens?
That code doesn't look like a maximized form filling up all screens, it looks like 1 form for each screen...
How does this work for you? It works for me on my 4 LCD setup.
Code:
Public Shared Sub main()
Dim AllScreenSize As Size
Dim LeftMostPosition As Integer = 0
For Each S As Screen In Screen.AllScreens
If S.Bounds.Left < LeftMostPosition Then LeftMostPosition = S.Bounds.Left
AllScreenSize += S.Bounds.Size
Next
Dim frm As New Form1
frm.StartPosition = FormStartPosition.Manual
frm.FormBorderStyle = Windows.Forms.FormBorderStyle.None
frm.WindowState = FormWindowState.Normal
frm.Size = AllScreenSize
frm.Location = New Point(LeftMostPosition, 0)
frm.ShowDialog()
End Sub
-
Jul 26th, 2010, 10:45 AM
#3
Re: How to really fill up all screens?
 Originally Posted by kleinma
That code doesn't look like a maximized form filling up all screens, it looks like 1 form for each screen...
How does this work for you? It works for me on my 4 LCD setup.
Code:
Public Shared Sub main()
Dim AllScreenSize As Size
Dim LeftMostPosition As Integer = 0
For Each S As Screen In Screen.AllScreens
If S.Bounds.Left < LeftMostPosition Then LeftMostPosition = S.Bounds.Left
AllScreenSize += S.Bounds.Size
Next
Dim frm As New Form1
frm.StartPosition = FormStartPosition.Manual
frm.FormBorderStyle = Windows.Forms.FormBorderStyle.None
frm.WindowState = FormWindowState.Normal
frm.Size = AllScreenSize
frm.Location = New Point(LeftMostPosition, 0)
frm.ShowDialog()
End Sub
Works on my 2-Screen computer too.
-
Jul 26th, 2010, 11:02 AM
#4
Thread Starter
Frenzied Member
Re: How to really fill up all screens?
Cool, I'll give it a shot and let you know.
-
Jul 26th, 2010, 12:52 PM
#5
Thread Starter
Frenzied Member
Re: How to really fill up all screens?
Does this assume that all screens are the same size? In our environment, they are not, hence the reason why I was instantiating multiple forms.
-
Aug 17th, 2010, 06:07 PM
#6
Thread Starter
Frenzied Member
Re: How to really fill up all screens?
Doesn't work for me. Does this code assume the screen are the same size and resolution? In our environment, they are not.
-
Aug 18th, 2010, 09:44 AM
#7
Thread Starter
Frenzied Member
Re: How to really fill up all screens?
Actually, maybe it does work. I broke this code out into its own application and it does seem to work. There might have been something else in the code preventing this from working correctly. Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|