|
|
|
Click here to copy the following block | Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long Private Declare Function BeginPath Lib "gdi32" (ByVal hdc 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 Private Declare Function EndPath Lib "gdi32" (ByVal hdc As Long) As Long Private Declare Function StrokePath Lib "gdi32" (ByVal hdc As Long) As Long Private Declare Function FillPath Lib "gdi32" (ByVal hdc As Long) As Long Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long Private Declare Function StrokeAndFillPath Lib "gdi32" (ByVal hdc As Long) As Long Private Declare Function AbortPath Lib "gdi32.dll" (ByVal hdc As Long) As Long
Private Sub Form_Paint() Dim hBrush As Long, oldBrush As Long, TargetDC As Long Const sText = "BinaryWorld" Me.Cls Me.FontName = "Tahoma" Me.FontSize = 35
Me.ScaleMode = vbPixels TargetDC = Me.hdc hBrush = CreateSolidBrush(vbWhite)
oldBrush = SelectObject(TargetDC, hBrush)
Me.ForeColor = vbBlack
BeginPath TargetDC ret = TextOut(TargetDC, 0, 0, sText, Len(sText)) If ret Then EndPath TargetDC FillPath TargetDC Else AbortPath TargetDC End If BeginPath TargetDC Me.ForeColor = vbBlue ret = TextOut(TargetDC, 0, 50, sText, Len(sText)) If ret Then EndPath TargetDC StrokePath TargetDC Else AbortPath TargetDC End If BeginPath TargetDC Me.ForeColor = vbRed ret = TextOut(TargetDC, 0, 100, sText, Len(sText)) If ret Then EndPath TargetDC StrokeAndFillPath TargetDC Else AbortPath TargetDC End If SelectObject TargetDC, oldBrush DeleteObject hBrush End Sub |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|