Put The Code In a Module and Call It from any Form. Amazing The Form Appear in Multi Color
Put The Code In a Module and Call It from any Form. Amazing The Form Appear in Multi Color
Rate Put The Code In a Module and Call It from any Form. Amazing The Form Appear in Multi Color
(1(1 Vote))
Const intBLUESTART% = 255
Const intBLUEEND% = 0
Const intBANDHEIGHT% = 2
Const intSHADOWSTART% = 8
Const intSHADOWCOLOR% = 1
Const intTEXTSTART% = 4
Const intTEXTCOLOR% = 15
Const intRed% = 2 '1
Const intGreen% = 4 '2
Const intBlue% = 8 '4
Const intBackRed% = 16 '8
Const intBackGreen% = 16
Const intBackBlue% = 32
Dim sngBlueCur As Single
Dim sngBlueStep As Single
Dim intFormHeight As Integer
Dim intFormWidth As Integer
Dim intY As Integer
Dim iColor As Integer
Dim iRed As Single, iBlue As Single, iGreen As Single
'
'Get system values for height and width
'
intFormHeight = theForm.ScaleHeight
intFormWidth = theForm.ScaleWidth
'If ReadIniFile(gstrSetupInfoFile, gstrINI_SETUP, gstrINI_COLOR) = vbNullString Then
iColor = 109 '155
'Else
' iColor = CInt(ReadIniFile(gstrSetupInfoFile, gstrINI_SETUP, gstrINI_COLOR))
'End If
'Calculate step size and blue start value
'
sngBlueStep = intBANDHEIGHT * (intBLUEEND - intBLUESTART) / intFormHeight
sngBlueCur = intBLUESTART
'Paint blue screen
For intY = 0 To intFormHeight Step intBANDHEIGHT
If iColor And intBlue Then iBlue = sngBlueCur
If iColor And intRed Then iRed = sngBlueCur
If iColor And intGreen Then iGreen = sngBlueCur
If iColor And intBackBlue Then iBlue = 255 - sngBlueCur
If iColor And intBackRed Then iRed = 255 - sngBlueCur
If iColor And intBackGreen Then iGreen = 255 - sngBlueCur
theForm.Line (-1, intY - 1)-(intFormWidth, intY + intBANDHEIGHT), RGB(iRed, iGreen, iBlue), BF
sngBlueCur = sngBlueCur + sngBlueStep
Next intY
'Print 'shadowed' appname
theForm.CurrentX = intSHADOWSTART
theForm.CurrentY = intSHADOWSTART
theForm.ForeColor = QBColor(intSHADOWCOLOR)
theForm.Print theForm.Caption
theForm.CurrentX = intTEXTSTART
theForm.CurrentY = intTEXTSTART
theForm.ForeColor = QBColor(intTEXTCOLOR)
theForm.Print theForm.Caption
End Sub
Put The Code In a Module and Call It from any Form. Amazing The Form Appear in Multi Color Comments
No comments yet — be the first to post one!
Post a Comment