|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Implicit Conversion from Bitmap to Image?MapGraphics(ListBox_Graphics.SelectedIndex - 1).MapBitmap = System.Drawing.Bitmap.FromFile(OpenFileDialog_SelectFile.FileName) incurs the following error: Option Strict On disallows implicit conversions from 'System.Drawing.Image' to 'System.Drawing.Bitmap'. MapGraphics.MapBitmap is earlier declared as follows in a module: Friend MapBitmap As System.Drawing.Bitmap = Nothing And the parent class's array is instantiated as follows: MapGraphics(0) = New MapGraphicsTemplate What am I missing? Why is it trying to convert from Bitmap to Image? And if necessary, is there a VB routine that I can use? Much thanks for any replies, The Confessor >What am I missing? There's no Bitmap.FromFile method really. It's Image.FromFile (butavailable as Bitmap.FromFile since Bitmap derives from Image) and it returns an Image object. Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup.
by default, public or private?
Reference to a variable need help on DateDiff function! Replace Selected Text printing problem with dotmatrix printer using vb.net Which collection object to use similar to SortedList\Hashtable Properties of a Property Different Approaches to Saving settings: Which is better? BindingSource.AddNew Activating Windows Forms |
|||||||||||||||||||||||