Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Background color

Status
Not open for further replies.

Sika2

Technical User
Sep 25, 2001
41
NZ
Hi,

I am creating a picture to display on my splash screen using Photoshop. My problem is getting the background set to the same shade of gray as the VB Splashscreen. I can get close but the background is still slightly wrong. Any help appreciated.

Thanks
 
Hi 1 way is to use nameofform.point to return the colour of a particular pixel on the background.

i.e the following code will give you a hexadecimal reprensentation of the pixel colour in the top left corner of the form the code is in.

***code***
Dim pixelcolour As Long
Dim PixelRGB As String

pixelcolour = (Me.Point(0, 0)) ' Get the colour of the pixel in the top left hand corner of the form
PixelRGB = Hex$(pixelcolour) ' Get it in to a HEX format BlueGreenRed
******

The value in PixelRGB will be encode as BBGGRR so if the value of PixelRGB is C8D0D4
Then the blue is C8 (200), Green is D0 (208) and Red is D4 (212).

HTH

Dave



 
Take a screen shot of the splash screen you're interested in, and then use a colour picker on it to find the value...

Or, if you want me to save you the trouble, rgb(248,248,248)

mmilan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top