Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hallo everybody.

 

In my program I put the Option Strict On, so I program a "cleaner" VB Code.

 

Now I have to write some data to a text file. Reading from it gives me String values only. I hope, I'm right on that point.

 

Giving the String values back to Integer variables requeres convertion of this values from String to Integer. Is there any way to convert without switching to Option Strict Off?!?!

 

If not. How can I save Integer to a File and get it back to variables?!

 

ADDITIONAL PROBLEM is, that after reading the file with values I have to work with split function. I don't think .Split would work with Reader.ReadLine.

Posted

Hallo mutant. It has worked. Thanks a lot!

 

I have another question.

 

I saved the Color object to file like System.Drawing.Color.ToString

 

 

How can I convert the String back to Drawing.Color?!

 

I know there are Color.FromName(ColorString) Method.

 

But if there is an ARGB Color, do I have to extract each of 4 ARGB values from String, convert it to Integer and then use Color.FromARGB?

 

Or is there another function, that could do it directly?

 

Thank you for your time in advance!!!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...