Form showing problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dzemo

    Form showing problem

    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


  • Cor Ligthert

    #2
    Re: Form showing problem

    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


    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: Form showing problem

      "Dzemo" <dzemo@wizard.b a> schrieb:[color=blue]
      >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?[/color]

      Either call 'Application.Do Events' 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=multithread ing&lang=en>

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

      Comment

      Working...