Restoring Dash and font styles

  • Thread starter Thread starter Jack Russell
  • Start date Start date
J

Jack Russell

I want to be able to store both drawing2d dash styles in a text file as
a string then restore them.

The first is easy but I can not find a simple way of converting them back.

Any Ideas??

Thanks
 
Jack,

Jack Russell said:
I want to be able to store both drawing2d dash styles in a text file as a
string then restore them.

The first is easy but I can not find a simple way of converting them back.

\\\
Private Sub Form1_Load( _
ByVal sender As Object, _
ByVal e As EventArgs _
) Handles MyBase.Load
Me.ListBox1.DataSource = _
[Enum].GetNames(GetType(KnownColor))
End Sub

Private Sub ListBox1_SelectedIndexChanged( _
ByVal sender As Object, _
ByVal e As EventArgs _
) Handles ListBox1.SelectedIndexChanged
Me.ListBox1.BackColor = _
Color.FromKnownColor( _
DirectCast( _
[Enum].Parse( _
GetType(KnownColor), _
DirectCast(ListBox1.SelectedItem, String) _
), _
KnownColor _
) _
)
End Sub
///
 
Thanks
Jack,

Jack Russell said:
I want to be able to store both drawing2d dash styles in a text file
as a string then restore them.

The first is easy but I can not find a simple way of converting them
back.


\\\
Private Sub Form1_Load( _
ByVal sender As Object, _
ByVal e As EventArgs _
) Handles MyBase.Load
Me.ListBox1.DataSource = _
[Enum].GetNames(GetType(KnownColor))
End Sub

Private Sub ListBox1_SelectedIndexChanged( _
ByVal sender As Object, _
ByVal e As EventArgs _
) Handles ListBox1.SelectedIndexChanged
Me.ListBox1.BackColor = _
Color.FromKnownColor( _
DirectCast( _
[Enum].Parse( _
GetType(KnownColor), _
DirectCast(ListBox1.SelectedItem, String) _
), _
KnownColor _
) _
)
End Sub
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top