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. 6 4218
There is a color dialog control in Win32, but if you want a 100% web
based solution you'll need to roll your own, or build on top of
existing work: http://www.google.com/search?hl=en&l...e+color+picker
--
Scott http://www.OdeToCode.com/blogs/scott/
On Sun, 20 Feb 2005 01:11:27 -0000, "WhoopDing"
<wh*******@hotmail.co.uk> wrote: 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.
Sorry, maybe I should be a bit more specific.
I am new to .Net. So, my query is no doubt a simple one.
I have the folowing code in the WebForm:
Imports System.Windows.Forms.ColorDialog
....
Private ColorDialog As New Windows.Forms.ColorDialog
The problem I get is I get an error when the button that opens then
ColorDialog is clicked.
This is the error:
It is invalid to show a modal dialog or form when the application is not
running in UserInteractive mode. Specify the ServiceNotification or
DefaultDesktopOnly style to display a notification from a service
application.
The code in the Button Click EventHnadler is:
Private Sub cmdColor_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cmdColor.Click
ColorDialog.ShowDialog()
If ColorDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
pnlColor.BackColor = ColorDialog.Color
End If
End Sub
"Scott Allen" <sc***@nospam.odetocode.com> wrote in message
news:1k********************************@4ax.com... There is a color dialog control in Win32, but if you want a 100% web based solution you'll need to roll your own, or build on top of existing work: http://www.google.com/search?hl=en&l...e+color+picker
-- Scott http://www.OdeToCode.com/blogs/scott/
On Sun, 20 Feb 2005 01:11:27 -0000, "WhoopDing" <wh*******@hotmail.co.uk> wrote:
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.
Yes, WhoopDing - this is what I was trying to point out.
In ASP.NET development you can't use classes from System.Windows.Forms
to pop up dialogs and such on a user's screen.
The client's web browser makes a request to your application, and your
application should respond with HTML and JavaScript that the browser
can interpret and display. The code you are working with executes on
the server - you don't want to pop up a dialog on the web server.
Hope this is making some sense,
--
Scott http://www.OdeToCode.com/blogs/scott/
On Sun, 20 Feb 2005 12:29:42 -0000, "WhoopDing"
<wh*******@hotmail.co.uk> wrote: Sorry, maybe I should be a bit more specific.
I am new to .Net. So, my query is no doubt a simple one.
I have the folowing code in the WebForm: Imports System.Windows.Forms.ColorDialog
...
Private ColorDialog As New Windows.Forms.ColorDialog
The problem I get is I get an error when the button that opens then ColorDialog is clicked.
This is the error:
It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
The code in the Button Click EventHnadler is:
Private Sub cmdColor_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdColor.Click
ColorDialog.ShowDialog()
If ColorDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
pnlColor.BackColor = ColorDialog.Color
End If
End Sub
"Scott Allen" <sc***@nospam.odetocode.com> wrote in message news:1k********************************@4ax.com.. . There is a color dialog control in Win32, but if you want a 100% web based solution you'll need to roll your own, or build on top of existing work: http://www.google.com/search?hl=en&l...e+color+picker
-- Scott http://www.OdeToCode.com/blogs/scott/
On Sun, 20 Feb 2005 01:11:27 -0000, "WhoopDing" <wh*******@hotmail.co.uk> wrote:
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.
OK, I have that. How, then, do I cause the browser to open a dialog box
where the user can select a color?
Forgive my newness!
Thanks
"Scott Allen" <sc***@nospam.odetocode.com> wrote in message
news:rg********************************@4ax.com... Yes, WhoopDing - this is what I was trying to point out.
In ASP.NET development you can't use classes from System.Windows.Forms to pop up dialogs and such on a user's screen.
The client's web browser makes a request to your application, and your application should respond with HTML and JavaScript that the browser can interpret and display. The code you are working with executes on the server - you don't want to pop up a dialog on the web server.
Hope this is making some sense,
-- Scott http://www.OdeToCode.com/blogs/scott/
On Sun, 20 Feb 2005 12:29:42 -0000, "WhoopDing" <wh*******@hotmail.co.uk> wrote:
Sorry, maybe I should be a bit more specific.
I am new to .Net. So, my query is no doubt a simple one.
I have the folowing code in the WebForm: Imports System.Windows.Forms.ColorDialog
...
Private ColorDialog As New Windows.Forms.ColorDialog
The problem I get is I get an error when the button that opens then ColorDialog is clicked.
This is the error:
It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
The code in the Button Click EventHnadler is:
Private Sub cmdColor_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdColor.Click
ColorDialog.ShowDialog()
If ColorDialog.ShowDialog = Windows.Forms.DialogResult.OK Then
pnlColor.BackColor = ColorDialog.Color
End If
End Sub
"Scott Allen" <sc***@nospam.odetocode.com> wrote in message news:1k********************************@4ax.com. .. There is a color dialog control in Win32, but if you want a 100% web based solution you'll need to roll your own, or build on top of existing work: http://www.google.com/search?hl=en&l...e+color+picker
-- Scott http://www.OdeToCode.com/blogs/scott/
On Sun, 20 Feb 2005 01:11:27 -0000, "WhoopDing" <wh*******@hotmail.co.uk> wrote:
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.
What I would do is look at some of the color picker controls people
have built, there are a few on this page: http://asp.net/ControlGallery/defaul...y=7&tabindex=2
Depending on how you want the user to interact with the control and
how many colors it displays, etc, etc you might chose to use one or
take the source code from an existing control and tweak it.
--
Scott http://www.OdeToCode.com/blogs/scott/
On Sun, 20 Feb 2005 15:16:38 -0000, "WhoopDing"
<wh*******@hotmail.co.uk> wrote: OK, I have that. How, then, do I cause the browser to open a dialog box where the user can select a color?
Forgive my newness!
That's what I want.
Thanks for your help (sorry to be a pest).
"Scott Allen" <sc***@nospam.odetocode.com> wrote in message
news:ck********************************@4ax.com... What I would do is look at some of the color picker controls people have built, there are a few on this page:
http://asp.net/ControlGallery/defaul...y=7&tabindex=2
Depending on how you want the user to interact with the control and how many colors it displays, etc, etc you might chose to use one or take the source code from an existing control and tweak it.
-- Scott http://www.OdeToCode.com/blogs/scott/
On Sun, 20 Feb 2005 15:16:38 -0000, "WhoopDing" <wh*******@hotmail.co.uk> wrote:
OK, I have that. How, then, do I cause the browser to open a dialog box where the user can select a color?
Forgive my newness! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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...
|
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...
|
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 /...
|
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...
| |
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...
|
by: =?Utf-8?B?R3JlZw==?= |
last post by:
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...
|
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...
|
by: Iain King |
last post by:
Hi. I have a modal dialog whcih has a "Browse..." button which pops
up a file selector. This all works fine, but the first thing the user
has to do when they open the dialog is select a file, so...
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |