473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Color Dialog

I've been trying to figure out how to show a color dialog in VB.Net . I've
come across the following code that shows it, but its not the advanced color
dialog I am looking for. I know there is another way to show a color dialog
box, but I can't seem to find it.

Dim MyDialog As New ColorDialog()
' Keeps the user from selecting a custom color.
MyDialog.AllowFullOpen = False
' Allows the user to get help. (The default is false.)
MyDialog.ShowHelp = True
' Sets the initial color select to the current text color,
MyDialog.Color = Me.BackColor
' Update the text box color if the user clicks OK
If (MyDialog.ShowDialog() = DialogResult.OK) Then
Me.BackColor = MyDialog.Color
End If

I thought there was a shortcut type of code that would allow me to show the
color dialog. Can anyone point me in the right direction .

Thanks.
Dec 21 '07 #1
3 1920
Hi,

In WinForm applications, there's only one way to show a color dialog, i.e.
create an instance of ColorDialog class and call the Show or ShowDialog
method of the dialog instance to show it.
I've come across the following code that shows it, but its not the
advanced color dialog I am looking for.

What is the advanced color dialog you are looking for?
I thought there was a shortcut type of code that would allow me to show
the color dialog.

No, there isn't a shortcut type of code that would allow us to show the
color dialog.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Dec 21 '07 #2
When the dialog opens, there is a button to expand the color dialog for the
user to create their own color definition. But, when I show the dialog this
button is not enabled. Do I have to enable it somehow?

"Linda Liu[MSFT]" wrote:
Hi,

In WinForm applications, there's only one way to show a color dialog, i.e.
create an instance of ColorDialog class and call the Show or ShowDialog
method of the dialog instance to show it.
I've come across the following code that shows it, but its not the
advanced color dialog I am looking for.

What is the advanced color dialog you are looking for?
I thought there was a shortcut type of code that would allow me to show
the color dialog.

No, there isn't a shortcut type of code that would allow us to show the
color dialog.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Dec 22 '07 #3
Hi Greg,

have a look at the ColorDialog members:
ColorDialog.FullOpen = true;

possibly this too:
ColorDialog.AllowFullOpen = true;

is what you are looking for,...

Maybe this for future:
ColorDialog.AnyColor = true;

As said, have a look at all the ColorDialog Properties,...
Regards

Kerem

--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."
Dec 22 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Carmine | last post by:
I'm currently writing a small program that churns on a repetitive task while displaying a progress & cancel modeless dialog. I've been having problems due to threadlocking, and I was wondering if...
4
by: Alexander | last post by:
Hi, I have written a program that takes on some operations much more time than I expected. As I have seen users clicking wildly on the screen to make something happen, I want to follow the...
6
by: WhoopDing | last post by:
How do I display a Color Dialog in the client browser? I want the Color Dialog to be displayed when the user clicks a button.
2
by: J-Rod | last post by:
Hi everyone/anyone, I am using a button in my app that opens the color dialog, and allows the user to select a color which changes the backcolor of a label. I then store the color in my db as a...
11
by: Zytan | last post by:
I have created a new form from the main form. When I close the main form with the 'x' close button, its Form.FormClosed event is run, but not the dialog's. Is this normal? It is ok /...
3
by: deciacco | last post by:
I'm trying to write a label printing SDI app with a small preview on the main form itself. Every time I run the InvalidatePreview event on the preview control to redraw the preview I get the...
6
by: kdikert | last post by:
I have a worker thread, and when the worker is done I want it to show a popup dialog. The sample application below demonstrates this. There are two buttons: a "Show dialog" button which immediately...
0
by: Moezzie | last post by:
So ive got a bit of a problem here. Ive been searching the net about this for quite some time now but i just cant seem to figure out how to open a dialog that ive made in QtDesigner. Of corse i...
4
by: OldBirdman | last post by:
I have 2 rectangles side-by-side and I want them to be colored. I select both and use the Color Dialog Box to assign a color, say green with medium saturation. In other words, the scale along the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.