Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Quad Display - 4 VB programs

Last post 08-07-2008 1:29 PM by Jugatsu. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-06-2008 9:55 PM

    • PeterB773
    • Not Ranked
    • Joined on 08-06-2008
    • United Kingdom
    • New Member
    • Points 10

    Quad Display - 4 VB programs

    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.
     

    • Post Points: 10
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 08-07-2008 1:29 PM In reply to

    • Jugatsu
    • Top 500 Contributor
    • Joined on 02-15-2006
    • Addicted Member
    • Points 485

    Re: Quad Display - 4 VB programs

    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 Points: 5
Page 1 of 1 (2 items)