473,772 Members | 3,646 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting the default forum color for reuse.

2 New Member
I have a simple (currently) form app where I have a few draw string Graphics methods happening. To clear the drawn string I am simply doing a drawObj.Clear(S ystem.Drawing.C olor.Blue); Which clears the drawn string adequately and for lack of knowing another way of doing this.

The question being, how can i get the current "default" color of the form so that I can use that as the Clear color since I don't know the default color and in case someone changes color schemes?

If another better solution is offered, I am still interested in how to get the default color used on the base windows form.

Thanks.
Trixy
Sep 12 '09 #1
3 1604
GaryTexmo
1,501 Recognized Expert Top Contributor
I believe it's SystemColors.Co ntrol
Sep 12 '09 #2
tlhintoq
3,525 Recognized Expert Specialist
That would be the default but you could just check the current form background color. It doesn't really matter what the default is if this particular form has been changed from the default... maybe through a new feature that you haven't added yet.

this.backcolor
Sep 12 '09 #3
Trixy
2 New Member
Thank you!

this.backcolor was exactly what i was looking for.

Trixy
Sep 14 '09 #4

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

Similar topics

37
12754
by: ajay | last post by:
How to make a web page getting refreshed after a given time interval automatically. HTML Code plz. Tx Ajay
6
1708
by: Affan Syed | last post by:
Hi, I am getting this weird problem. I know what i am doing is strange.. i am using C++ vectors and fopen, but for some reason if i used ofstream in the similar scenario it would give me errors. So here is what i do. I create a new node and insert it in a vecotr as follows: nodeCreator = new cNode(location, skew, offset,Beaconify,nodeId,directory); gNodeVector.push_back(*nodeCreator); //now lets delete the memory we created for the node
14
2276
by: John J. Hughes II | last post by:
Using the below code I am send multiple sterilized object across an IP port. This works fine if only one object is received at a time but with packing sometimes there is more then one object or half an object in the received data. If I place the data in a memory stream on the received side is there a way to determine where one ends and the next one start? Since the deserializer stream seems to move the pointer I am trying to look at the...
21
5772
by: Marc DVer | last post by:
I am trying to create a query that can be loaded as a querydef object but not having to assign values to the parameters if I don't want to. Normally when using a parameter query in VBA my code would go something like this: dim qry as dao.querydef set qry = currentdb.querydefs("myquery") qry.parameters("Par1") = "blah"
0
4072
by: integragreg | last post by:
I apologize in advance if I am posting to the wrong group, but at least one of my questions is related to Platform Invoke in C#. I am using .NET Framework 1.1, and for improved performance, I need to be able to reuse a client socket by placing it into a pool. Unfortunately, with .NET Framework 1.1 I have no way to close a socket's connection to a remote host without disposing of the socket's resources altogether (i.e, Socket.Close()),...
16
2332
by: sailor.gu | last post by:
Hi all guys, As an embeded programmer with five year C experience, I did read many great books related with design, coding, test,debug,algorithms, compiler, design, os, pm and others. I always dream to achieve a refined and reusable design and implementation. I am very interested with code reuse.
19
2385
by: jacob navia | last post by:
There is an interesting discussion running in Slashdot now, about code reuse. The thema of the discussion is here: < quote > Susan Elliot Sim asks: "In the science fiction novel, 'A Deepness in the Sky,' Vernor Vinge described a future where software is created by 'programmer archaeologists' who search archives for existing pieces of code, contextualize them, and combine them into new applications. So
6
3828
by: Bart Simpson | last post by:
I remember reading on parashift recently, that "Composition is for code reuse, inheritance is for flexibility" see (http://www.parashift.com/c++-faq-lite/smalltalk.html#faq-30.4) This confused me somewhat as I have always thought you get code reuse "for free" with inheritance. Am I missing something?. Will someone care to explain ??
10
2520
by: Brad Baker | last post by:
I have an asp.net/csharp application that requires a particular variable to work properly. This variable is usually passed via a query string in the URL when the application is first run but under certain circumstances the query string may not contain the variable. So I need some way of establishing a default value if one isn't set. Is there some way I can set a query string on page_load OR is there some way I can use a global variable...
0
9620
marktang
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...
0
9454
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,...
0
10261
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, 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...
1
10038
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,...
1
7460
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 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...
0
5354
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.