hi all,
I have a windows application which is developed in VB.NET.
I have used some bitmaps and set image property of button.
Some time I load form programmaticaly.. following error pops up
1) Specified Cast is not valid
it is on the following line of code.
Me.Button1.Image = CType(resources.GetObject("Button1.Image"),
System.Drawing.Bitmap).
To sovle this problem I CUT the button and paste it again and save project
next time i run it work fine....
What is the problem?
Ansari
Phil Williams - 15 Feb 2005 15:51 GMT
Ansari,
Do you enable XP styles? If you do, check you have called DoEvents(). In
C#, something like this:
static void Main()
{
Application.EnableVisualStyles();
Application.DoEvents();
Application.Run(new MainForm());
}
Regards,
Phil.
> hi all,
>
[quoted text clipped - 13 lines]
>
> Ansari