[snip]
Quote:
> This looks great, now how does one add the beveled, 3D text (like in
> installation programs) to the form and keep the correct background
> colors intact?
> --bill
Okay, thanks to all the posts and email, I have got a workable answer:
1. Create a 1x1 pixel .BMP with all the shades of blue in its palette.
I used Paint Shop Pro to grab an area of Microsoft's Video For Windows
Setup screen, and resized the image to 1x1 pixel.
2. Set the picture property of the form to the .BMP you have just created.
(the .BMP is around 1080 bytes in size so this won't slow anything down).
This alters the palette of the form to contain the shades of blue.
3. Write a bit of code that looks a bit like this:
Sub Form_PaintBlue()
Dim i As Integer
Dim blueheight as Integer
Me.ScaleMode = 3 'pixel
blueheight = Me.ScaleHeight \ 256
For i = 0 To 255
Me.Line (0,i*blueheight)-Step(Me.ScaleWidth,blueheight),RGB(0,0,255-i),BF
Next
End
4. To print some "3d" text, the code looks a bit like this:
Sub Form_Print (ByVal x As Single, ByVal y As Single, ByVal text As String)
Me.FontName = "Arial"
Me.FontBold = True
Me.FontSize = 24
Me.CurrentX = x+2
Me.CurrentY = y+2
Me.ForeColor = &H0& 'black
Me.Print text
Me.CurrentX = x
Me.CurrentY = y
Me.ForeColor = &HFFFFF& 'yellow (i think)
Me.Print text
End
5. Now, in your Form_Paint you just have:
Form_Paint
Form_Paintblue
Form_Print 16,16,"Here is some text"
End
Thanks everyone who helped me. I hope this hopes those of you
who posted supplementary questions!
matt.
--
-------------------------------
BSc.Software Engineering Year 4
De Montfort University
Leicester, UK