Results 1 to 3 of 3

Thread: [RESOLVED] how to clear the color in the picture box

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Resolved [RESOLVED] how to clear the color in the picture box

    I have select the color using common dialog.How I can clear the color in the picture box?

    Code:
    CommonDialog1.ShowColor
    Picture1.BackColor = CommonDialog1.Color

  2. #2
    Addicted Member cxj98's Avatar
    Join Date
    Feb 2007
    Posts
    170

    Re: how to clear the color in the picture box

    you can set it to default solor

    Code:
    Option Explicit
    Private Sub Command1_Click()
        CommonDialog1.ShowColor
        Picture1.BackColor = CommonDialog1.Color
    End Sub
    Private Sub Command2_Click()
        Picture1.BackColor = &H8000000F
    End Sub

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Re: how to clear the color in the picture box

    Thank you so much..

    During run time. When I click cancel, it color my picture box with black?I don't want the picturebox will color when I click cancel. Why? How to solve that?

    Code:
    Private Sub Command1_Click()
        CommonDialog1.ShowColor
        Picture1.BackColor = CommonDialog1.Color
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width