PC Review


Reply
Thread Tools Rate Thread

__WriteLine can't write a Color variable??

 
 
TryingLikeHeck
Guest
Posts: n/a
 
      13th Dec 2003
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


(E-Mail Removed)
 
Reply With Quote
 
 
 
 
Cor
Guest
Posts: n/a
 
      13th Dec 2003
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


 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      13th Dec 2003
"TryingLikeHeck" <(E-Mail Removed)> 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.WriteLine
Microsoft.VisualBasic.FileSystem.WriteLine
System.Diagnostics.TraceListener.WriteLine
System.Diagnostics.Trace.WriteLine
System.Diagnostics.Debug.WriteLine
System.Diagnostics.DefaultTraceListener.WriteLine
System.Diagnostics.TextWriterTraceListener.WriteLine

> 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

 
Reply With Quote
 
TryingLikeHeck
Guest
Posts: n/a
 
      13th Dec 2003
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
(E-Mail Removed)
 
Reply With Quote
 
TryingLikeHeck
Guest
Posts: n/a
 
      13th Dec 2003
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

(E-Mail Removed)
 
Reply With Quote
 
active
Guest
Posts: n/a
 
      13th Dec 2003
This reply should have gone under Cor's note
"TryingLikeHeck" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
> (E-Mail Removed)



 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      13th Dec 2003
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


 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      13th Dec 2003
"TryingLikeHeck" <(E-Mail Removed)> 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

 
Reply With Quote
 
active
Guest
Posts: n/a
 
      13th Dec 2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      13th Dec 2003
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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert or Write string variable to xml doc Richard Microsoft Access VBA Modules 0 29th Dec 2006 11:58 PM
Write a variable value in a .txt file =?Utf-8?B?YWNvcmVz?= Microsoft Access Database Table Design 1 24th Oct 2006 08:16 PM
How to write XML file from a variable structure? Peter van der veen Microsoft VB .NET 2 2nd Mar 2006 03:47 PM
Use XML to read/write a counter variable gce Microsoft ASP .NET 2 17th Mar 2005 05:51 PM
Write a variable to Win Clipboard? =?Utf-8?B?RGV2bGlu?= Microsoft Access VBA Modules 2 11th Jan 2005 04:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:18 PM.