VB6 form test pattern scalemode
Published: Tuesday, December 3, 2019 written by Drew Jackson
View Count: 6
Keywords: Visual Basic 6, Forms, ScaleHeight, ScaleWidth, Line, Test Pattern
For those who want to know how to do a quick vb form test pattern using Line mode in Visual Basic 6 VB6, here is the sample code.
more to come...
I am sure you can create the necessary labels and code adjustments to make it work.
Private Sub Form_DblClick()
Private Sub Form_Load()
Private Sub DrawTestPattern()
'GGPCM.Label1 = "create line, randomize"
GGPCM.Label1 = ""
Debug.Print "create line, randomize"
Dim x, y, w, h
'Debug.Print Screen.Width & ", " & Screen.Height
Debug.Print GGPCM.Width & ", " & GGPCM.Height
Debug.Print GGPCM.ScaleWidth & ", " & GGPCM.ScaleHeight
'scalewidth is accurate to the form dimensions
w = GGPCM.ScaleWidth
h = GGPCM.ScaleHeight
'While x < 1000
' x = x + 1
' y = y + 5
' GGPCM.PSet (x, y), vbBlack
'draw a quadrant
PSet (w - (w * 0.1), h - (h * 0.1)), vbRed
'X corner to corner
GGPCM.Line (0, 0)-(ScaleWidth, ScaleHeight)
GGPCM.Line (ScaleWidth, 0)-(0, ScaleHeight)
GGPCM.Line (0, ScaleHeight * 0.5)-(ScaleWidth, ScaleHeight * 0.5)
GGPCM.Line (ScaleWidth * 0.5, 0)-(ScaleWidth * 0.5, ScaleHeight)
'GGPCM.Line (0, 0)-(w, h)
'GGPCM.Line (w, 0)-(0, h)
Private Sub CreateMandalaMatrix()
if you found this article helpful, consider contributing $10, 20 or so..to the author. more authors coming soon
FYI we use paypal or patreon, patreon has 3x the transaction fees, so we don't, not yet.
© 2019 myBlog™ v1.1 All rights reserved. We count views as reads, so let's not over think it.