473,545 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.pa rse(14822282)). Could anyone tell me where I
went wrong? Thanks
Regards,

Sam
Nov 21 '05 #1
2 1349
Sam,

This works for me.
Me.Button1.Back Color = 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******** ******@TK2MSFTN GP09.phx.gbl...
Sam,

This works for me.
Me.Button1.Back Color = 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
3377
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
12207
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
2038
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 intGreen As Integer Dim intBlue As Integer ColorDialog1.ShowDialog() intRed = Color.FromArgb(ColorDialog1.CustomColors(0)).R intGreen =...
4
24699
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 creating own custom draw procedure? Somehow the theme of Visual Studio looks more professional than the original blue color. -Teemu
5
8614
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 to the VB6 controls. In VB.NET, you can't set colors that way anymore, now you have to use a "color". There is a way to convert RGB values to a...
1
1968
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 them into Color.FromArgb values: Color.FromArgb(&H78 + Convert.ToInt32(aPixels(k)))
11
15357
by: Yaniv | last post by:
Hi How can I convert Uint32 variable to System.drawing.color ?? Thanks in advanced Yaniv
4
9416
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
5311
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 e) { SolidBrush brush1 = new SolidBrush(Color.Blue); SolidBrush brush2 = new SolidBrush(Color.FromArgb(0x0000FF)); StringFormat format =...
0
7669
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. ...
1
7439
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...
0
7773
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 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...
0
5987
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5343
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...
0
4962
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3468
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...
0
3450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1028
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.