Form showing problem

  • Thread starter Thread starter Dzemo
  • Start date Start date
D

Dzemo

I want to show some form with animated gif on it (Form1) while some data are
processed in background in application. I use

dim x as new Form1
x.show

for I=0 to 1000000
processing data
next I

x.close

This take about five minutes but form1 is not shown just rectangle without
picture. Do I have to refresh form ore something like that?
thx
 
Dzemo,

You can completly do this using the designer
You need only a picturebox
Set in the properties of that the image to a file
Ses in those properties as well that the sizemode as you want and
evertything else.

I hope this helps?

Cor
 
Dzemo said:
I want to show some form with animated gif on it (Form1) while some data
are processed in background in application. I use

dim x as new Form1
x.show

for I=0 to 1000000
processing data
next I

x.close

This take about five minutes but form1 is not shown just rectangle without
picture. Do I have to refresh form ore something like that?

Either call 'Application.DoEvents' every n-th iteration, or use
multithreading (this means, you put the data processing in a separate
background thread):

Multithreading in Windows Forms applications
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=multithreading&lang=en>
 

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