|  | 
		
                    
                        | Const TA_BASELINE = 24 Const TA_BOTTOM = 8
 Const TA_CENTER = 6
 Const TA_LEFT = 0
 Const TA_NOUPDATECP = 0
 Const TA_RIGHT = 2
 Const TA_TOP = 0
 Const TA_UPDATECP = 1
 Const TA_MASK = (TA_BASELINE + TA_CENTER + TA_UPDATECP)
 Private Declare Function SetTextAlign Lib "gdi32" (ByVal hdc As Long, ByVal wFlags As Long) As Long
 Private Declare Function TextOut Lib "gdi32" Alias "TextOutA" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpString As String, ByVal nCount As Long) As Long
 Const mStr = "www.allapi.net"
 Private Sub Form_Paint()
 'KPD-Team 2000
 'URL: http://www.allapi.net/
 'E-Mail: KPDTeam@Allapi.net
 'set the form's scalemode to pixels
 Me.ScaleMode = vbPixels
 'set the forecolor to white
 Me.ForeColor = vbWhite
 'draw some lines to show where our TextOut-x- and y-parameters are
 Me.Line (100, 0)-(100, 100)
 Me.Line (100, 100)-(0, 100)
 Me.Line (150, 0)-(150, 150)
 Me.Line (150, 150)-(0, 150)
 'set the forecolor back to black
 Me.ForeColor = vbBlack
 'call textalign to align to the right
 SetTextAlign Me.hdc, TA_RIGHT Or TA_TOP Or TA_NOUPDATECP
 'show some text
 TextOut Me.hdc, 100, 100, mStr, Len(mStr)
 'call textalign to align to the left
 SetTextAlign Me.hdc, TA_LEFT Or TA_TOP Or TA_NOUPDATECP
 'show some text
 TextOut Me.hdc, 150, 150, mStr, Len(mStr)
 End Sub
 
 
 
 |  |