How to check if a BackgroundImage property has any image?

  • Thread starter Thread starter kjon
  • Start date Start date
K

kjon

Hi, I'm trying to get the BackgroundImage of a form/control and draw it
again in runtime. But if the Backgroundimage is "None", the DrawImage
command will give an error.
Is it possible to programmaticaly check the Backgroundimage property of the
form/control in runtime whether it is "None" or has an image inside? Please
advice. Thanks in advance.

Regards,
KJon
 
Hi kjon,
Hi, I'm trying to get the BackgroundImage of a form/control and draw
it again in runtime. But if the Backgroundimage is "None", the
DrawImage command will give an error.
Is it possible to programmaticaly check the Backgroundimage property
of the form/control in runtime whether it is "None" or has an image
inside? Please advice. Thanks in advance.

Not tried, but:

If ( MyForm.BackgroundImage is Nothing ) ...?


Regards,

Frank Eller
 
* "Frank Eller said:
Not tried, but:

If ( MyForm.BackgroundImage is Nothing ) ...?

Works, but in VB.NET you don't need the '(...)' around the
condition... :-).
 
Back
Top