AdvancedHMI Software

General Category => Tips & Tricks => Topic started by: Archie on November 12, 2016, 02:38:36 PM

Title: Launching an application on a second monitor
Post by: Archie on November 12, 2016, 02:38:36 PM
If you have a multi-monitor setup and want an AdvancedHMI application to always start on the second monitor:

- In design view of the MainForm, double click in a blank area. This will take you back to the FormLoad event handler
- Add this coce:
Code: [Select]
   Private Sub MainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        If Screen.AllScreens.Length > 1 Then
            Me.Location = Screen.AllScreens(1).Bounds.Location
        End If
    End Sub
Title: Re: Launching an application on a second monitor
Post by: oqapsking on May 03, 2017, 04:21:18 PM
this is a great code

thanks
Title: Re: Launching an application on a second monitor
Post by: Archie on May 03, 2017, 04:53:27 PM
The AdvancedHMI panel PCs have an HDMI output with up to 1920x1080 resolution. This feature was designed into the panel to allow an HMI and large production display to operate from a single unit. The code snippet above enables this.