473,320 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Color Number Storage

Hello All

I have run into a bit or frustration. I am trying to save a color into a sql database. I thought that I could just save the result of color.ToArgb but the result I get (-8323200) dosn't work when I use color.fromArgb(-8323200

I figured this would be the best way to save color information into a database but nothing is working. Does anyone have any experiance with this

Thanks for the help
bra

Nov 20 '05 #1
2 1231
Whhat type of field is it defind as in the database? My guess is the field
dosn't support negitive numbers or is not big enough.

"Brad" <an*******@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
Hello All,

I have run into a bit or frustration. I am trying to save a color into a sql database. I thought that I could just save the result of color.ToArgb
but the result I get (-8323200) dosn't work when I use
color.fromArgb(-8323200)
I figured this would be the best way to save color information into a database but nothing is working. Does anyone have any experiance with this.
Thanks for the help,
brad

Nov 20 '05 #2
Brad,
Which version of VS.NET (2002 or 2003)?

What specifically do you mean "doesn't work"? You get a different color, you
get an exception what?

What type of field are you using the database, it needs to be a 32bit
integer (or larger).

In a simple test I don't see any problems with Color.ToArgb & Color.FromArgb
to convert to & from an Integer, However I have not tried going to a
database...

Hope this helps
Jay

"Brad" <an*******@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
Hello All,

I have run into a bit or frustration. I am trying to save a color into a sql database. I thought that I could just save the result of color.ToArgb
but the result I get (-8323200) dosn't work when I use
color.fromArgb(-8323200)
I figured this would be the best way to save color information into a database but nothing is working. Does anyone have any experiance with this.
Thanks for the help,
brad

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Namratha Shah \(Nasha\) | last post by:
Hey Group, After a long week end I am back again. Its nice and refreshing after a short vacation so lets get started with .NET once again. Today we will discuss about Isolated Storage. This is...
18
by: Andrew | last post by:
Hi, I have a scenario in which both the source and format string for a sscanf() call is selected *at runtime*. The number of format conversions/substitutions is known as well as the maximum...
5
by: Bob Homes | last post by:
In VB6, foreground and background colors of controls had to be assigned a single number. If you knew the RGB values for the color, you still had to convert them into the single number accepatable...
14
by: Richard Harter | last post by:
Apologies for the length - this post is best viewed with fixed font and a line width >= 72. Below is the source code for a C header file that provides a suite of storage management macros. I am...
28
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I convert a Number into a String with exactly 2 decimal places?...
0
by: zhensoftware | last post by:
USB storage devices have gained popularity. It can be host to viruses, Trojans, hacker toolkits, worms or other forms of malicious programs. For example, when you plug your USB disk into a computer...
4
by: =?Utf-8?B?SnVhbiBEZW50?= | last post by:
Hi, I am getting the following in a VC++ EXE (using VS2005) that links several C++ DLLs and uses MFC and ATL, when I try to start it under the debugger: ------- 'Exactus.UX.Studio.v1.exe':...
8
by: theCancerus | last post by:
Hi All, I am not sure if this is the right place to ask this question but i am very sure you may have faced this problem, i have already found some post related to this but not the answer i am...
3
by: myjish18 | last post by:
Hello, We have a DB2 UDB database v8.2.7 (db2 v8.2 fixpak 14) on AIX 5.3 which has Automatic Storage (AS) enabled. We want to disable automatic storage on entire database and/or disable...
58
by: sh.vipin | last post by:
is there any way to find out number of bytes freed on a particular free() call in C
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.