Update Picturebox in Background ?

  • Thread starter Thread starter Giorgos
  • Start date Start date
G

Giorgos

Hello all ! I have a question I hope you could help me with.

I need to update the image of my custom picturebox while the form is I
the background. If the image is changed while the form is in the
background, the imagebox appears just empty. (The same thing happens
with the built in pictureboxes). On the other hand, the textbox updates
just fine.

A method that works is to use this.focus() just before updating the
images but it is not 'proper' and it causes some problems. I wonder
if there was a better way? For example should I use a backgroundworker
or is there a better way ?

The reason I need this, is that I have my main form hidden and some
controls are set as child to another window. I need to update them
without setting focus to my window and then giving the focus back to
the previous window.

Thanks !
 
Well this is an update.

At some point I changed this.focus() with this.activate() and that was
what caused all the problems ! So everything seems ok now.

However I would love to hear if there is a way to avoid giving focus to
my form !
Thanks
 

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