I am trying to get background color to fade. Such as a dark blue on the lower left corner, fading over to a light blue on the upper right right. Anybody done this before?
Hmmm, strongm I thought you were refering to my post, and the gradient fill I am talking about is in the setup1 project that you can customize to make your own specialized setup programs.
Here is the code from the setup program (frmSetup1).
[tt]
'-----------------------------------------------------------
' SUB: DrawBackGround
'
' Draws the 'blue wash' screen and prints the 'shadowed'
' app setup title
'-----------------------------------------------------------
'
Private Sub DrawBackGround()
Const intBLUESTART% = 255
Const intBLUEEND% = 0
Const intBANDHEIGHT% = 2
Const intSHADOWSTART% = 8
Const intSHADOWCOLOR% = 0
Const intTEXTSTART% = 4
Const intTEXTCOLOR% = 15
Const intRed% = 1
Const intGreen% = 2
Const intBlue% = 4
Const intBackRed% = 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 = ScaleHeight
intFormWidth = ScaleWidth
If Len(ReadIniFile(gstrSetupInfoFile, gstrINI_SETUP, gstrINI_COLOR)) = 0 Then
iColor = intBlue
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
Line (-1, intY - 1)-(intFormWidth, intY + intBANDHEIGHT), RGB(iRed, iGreen, iBlue), BF
sngBlueCur = sngBlueCur + sngBlueStep
Next intY
and as you can see I did not mean the API call but then again I was not totally clear either. I probably should have said "wash screen" or blue background on setup or something else.
But then again that is what we get for ASSuME(ing)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.