Wednesday, June 19, 2013
 
    Search Web Link
Search Software
    
API Home » Device » GetBkColor

GetBkColor

Category: Device
Hits: 3723 Rating: GetBkColor has been rated 2.66 by  1653 users (2.66) votes 1653
Rate: 1-star  2-stars  3-stars  4-stars  5-stars
E-mail this API to friend E-mail this Code to a friend  save Bookmark this VB API Function
API Explanation
The GetBkColor function returns the current background color for the specified device context.

Parameter Information
Declare Function GetBkColor Lib "gdi32" Alias "GetBkColor" (ByVal hdc As Long) As Long

· hdc
Identifies the device context whose background color is to be returned.

If the function succeeds, the return value is a COLORREF value for the current background color.

If the function fails, the return value is CLR_INVALID.
Code



'In general section
Private Declare Function GetBkColor Lib "gdi32" (ByVal hDC As Long) As Long

Private Sub Timer1_Timer()
'Set the Form's backcolor
Me.BackColor = RGB(Int(Rnd*255), Int(Rnd*255), Int(Rnd*255))
'Get the backcolor
MsgBox "My backcolor is:" + Str$(GetBkColor(Me.hDC))
End Sub





HOME | MUSIC | DOWNLOADS |  GAMES | TEST-QUIZZES | SITEMAP | ABOUT | HELP
Copyright © 2000 - 2013 Ex-designz. All rights reserved. Website Developed By Dexter Zafra of Myasp-net.com
Link to us | Advertisement | Contact us | Privacy Policy | Terms of use | Accessibility