N
Nickneem
The following is driving me mad:
VS2005 Compact framework, project upgraded from 2003.
I get a cast exeception error trying to populate an imagelist (code is
by design)
Me.imgListDiv.Images.Clear()
Me.imgListDiv.Images.Add(CType(resources.GetObject("resource"),
System.Drawing.Icon))
Me.imgListDiv.Images.Add(CType(resources.GetObject("resource1"),
System.Drawing.Icon))
When I look in the forms resources (mainform.resx) - icons the icons
are all there nicely organized, recource, resource1, etc..
There are NO 'images' in the MainForm.resx
The project builds fine but when I debug the code hangs with a:
System.InvalidCastException was unhandled
Message="InvalidCastException"
StackTrace:
bij DigiWaiterPDA.MainForm.InitializeComponent()
bij DigiWaiterPDA.MainForm..ctor()
bij System.Reflection.RuntimeConstructorInfo.InternalInvoke()
bij System.Reflection.RuntimeConstructorInfo.Invoke()
bij System.Reflection.ConstructorInfo.Invoke()
bij System.Activator.CreateInstance()
at MyForms.Create__Instance__()
at MyForms.get_MainForm()
bij DigiWaiterPDA.MainForm.Main()
On the line:
Me.imgListDiv.Images.Add(CType(resources.GetObject("resource"),
System.Drawing.Icon))
When I try to retrieve the resource in the immediate window:
? resources.GetObject("resource")
{System.Drawing.Bitmap}
System.Drawing.Bitmap: {System.Drawing.Bitmap}
It shows me 'resource' (and resource1) are bitmaps while they're
supposed to be icons.
If I bind the resourcefile to an existing picturebox and save it on
the PDA (emulator) I can tell a .bmp which I used earlier in the
project is shown so I thought I'd try and delete all those images with
a 'build action' embedded resource' but all with no success though ;((
The 'Localizable' property of the form is false (at the moment,
because I really want the form to be localizable thus allowing multi-
langual).
Are there resource files outside the default forms and project
resource files?
Any help is much appreciated!!!
Kind regards,
Mike
VS2005 Compact framework, project upgraded from 2003.
I get a cast exeception error trying to populate an imagelist (code is
by design)
Me.imgListDiv.Images.Clear()
Me.imgListDiv.Images.Add(CType(resources.GetObject("resource"),
System.Drawing.Icon))
Me.imgListDiv.Images.Add(CType(resources.GetObject("resource1"),
System.Drawing.Icon))
When I look in the forms resources (mainform.resx) - icons the icons
are all there nicely organized, recource, resource1, etc..
There are NO 'images' in the MainForm.resx
The project builds fine but when I debug the code hangs with a:
System.InvalidCastException was unhandled
Message="InvalidCastException"
StackTrace:
bij DigiWaiterPDA.MainForm.InitializeComponent()
bij DigiWaiterPDA.MainForm..ctor()
bij System.Reflection.RuntimeConstructorInfo.InternalInvoke()
bij System.Reflection.RuntimeConstructorInfo.Invoke()
bij System.Reflection.ConstructorInfo.Invoke()
bij System.Activator.CreateInstance()
at MyForms.Create__Instance__()
at MyForms.get_MainForm()
bij DigiWaiterPDA.MainForm.Main()
On the line:
Me.imgListDiv.Images.Add(CType(resources.GetObject("resource"),
System.Drawing.Icon))
When I try to retrieve the resource in the immediate window:
? resources.GetObject("resource")
{System.Drawing.Bitmap}
System.Drawing.Bitmap: {System.Drawing.Bitmap}
It shows me 'resource' (and resource1) are bitmaps while they're
supposed to be icons.
If I bind the resourcefile to an existing picturebox and save it on
the PDA (emulator) I can tell a .bmp which I used earlier in the
project is shown so I thought I'd try and delete all those images with
a 'build action' embedded resource' but all with no success though ;((
The 'Localizable' property of the form is false (at the moment,
because I really want the form to be localizable thus allowing multi-
langual).
Are there resource files outside the default forms and project
resource files?
Any help is much appreciated!!!
Kind regards,
Mike