Can someone please help im going insane 
Author Message
 Can someone please help im going insane

i need an example or tutorial on retaing font that was selected each time
the program is started rather than it going back to the default font one the
app closes
anyhting will help
here is what i have been trying  i have no clue as to weather i am on the
right track ornot      i just need to know someway to do this
I HAVE been trying for weeks now to get my program to remember font   ive
been
trying
Dim sValue As String

Dim sPath As String

sPath = "c:\metal.ini"

Me.Font = fd1.Font

INIWrite(sPath, "options", "mainfont", fd1.Font.ToString)

and it send to the ini file  ok  but  how do i retreive it from the ini file

i try

svalue= ini read(sPath, "options", "mainfont", "unknown)

but i get an error message value ype of string cannot be converted to
system.drawing.font    am i on the right track??  can someone please help
this is all i have between me and finishing my app

tutorials  on font  or anyhting will helpthen the just please someone



Wed, 19 May 2004 00:50:24 GMT  
 Can someone please help im going insane
Hi Charles,

please show us exactly the line where the error occurs and the definition of
all parameters.

What is iniread/iniwrite? Your own creation? Please show the header.
In your call of ToString the parenthesis are missing. Only in your post?

Joachim



Wed, 19 May 2004 01:46:17 GMT  
 Can someone please help im going insane
<<<<<<<Messages that appear in these are not part of my
program>>>>>>>>>>>>>>>

ok here is is   all the code i used   but i get an error tryingr to reteieve
the font inthe last line

me.font = (svalue)

Private Sub MenuItem11_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MenuItem11.Click

fd1.ShowDialog() ' <<<<<this shows the font dialog>>>

End Sub

Private Sub fd1_apply(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles fd1.Apply

Dim sValue As String

Dim sPath As String

sPath = "c:\metal.ini"

Me.Font = fd1.Font

INIWrite(sPath, "options", "mainfont", fd1.Font.ToString)

<<<<<<<<This sets thew font to trhe current app and writes it to an ini
file>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

End Sub

Private Sub Main_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

<<<<<<this is supose to retreive  the font from the ini file at fo
load>>>>>>>>>>>>>

Dim sValue As String

Dim sPath As String

sPath = "c:\metal.ini"

sValue = INIRead(sPath, "options", "mainfont", fd1.Font.ToString)

Me.Font = (sValue)  <<<<<<<<<<this is where i get the error
message>>>>>>>>>>>>>     the errormessage is

<<<<<value type of string cannot be converted to stem.drawings.font>>>>>>>>>

End Sub

this is what it looks like inside the ini file

[options]
mainfont=[Font: Name=Arial Black, Size=8.25, Units=3, GdiCharSet=0,
GdiVerticalFont=False]



Wed, 19 May 2004 03:23:18 GMT  
 Can someone please help im going insane
Hi Charles,

Quote:
> Dim sValue As String

> ...
> me.font = (svalue)

what do you expect the compiler should do?
You assign a string value to a Font reference variable. That doesn't match.

What you have to do is to create a new Font object, something like
me.font = new Font(svalue)
depending on the string in your variable.

Have a look at the documentation of the Font class to find out how to create
the new font.

Joachim



Wed, 19 May 2004 05:59:13 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Going insane: ApplyFilter method is NOT working, help

2. Help needed: going insane with DISK OR NETWORK ERROR

3. HELP PCL CODES ...going insane

4. Registry Value retrival HELP Im Going Nuts Signed A Newbee

5. Registry Value retrival HELP Im Going Nuts Signed A Newbee

6. Run-Time Error 3197 - please help its driving me insane

7. Am I going insane...?

8. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

9. praktikum im ausland jobs und praktika im ausland jobs und praktika im ausland 2007 jobvermittlung ehrenamtlich arbeiten im ausland job vermittlung ausland jobboerse arbeit stellenangebote fuer ausland arbeiten im ausland spanien

10. VB Problem, Someone Please, Please Help!!

11. VB Problem, Someone Please, Please Help!!

12. please someone, please help!

 

 
Powered by phpBB® Forum Software