Firstly I've been programming the basic language on and off pretty much all my life, from the Commodore 64 (My pride and joy!) to Qbasic and finally .net. But I'm totally useless at .net. So the questions are probably very rookie
I'm also terrible at explaining things but I'll give it my best shot.
There are 2 things I desperately need.
1, I need to be able to convert a Pictureboxes Backcolour to a Brush colour
Example:
2, How do I save a color to file?
Example:
Any help will be greatly appreciated.
I'm also terrible at explaining things but I'll give it my best shot.
There are 2 things I desperately need.
1, I need to be able to convert a Pictureboxes Backcolour to a Brush colour
Example:
VB.NET:
Private Sub picCol_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picCol.Click
If ColorDialog.ShowDialog <> Windows.Forms.DialogResult.OK Then
Exit Sub
End If
Dim Col As Color = ColorDialog.Color
Dim g As Drawing.Graphics = pic.CreateGraphics
g.FillRectangle(Col, 1, 1, 20, 20) '??????
End Sub
2, How do I save a color to file?
Example:
VB.NET:
Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
If Sav.ShowDialog <> Windows.Forms.DialogResult.OK Then
Exit Sub
End If
FileOpen(1, Sav.FileName, OpenMode.Output)
Write(1, SomeString)
Write(1, SomeNumber)
Write(1, SomeColor) '?????
FileClose()
End Sub
Any help will be greatly appreciated.