15 Ocak 2012 Pazar

Visual Basic Gökkuşağı renklerinde TextBox oluştumak

Posted by Unknown On 00:12 No comments

1. Standart EXE projesi baslat
2. Asagidaki kodu Form'un Paint proc'una yaz:

Sub Form_Paint()
Dim I As Integer, X As Integer, Y As Integer
Dim C As String
Cls
For I = 0 To 91
X = CurrentX
Y = CurrentY
C = Chr(I)
Line -(X + TextWidth(C), Y = TextHeight(C)), QBColor(Rnd * 16), BF
CurrentX = X
CurrentY = Y
ForeColor = RGB(Rnd * 256, Rnd * 256, Rnd * 256)
Print "Merhaba Basic Programciligi"
Next
End Sub

3. Projeyi çalistirirsaniz formun degisik renklerde yaziyla kaplandigini görürsünüz.
and watch the form fill with lots of multi-coloured text

0 yorum:

Yorum Gönder