Como abrir um Form com VB .net no segundo monitor direto?

Eduardo Andrade 0 Reputation points
2023-02-06T18:09:09.4566667+00:00

Oi,

Estou esperimentando 2 monitores no meu projeto do VB .net

E estava querendo saber como que consigo iniciar um Form direto no meu segundo monitor com o

Form já maximizado, pq qualquer teste que eu faço ele só abre no monitor principal

Qualquer ajuda é apreciada.

Obrigado!

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,580 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Castorix31 81,831 Reputation points
    2023-02-06T18:45:17.3566667+00:00

    [the language of those forums is English]

    From Google Translate, see answers from threads like :

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/fdafc4a7-3356-4615-aa97-e772114ca429/dual-screen-setup-question?forum=vbgeneral

    0 comments No comments

  2. Jiachen Li-MSFT 26,751 Reputation points Microsoft Vendor
    2023-02-22T08:45:32.7766667+00:00

    Hi, You can use Screen Class to get various information about the screen.

    Position the form on the second screen in the form load event.

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim scrns() As Screen = Screen.AllScreens
            If scrns.Length > 1 Then
                Me.StartPosition = FormStartPosition.Manual
                Me.Location = New Point(scrns(1).Bounds.X + Me.Location.X, scrns(1).Bounds.Y + Me.Location.Y)
            End If
        End Sub
    

    Best Regards.
    Jiachen Li
    ----------
    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments