G
Guest
Hi,
I am completly new to the opennetcf and my question is how I can do the
following things under VB.NET:
- open an image (transparent) from a local path...don't know how to do under
opennetcf
- rotate the image and draw it transparent on a picturebox image
I found the code for c# but I am not really familiar with it - this is my
translation:
Dim img As OpenNETCF.Drawing.Imaging.IImage
Dim factory As OpenNETCF.Drawing.Imaging.IImagingFactory = New
OpenNETCF.Drawing.Imaging.ImagingFactory
factory.CreateImageFromStream(AppPath & "\star_2_5.gif", img)
OpenNETCF.Drawing.Imaging.ImageUtils.Rotate(img, 30)
Dim hDC As IntPtr = myGraphics.GetHdc
Dim rc As OpenNETCF.Drawing.Imaging.RECT =
OpenNETCF.Drawing.Imaging.RECT.FromXYWH(240, 240, 200, 200)
img.Draw(hDC, rc, Nothing)
myGraphics.ReleaseHdc(hDC)
-------But I get a NoReferenceException
Please help me.....juvi
I am completly new to the opennetcf and my question is how I can do the
following things under VB.NET:
- open an image (transparent) from a local path...don't know how to do under
opennetcf
- rotate the image and draw it transparent on a picturebox image
I found the code for c# but I am not really familiar with it - this is my
translation:
Dim img As OpenNETCF.Drawing.Imaging.IImage
Dim factory As OpenNETCF.Drawing.Imaging.IImagingFactory = New
OpenNETCF.Drawing.Imaging.ImagingFactory
factory.CreateImageFromStream(AppPath & "\star_2_5.gif", img)
OpenNETCF.Drawing.Imaging.ImageUtils.Rotate(img, 30)
Dim hDC As IntPtr = myGraphics.GetHdc
Dim rc As OpenNETCF.Drawing.Imaging.RECT =
OpenNETCF.Drawing.Imaging.RECT.FromXYWH(240, 240, 200, 200)
img.Draw(hDC, rc, Nothing)
myGraphics.ReleaseHdc(hDC)
-------But I get a NoReferenceException
Please help me.....juvi