Torna al Thread
Imports DxVBLib
Public Class frmRisoluzione
Dim dx As New DirectX7
Dim dd As DirectDraw7
Private Sub frmRisoluzione_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dd = dx.DirectDrawCreate("")
RecuperaImpSchermo()
End Sub
Private Sub btnRipristina_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRipristina.Click
dd.RestoreDisplayMode()
RecuperaImpSchermo()
End Sub
Private Sub btnAttiva_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAttiva.Click
RidefinisciSchermo()
RiposizionaMain()
End Sub
Private Sub RecuperaImpSchermo()
Dim mySurface As DDSURFACEDESC2
dd.GetDisplayMode(mySurface)
txtXres.Text = mySurface.lWidth.ToString
txtYres.Text = mySurface.lHeight.ToString
txtDeph.Text = "32"
txtRefr.Text = mySurface.lRefreshRate.ToString
End Sub
Private Sub RidefinisciSchermo()
dd.SetDisplayMode(Int16.Parse(txtXres.Text), Int16.Parse(txtYres.Text), Int16.Parse(txtDeph.Text), _
Int16.Parse(txtRefr.Text), 0)
End Sub
End Class