G
Guest
Hi
I was developing a Class for skinning an application. IN order to read the
image file dynamically I used System.Drawing.Image.FromFile("..."). Strangely
VS 2003 returns an error saying that "FromFile is not a member of the
System.Drawing.Image". According to the member list under IMage class that is
not true. I am completely baffled by the behaviour and stuck from past 2
days. Can anyone please help?
I have attached the function
Public Function validateImageLoad(ByVal xmlDoc As Xml.XmlDocument, ByVal
sFolder As String, ByVal picHolderArea As PictureBox, ByVal skinImageSection
As String, ByVal imageCollection As Collection) As Boolean
Dim resourceList As Xml.XmlNodeList
Dim resourceNode As Xml.XmlNode
Dim resourceNodeChild As Xml.XmlNode
Try
resourceList = xmlDoc.GetElementsByTagName(skinImageSection)
picHolderArea.Image =
System.Drawing.Image.FromFile("d:\WINCE420\PUBLIC\MovieEPG\Skins\main.jpg")
If (picHolderArea.Height = colImagesHeight(resourceNode.Name))
And (picHolderArea.Width = colImagesWidth(resourceNode.Name)) Then
imageCollection.Add(picHolderArea.Image, resourceNode.Name)
End If
Catch e As Exception
Console.Write("Error in validating the loading of image")
End Try
End Function
NOTE: I have updated the SDK .NET framework to 1.1 and also added the
service pack.
Thanks in advance
PJ
I was developing a Class for skinning an application. IN order to read the
image file dynamically I used System.Drawing.Image.FromFile("..."). Strangely
VS 2003 returns an error saying that "FromFile is not a member of the
System.Drawing.Image". According to the member list under IMage class that is
not true. I am completely baffled by the behaviour and stuck from past 2
days. Can anyone please help?
I have attached the function
Public Function validateImageLoad(ByVal xmlDoc As Xml.XmlDocument, ByVal
sFolder As String, ByVal picHolderArea As PictureBox, ByVal skinImageSection
As String, ByVal imageCollection As Collection) As Boolean
Dim resourceList As Xml.XmlNodeList
Dim resourceNode As Xml.XmlNode
Dim resourceNodeChild As Xml.XmlNode
Try
resourceList = xmlDoc.GetElementsByTagName(skinImageSection)
picHolderArea.Image =
System.Drawing.Image.FromFile("d:\WINCE420\PUBLIC\MovieEPG\Skins\main.jpg")
If (picHolderArea.Height = colImagesHeight(resourceNode.Name))
And (picHolderArea.Width = colImagesWidth(resourceNode.Name)) Then
imageCollection.Add(picHolderArea.Image, resourceNode.Name)
End If
Catch e As Exception
Console.Write("Error in validating the loading of image")
End Try
End Function
NOTE: I have updated the SDK .NET framework to 1.1 and also added the
service pack.
Thanks in advance
PJ