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... :-).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top