John
John

Reputation: 71

Sending text to projector in VB. NET

I have a need to send text inside richtextbox to projector screen. I have tried to create a new form and make it fullscreen but I cannot yet figure out how I can communicate the text projector as in EasyWorship or PowerPoint. I will appreciate any suggestion. Thanks

Upvotes: 0

Views: 287

Answers (1)

Morcilla de Arroz
Morcilla de Arroz

Reputation: 2182

I think you don't have to communicate with projector itself. You can list the available screens, in order to send that form to the correct one (secondary screen). I mean, something like this:

Dim oYourScreen As Screen = nothing
If Screen.AllScreens.Length > 1 Then
   For iAux As Integer = 0 To Screen.AllScreens.Length - 1
   If Not Screen.AllScreens(iAux).Primary Then
      oYourScreen = Screen.AllScreens(iAux)
      Exit For
    End If
  Next
End If

If oYourScreen Is Nothing Then
  oYourScreen = Screen.AllScreens(0)
End If

Me.StartPosition = FormStartPosition.Manual
Dim x, y As Integer
x = oYourScreen.Bounds.Location.X + 100 ' adjust as you want
y = oYourScreen.Bounds.Location.X + 30
Me.Location = oYourScreen.Bounds.Location ' or New Point(x, y)

Upvotes: 1

Related Questions