GoGreen PC Tune-Up™
Learn More

Insta-Install™
this is how ssl encrypt our websites
MTNCOMP | List View | Table View | myBlog (1762 Entries)
myBlog Home

Blog


VB6 form test pattern scalemode

by Mountain Computers Inc., Publication Date: Tuesday, December 3, 2019

View Count: 1361, Keywords: Visual Basic 6, Forms, ScaleHeight, ScaleWidth, Line, Test Pattern, Hashtags: #VisualBasic6 #Forms #ScaleHeight #ScaleWidth #Line #TestPattern



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()
Call DrawTestPattern
End Sub

Private Sub Form_Load()
Call DrawTestPattern
End Sub

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

Randomize
Debug.Print Rnd
'While x < 1000
'     x = x + 1
'     y = y + 5
'    GGPCM.PSet (x, y), vbBlack
'Wend

'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)

'Cross T
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)

End Sub

Private Sub CreateMandalaMatrix()

End Sub
 
 

if you found this article helpful, consider contributing $10, 20 an Andrew Jackson 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.

© 2024 myBlog™ v1.1 All rights reserved. We count views as reads, so let's not over think it.