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

__WriteLine can't write a Color variable??

The statement:
WriteLine(lFileNum, mFirstLineColor)

Fails with the following error:
Additional information: Procedure call or argument is not valid.

mFirstLineColor is type Color

Can't Write write a Color??

If you just want to save a bunch of stuff and restore it later is Write the
way to go or is Print a better way. Or is there something else that's better?

Thanks in advance
Tr************@REMOVEaol.com
Nov 20 '05 #1
11 948
Cor
Hi

What kind of code is this,
WriteLine(lFileNum, mFirstLineColor)


Because there are a lot of WriteLine methods, so I don't think it will work
by only writing writeline(x,x)

But in this case it is very much possible I am wrong.

Cor
Nov 20 '05 #2
"TryingLikeHeck" <tr************@aol.comREMOVE> schrieb
The statement:
WriteLine(lFileNum, mFirstLineColor)

Fails with the following error:
Additional information: Procedure call or argument is not valid.

mFirstLineColor is type Color

Can't Write write a Color??
I found several WriteLine methods. Which one are you referring to?

System.Console.WriteLine
System.IO.TextWriter.WriteLine
System.CodeDom.Compiler.IndentedTextWriter.WriteLi ne
Microsoft.VisualBasic.FileSystem.WriteLine
System.Diagnostics.TraceListener.WriteLine
System.Diagnostics.Trace.WriteLine
System.Diagnostics.Debug.WriteLine
System.Diagnostics.DefaultTraceListener.WriteLine
System.Diagnostics.TextWriterTraceListener.WriteLi ne
If you just want to save a bunch of stuff and restore it later is
Write the way to go or is Print a better way. Or is there something
else that's better?


Don't know if it's the better way but it's one way:
http://msdn.microsoft.com/library/en...ingobjects.asp

--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
I don't know but check the Help

Public Sub WriteLine( _
ByVal FileNumber As Integer, _
ByVal ParamArray Output() As Object _
)
Parameters
Any suggestions on how to write Color??

Thanks
Tr************@REMOVEaol.com
Nov 20 '05 #4
Public Sub WriteLine( _
ByVal FileNumber As Integer, _
ByVal ParamArray Output() As Object _
)
Parameters

Microsoft.VisualBasic
Any suggestions on how to write Color?
I tried CTYPE(zzz,Integer) - can't convert

Thanks

Tr************@REMOVEaol.com
Nov 20 '05 #5
This reply should have gone under Cor's note
"TryingLikeHeck" <tr************@aol.comREMOVE> wrote in message
news:20***************************@mb-m06.aol.com...
I don't know but check the Help

Public Sub WriteLine( _
ByVal FileNumber As Integer, _
ByVal ParamArray Output() As Object _
)
Parameters
Any suggestions on how to write Color??

Thanks
Tr************@REMOVEaol.com

Nov 20 '05 #6
Cor
Hello,

This looks like for me the most as a signature to write a line of data to a
disk.
I don't understand what color has to do with that.

But if you want to print, maybe you can look at this

http://msdn.microsoft.com/library/de...ClassTopic.asp

I hope this brings you in the right direction?

Cor
Nov 20 '05 #7
I'll look at the link you sent.

The problem is that I can write variables to a file that are type Integer or
Boolean, but not a variable that is type Color.

Since Color is actually the same size as an Integer I would hope that I
could out smart it and get it to write the equivalent value by somehow
casting Color as an Integer.

But I guess I'm not that smart..

Thanks
"Cor" <no*@non.com> wrote in message
news:eq**************@TK2MSFTNGP12.phx.gbl...
Hello,

This looks like for me the most as a signature to write a line of data to a disk.
I don't understand what color has to do with that.

But if you want to print, maybe you can look at this

http://msdn.microsoft.com/library/de...ClassTopic.asp
I hope this brings you in the right direction?

Cor

Nov 20 '05 #8
"TryingLikeHeck" <tr************@aol.comREMOVE> schrieb
Public Sub WriteLine( _
ByVal FileNumber As Integer, _
ByVal ParamArray Output() As Object _
)
Parameters

Microsoft.VisualBasic
Any suggestions on how to write Color?
I tried CTYPE(zzz,Integer) - can't convert


A color is not an Integer. Which property or function value of the Color do
you want to write? Maybe you are looking for the ToArgb method?

WriteLine(1, Color.Red.ToArgb)
--
Armin

Nov 20 '05 #9
Cor
Hi active,

Now I understand it,

Color is not a field that you can write to disk.

I never used it, but it seems that you can do
\\\
Dim MyRGB As Integer = Color.AliceBlue.ToArgb
Dim myColor As Color = Color.FromArgb(MyRGB)
///
So that MyRGB is what you can write to disk.

I hope this was it?

Cor
Nov 20 '05 #10
Thanks, works good
Nov 20 '05 #11
Thanks, Works good
Nov 20 '05 #12

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

Similar topics

7
by: Wen | last post by:
Hi everyone, ..After my first lesson, I have to create a asp page with: ..asp tag for time ..client script that runs at the server for date ..client script that runs at client and shows a...
8
by: Jack | last post by:
Hi, Here is my problem: I am logging in to a page, where the page retrieves a record from a database. The text boxes are used in the display formto let the users update the fields, if they...
3
by: Byron | last post by:
Hi, Javascript confuses me, so I usually limit myself to Dreamweaver's built-in scripts for stuff like imageswaps. But this time I'm trying to write something very simple myself. I do most of my...
1
by: Shawn | last post by:
As if it won't be clear enough from my code, I'm pretty new to C programming. This code is being compiled with an ANSI-C compatible compiler for a microcontroller. That part, I believe, will be...
3
by: stahl.karl | last post by:
I have a CGI/Perl program that returns a string output. Is it possible to get this into a Javascript variable, where the name of the variable is defined in the Javascript and not in the Perl code?...
11
by: Vmusic | last post by:
Hi, I am trying to write out an array of string variables to Notepad. I can't get SendKeys to accept the string variable only literal quoted strings. I DO NOT want the hassle of writing to a...
4
by: Sarah Marriott | last post by:
Our website contains session variables that are used to validate if a user is logged in etc. We have found that these variables are randomly lost while navigating the website. We set up some...
13
by: GGawaran | last post by:
First off, Hi everyone new to .asp and am trying to self teach myself. Im trying to figure out what exactly im doing wrong, or maybe what I think I can do, I really cant. The Idea....
0
by: zman77 | last post by:
EDIT: -- forgot to mention... I am using Visual Studio 2005, on Win XP, on an intel machine Hi. This is my first post, though I've "lurked" for a while because I find these forums very helpful....
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...

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.