Change button colour


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Change button colour

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    Change button colour

    [Originally posted by Nico_nz]

    Hey dudes

    Does anyone know the code for changing a button colour when it is pressed, i.e. once the user presses a button the button changes colour to let the user know that the button has been pressed.

    Cheers in advance.

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Change button colour

    [Originally posted by Chris Klopotowski]

    I'm a newb but it should work:

    * * Private Sub cmdExit_Click* * * * cmdExit.BackColor = System.Drawing.Color.Red
    * * End Sub

    or in VB6...

    * * Private Sub cmdExit_Click* * * * cmdExit.BackColor = vbRed
    * * End Sub

    Hope this helps...

  3. #3
    Join Date
    Aug 2004
    Posts
    43,023

    Re:Change button colour

    [Originally posted by Chris Klopotowski]

    I'm a newb but it should work:

    * * Private Sub cmdExit_Click* * * * cmdExit.BackColor = System.Drawing.Color.Red
    * * End Sub

    or in VB6...

    * * Private Sub cmdExit_Click* * * * cmdExit.BackColor = vbRed
    * * End Sub

    Hope this helps...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center