J
jcrouse
Well, this is the last step (I hope). I use the following code to write a
background image path to an xml file:
Dim dr31 As DataRow = ds.Tables("MainForm").NewRow
dr31("Width") = Me.Width
dr31("Height") = Me.Height
Dim frmback As String = (OpenFileDialog2.FileName).ToString
dr31("Background") = frmback
Here is the xml file:
<MainForm>
<Width>640</Width>
<Height>458</Height>
<Background>C:\CPViewer\Background.jpg</Background>
</MainForm>
</CPViewer>
As per my other thread on color, how do I now read this in from the dataset
and convert the string to an image? Or maybe, how do I right it out
properly? Here is my read code:
Me.Width = ds.Tables(30).Rows(0).Item(0).ToString
Me.Height = ds.Tables(30).Rows(0).Item(1).ToString
'bmGlobal = ("C:\cpviewer\backgroung.jpg").ToString
Me.BackgroundImage = bmGlobal
End If
Me.CenterToScreen()
You can see, I've tried a few things but no luck as of yet.
Thanks,
John
background image path to an xml file:
Dim dr31 As DataRow = ds.Tables("MainForm").NewRow
dr31("Width") = Me.Width
dr31("Height") = Me.Height
Dim frmback As String = (OpenFileDialog2.FileName).ToString
dr31("Background") = frmback
Here is the xml file:
<MainForm>
<Width>640</Width>
<Height>458</Height>
<Background>C:\CPViewer\Background.jpg</Background>
</MainForm>
</CPViewer>
As per my other thread on color, how do I now read this in from the dataset
and convert the string to an image? Or maybe, how do I right it out
properly? Here is my read code:
Me.Width = ds.Tables(30).Rows(0).Item(0).ToString
Me.Height = ds.Tables(30).Rows(0).Item(1).ToString
'bmGlobal = ("C:\cpviewer\backgroung.jpg").ToString
Me.BackgroundImage = bmGlobal
End If
Me.CenterToScreen()
You can see, I've tried a few things but no luck as of yet.
Thanks,
John