Quad Display - 4 VB programs

vb6 Sri Lanka
  • 9 years ago

    Hi, I am a "amateur" level VB writer, so bear with me.

    I have a PC with a Quad display, 4 screens and I have written 4 small apps to display some infomation from a machine. I want to display a different app in each screen, but need them to automatically put themselves in each of the 4 screens at startup and maximise themselves in their respective window. I have no idea even how to start to do this.

    Thanks for reading - Pete.

  • 9 years ago


    Here is some code to place & resize a form in the 4 quadrents of the screen.

    I'm not sure if this will do for your Quad display.

    All you have to do is change the constant in form load to change where the form appears.


    Option Explicit
    Const Screen_TopLeft = 1
    Const Screen_TopRight = 2
    Const Screen_BottomLeft = 3
    Const Screen_BottomRight = 4

    Dim iStart As Integer

    Private Sub Form_Load()
        iStart = Screen_BottomLeft
    End Sub

    Private Sub Form_Resize()
        If Me.WindowState = vbNormal Then
            Select Case iStart
                Case Screen_TopLeft
                    Me.Left = 0
                    Me.Top = 0
                Case Screen_TopRight
                    Me.Left = CInt(Screen.Width - Screen.Width / 2)
                    Me.Top = 0
                Case Screen_BottomLeft
                    Me.Left = 0
                    Me.Top = CInt(Screen.Height - Screen.Height / 2)
                Case Screen_BottomRight
                    Me.Left = CInt(Screen.Width - Screen.Width / 2)
                    Me.Top = CInt(Screen.Height - Screen.Height / 2)
            End Select
            Me.Width = CInt(Screen.Width / 2)
            Me.Height = CInt(Screen.Height / 2)
        End If
    End Sub

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Measuring programming progress by lines of code is like measuring aircraft building progress by weight.” - Bill Gates