OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 24-09-2012, 23:04
gorgo gorgo is offline
Senior Member
Join Date: Feb 2010
Posts: 169
Default change form color with color picker

how can I do this? I'd like a single button that opens the color dialog box and when color is picked apply to form - bonus would be saved settings but I could add this after.
Reply With Quote
Old 02-10-2012, 01:55
shelbym's Avatar
shelbym shelbym is offline
Senior Member
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Form BackColor

This is pretty simple, you just create a new color, get the color from the color dialog, convert to RGB and set the Form BackColor equal to it, so something like:
Private Sub CommandButton1_Click()
    Dim myColor As New Color
    UserForm1.BackColor = RGB(myColor.RGBRed, myColor.RGBGreen, myColor.RGBBlue)
End Sub
If you want to save the setting, look up SaveSetting here or in the help file to save the setting to the registry, there are several examples here how to do this.

Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Form Color Picker? PAnderson CorelDRAW/Corel DESIGNER VBA 1 20-01-2011 20:51
How to change look of color calibration bar in your crop macro krneticv Other Oberon Commercial Products 1 20-12-2007 08:39
How change Color mode used for effects with VBA? igor___ CorelDRAW/Corel DESIGNER VBA 6 22-11-2006 01:44
Change tool cursor color? Ralph Simmons General 1 11-11-2006 12:46
Global color change ddonnahoe CorelDRAW/Corel DESIGNER VBA 8 18-05-2004 12:08

All times are GMT -5. The time now is 08:58.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com