In the Color Class, there's a method GetColor which returns a color and accepts a string of the color you want, and I'm having problems getting it to work - namely, I want to know exactly what this string it takes is. Is it the name of the color you want, so you could type GetColor("BLACK ") and get back the Color.black, or is it some other representation of the color? Any response would be greatly appreciated. Thanks!
1 943
In the Color Class, there's a method GetColor which returns a color and accepts a string of the color you want, and I'm having problems getting it to work - namely, I want to know exactly what this string it takes is. Is it the name of the color you want, so you could type GetColor("BLACK ") and get back the Color.black, or is it some other representation of the color? Any response would be greatly appreciated. Thanks!
Open the API docs pages for Color and read the explanation given for that method.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Kay |
last post by:
Hello,
My question isn't specific to .Net but as .Net is object oriented, I would
be interested if someone could let me know if there is a standard way of
implementing what I describe below in OO or if it is covered by a design
pattern. I hope someone can help me as I have been looking for a solution to
this question for a while.
For example:
|
by: Alfonso Morra |
last post by:
if I have a class template declared as ff:
(BTW is this a partial specialization? - I think it is)
template <typename T1, myenum_1 e1=OK, my_enum_2=NONE>
class A {
public:
A();
virtual ~A() ;
|
by: Jon Slaughter |
last post by:
I have a class that is basicaly duplicated throughout several files with
only members names changing according to the class name yet with virtually
the exact same coding going on.
e.g.
class A
{
std::vector<B*> Bs;
public:
|
by: __PPS__ |
last post by:
Hello everybody, today I had another quiz question
"if class X is privately derived from base class Y what is the scope of
the public, protected, private members of Y will be in class X"
By scope they meant public/protected/private access modifiers :)
Obviously all members of the base privately inherited class will be
private, and that was my answer. However, the teacher checked my
answers when I handed in, and the problem was that I had...
|
by: Kamen Yotov |
last post by:
hi all,
i first posted this on
http://msdn.microsoft.com/vcsharp/team/language/ask/default.aspx
(ask a c# language designer) a couple of days ago, but no response so far...
therefore, i am pasting it here as well... enjoy!
(you can skip to the source at the end of the message if you like...)
Consider:
| |
by: z_learning_tester |
last post by:
Quick question-
What happens if you have a private class with a public static method?
Can you still say the following?
Lets say you are making this call from another class, say class2...
int myVal = class1.method();
It seems that you should not be able to, after all from class2, you should
not be able to see the private class1, so it's public static method is
effectively wasted.
|
by: Hasani \(remove nospam from address\) |
last post by:
I was reading a ppt ( http://www.gotdotnet.com/team/pdc/4064/tls310.ppt )
and came aross this statement.
"Users can leverage a destructor. The C++ compiler generates all the Dispose
code automatically, including chaining calls to Dispose. (There is no
Dispose pattern)"
but Dispose can thrown an exception. Is the exception supressed?
|
by: rodchar |
last post by:
Hey all,
I'm trying to understand Master/Detail concepts in VB.NET. If I do a data
adapter fill for both customer and orders from Northwind where should that
dataset live?
What client is responsible for instantiating the orders class? Would it be
the ui layer or the master class in the business layer?
thanks,
|
by: Chris Puncher |
last post by:
Hi.
I have a RCW class that was generated by the VS.NET2003 IDE when I added a
COM dll reference to my project. This all works fine when I call methods on
it. My initial problem is that in ASP.NET I would like to add this to the
Session object whilst using SQLServer as the session storage. Unfortunately,
as this required the RCW class to be serializable, this won't work, and
throws an exception saying you can't Serialize the Session...
|
by: tshad |
last post by:
I am playing with Inheritance and want to make sure I understand it.
I have the following Classes:
*******************************************
Public Class AuthHeader:Inherits SoapHeader
Public AuthHeaderName As String
Public SessionKey As String = "Default"
End Class
Public Class ServiceTicket:Inherits AuthHeader
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |