473,386 Members | 1,705 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,386 software developers and data experts.

Reading color from a text file FromArgb

Sam
Hi All

I'm having problem (which seems to be simple) to convert my color settings
using FromArgb method. The colors are saved to a text file as string, using
ToArgb.ToString method. For example one of my colors has a value of
14822282. This value will then be read when a user opens his input file and
convert to color using FromArgb method. With the value above, here is what
I'm currently having mycolor =
color.FromArgb(system.int32.parse(14822282)). Could anyone tell me where I
went wrong? Thanks
Regards,

Sam
Nov 21 '05 #1
2 1340
Sam,

This works for me.
Me.Button1.BackColor = Color.FromArgb(CInt("14822282"))

I hope this helps,

Cor
Nov 21 '05 #2
Sam
Hi Cor

Thanks for the help. I got it

Sam

"Cor Ligthert" <no************@planet.nl> wrote in message
news:u9**************@TK2MSFTNGP09.phx.gbl...
Sam,

This works for me.
Me.Button1.BackColor = Color.FromArgb(CInt("14822282"))

I hope this helps,

Cor

Nov 21 '05 #3

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

Similar topics

7
by: Scott Schluer | last post by:
Is there a way to use the Image class to convert a color photo (GIF or JPEG) to a B&W photo? Thanks, Scott
10
by: tshad | last post by:
I have a problem setting the background color of textbox on the fly. I tried using: applicantID.backcolor = "F6F6F6" and applicantID.backcolor = "#F6F6F6"
1
by: Steve Randall | last post by:
I use a ColorDialog control to select a number of custom colours using the code segment below, I've fixed the index to 0 for the purpose of highlighting the problem. Dim intRed As Integer Dim...
4
by: Teemu | last post by:
I'm wondering if there is a easy way to change for example toolstrips appearance. I'd like to have the same theme as in VB2005. Brown backgroung instead of the light blue. Can this be done without...
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...
1
by: sp | last post by:
I have this strange problem. The application I am working on imports color values from Flash that look like this: 0x-f9fff6 And, on the script side, it uses a conversion algorithm to convert...
11
by: Yaniv | last post by:
Hi How can I convert Uint32 variable to System.drawing.color ?? Thanks in advanced Yaniv
4
by: Harvey Triana | last post by:
Hi. Say, in VB6: Const CLR2 As Long = &HFFF0DC ' light blue AnyObj.BackColor = CLR2 - How is the equivalent one in C#? Thanks, <Harvey Triana />
3
by: Larry | last post by:
I'm sure I've missed the obvious, but when I define a custom color, my DrawString call from my Paint event doesn't seem to draw anything at all. void btnNav_Paint(object sender, PaintEventArgs...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
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 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.