Community discussion forum

Quad Display - 4 VB programs

Tags: vb6 Sri Lanka
  • 3 months 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.
     

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 3 months ago

    Hi,

    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).