473,473 Members | 2,193 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to select the pen color using the color dialog box

1 New Member
How can I select the color of my pen using the color dialog box?
I tried:
If ColorDialog1.ShowDialog() = Windows.Forms.DialogResult.OK
Then
Dim MyPen As New Pen(Color.ColorDialog1.Color, 1)
end if
but I get error:colordialog1 is not member of system.drawing.color
Dec 9 '11 #1
1 3829
kadghar
1,295 Recognized Expert Top Contributor
ColorDialog1 is an object, not a part of the Color library:

Dim MyPen As New Pen(ColorDialog1.Color, 1)

will do
Dec 13 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Randell D. | last post by:
Folks, I have a SELECT that returns with multiple records - It works when I have a LIMIT clause but when I try to include a GROUP BY clause, the select returns nothing (ie no records, no...
1
by: Joseph VanWagoner | last post by:
I want to know how to change the color and look of the <select> border. I wrote: SELECT { BORDER-COLOR:ORANGE; BORDER-STYLE:SOLID; BORDER-SIZE:2PX; } This works for everything, but <select>....
3
by: Justin Sane | last post by:
I haven't been able to select a form using getElementById. I only can select a form using the "name" property of the <form> tag. Is there another way to select a form, or is it even possible to use...
2
by: Michael Turner | last post by:
Hi Can anyone help me with my syntax please. This is not working. Set rs = conn.Execute("SELECT * FROM tblCompany WHERE company like '*" & txt_search & "*';") Thanks in advance Mick
4
by: Sami | last post by:
Hello, I just started out with Windows.Forms and was going through the MS tutorials. In the tutorial where you can create a non-rectangular shaped window by using your own window painted with...
13
by: Mark Kamoski | last post by:
Hi Everyone-- How can one to make a "select directory name" dialog? It would be great if one could use the FileOpenDialog but it does not seem to be straight-forward. Anyway, if you have...
0
by: John | last post by:
Hi all, is there a way to call "Select Users or Groups" dialog from VB.NET? This is the dialog when you browse the users or groups on local computer or on Windows domain. I believe in VB6, it is...
2
by: hharry | last post by:
Hello All, I'm trying to run a Select query with a IN clause using a SqlCommand Object with Paramters, but cannot get the query to return the expected rows. Here is my code snippets: Dim...
1
by: Zach | last post by:
Adding a custom color in color dialog box: How do you do this? I did look through MSDN but could not find the answer. Zach.
6
by: =?Utf-8?B?QnJhc3NpY2FOaWdyYQ==?= | last post by:
Greetings, I have a web application that prints a form using PrintDocument on the server. Currently it is set up to print to the default printer (on the server). My users would like to be...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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,...
1
isladogs
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.