Color Dialog

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?R3JlZw==?=

    #1

    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.AllowF ullOpen = False
    ' Allows the user to get help. (The default is false.)
    MyDialog.ShowHe lp = 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.ShowD ialog() = 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.
  • Linda Liu[MSFT]

    #2
    RE: Color Dialog

    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.

    Comment

    • =?Utf-8?B?R3JlZw==?=

      #3
      RE: Color Dialog

      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.
      >
      >

      Comment

      • Kerem Gümrükcü

        #4
        Re: Color Dialog

        Hi Greg,

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

        possibly this too:
        ColorDialog.All owFullOpen = true;

        is what you are looking for,...

        Maybe this for future:
        ColorDialog.Any Color = 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."


        Comment

        Working...