Visual Basic: Unloading A Form ! 
Author Message
 Visual Basic: Unloading A Form !

We have a Visual Basic application  with 2 forms.
In form 1, we have a button that, when pressed, shows the second form by
"Show 1" method.
This second form is unloaded using "Unload" event when the user press an "OK"
Button.
After the "Show 1" event, in the first form, we have an heavy "Access Table"
update proccess, and during the whole update, the place where the second form
was presented stills "Durty".This "effect" is not good to End Users.
Does anyone knows how can I solve this problem ????

Alvaro (Brazil)



Sat, 27 Dec 1997 03:00:00 GMT  
 Visual Basic: Unloading A Form !

Quote:

>We have a Visual Basic application  with 2 forms.
>In form 1, we have a button that, when pressed, shows the second form by
>"Show 1" method.
>This second form is unloaded using "Unload" event when the user press an "OK"
>Button.
>After the "Show 1" event, in the first form, we have an heavy "Access Table"
>update proccess, and during the whole update, the place where the second form
>was presented stills "Durty".This "effect" is not good to End Users.
>Does anyone knows how can I solve this problem ????
>Alvaro (Brazil)


Alvaro:

Try putting a DoEvents after the "Show 1" in the first form to give the Unload
event time to finish.



Sun, 28 Dec 1997 03:00:00 GMT  
 Visual Basic: Unloading A Form !

Quote:

>We have a Visual Basic application  with 2 forms.
>In form 1, we have a button that, when pressed, shows the second form by
>"Show 1" method.
>This second form is unloaded using "Unload" event when the user press an "OK"
>Button.
>After the "Show 1" event, in the first form, we have an heavy "Access Table"
>update proccess, and during the whole update, the place where the second form
>was presented stills "Durty".This "effect" is not good to End Users.
>Does anyone knows how can I solve this problem ????

>Alvaro (Brazil)


Try a DoEvents to allow the system to  repaint the screen

Form2.Show 1
DoEvents
UpdateTable



Sun, 28 Dec 1997 03:00:00 GMT  
 Visual Basic: Unloading A Form !
I believe that you can try:

Form1.Refresh

after you unload Form2 and before you procede with any other code.  I
think that is how we overcame this problem.



Mon, 29 Dec 1997 03:00:00 GMT  
 Visual Basic: Unloading A Form !

Quote:

>We have a Visual Basic application  with 2 forms.
>In form 1, we have a button that, when pressed, shows the second form by
>"Show 1" method.
>This second form is unloaded using "Unload" event when the user press an "OK"
>Button.
>After the "Show 1" event, in the first form, we have an heavy "Access Table"
>update proccess, and during the whole update, the place where the second form
>was presented stills "Durty".This "effect" is not good to End Users.
>Does anyone knows how can I solve this problem ????

Try DoEvents and FormX.Refresh.

- Oliver


  (http://www.uni-stuttgart.de/UNIuser/mmetech/kelkar/)



Mon, 29 Dec 1997 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Unloading modal owner form also unloads modal form?

2. Loading and unloading DLLs using Visual Basic

3. Unload memory with Visual Basic Script

4. CR 4.6 shipped with VB5 question - How to tell when report is unloaded in Visual Basic

5. Unloading form gives 364 Object was unloaded

6. Unload form doesn't unload

7. Unload not unloading a hidden form - VB4 32bit

8. Problem getting program to end after unloading the form (Unload Me)

9. Help with Visual Basic ActiveX DLL showing form within Visual C++ app

10. Help with Visual Basic ActiveX DLL showing form within Visual C++ ATL app

11. Access forms --> Visual Basic forms

12. Converting Access forms to Visual Basic forms

 

 
Powered by phpBB® Forum Software