T
TerryLa
Guest
For some number of years I have been using the code listed below to capture my app's form. What I am now seeing is that if users is scaling the display to anything over 100% then part of the form is missing when captured. Anyone know of a way to account for the scaling factor so the whole form gets captured?
Private Sub CaptureScreen()
Dim myGraphics As Graphics = Me.CreateGraphics()
Dim s As Size = Me.Size
My.Application.DoEvents() ' ensure drop downs are hidden b4 capturing image
memoryImage = New Bitmap(s.Width, s.Height, myGraphics)
Dim memoryGraphics As Graphics = Graphics.FromImage(memoryImage)
memoryGraphics.CopyFromScreen(Me.Location.X, Me.Location.Y, 0, 0, s)
myGraphics.Dispose()
memoryGraphics.Dispose()
End Sub
TIA
Terry
Continue reading...
Private Sub CaptureScreen()
Dim myGraphics As Graphics = Me.CreateGraphics()
Dim s As Size = Me.Size
My.Application.DoEvents() ' ensure drop downs are hidden b4 capturing image
memoryImage = New Bitmap(s.Width, s.Height, myGraphics)
Dim memoryGraphics As Graphics = Graphics.FromImage(memoryImage)
memoryGraphics.CopyFromScreen(Me.Location.X, Me.Location.Y, 0, 0, s)
myGraphics.Dispose()
memoryGraphics.Dispose()
End Sub
TIA
Terry
Continue reading...