Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / September 2003



Tip: Looking for answers? Try searching our database.

Passive component refresh problem in VB 6

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
patrique haidar - 30 Sep 2003 13:39 GMT
Hi all,

little question (big problem);

I have created a form with plenty of components.
When I open a new form/dialog on top of the main form
and close it again, the main form is not fully redrawn.

Especially the scrollbar(s) is/are messed up.
These are all passive components. When I start using them
(make them active) they are immediately well redrawn.

I have tried to use the .Refresh() but it doesn't help.
I have no clue whatsoever of the internal operation of this funtion (it
is protected).

Now I'm using a tweak with invisible/visible, but this is very slow,
ugly and doesn't do the job in some situations.

Does anyone have an idea on how to refresh my form properly?

Thank you in advance.

//PH
Auric__ - 30 Sep 2003 16:42 GMT
>Hi all,
>
[quoted text clipped - 20 lines]
>
>//PH

Just a few thoughts here. I don't know where or how you are using
.Refresh so I'll just toss in my $.02:

Put a timer control on the form, set its Interval to 1000 (or whatever
you choose), and for it's Timer event, try this:
Private Sub Timer1_Timer()
   Me.Refresh
End Sub

Or, you could try this instead - I've used similar code to force redraws
before:
Private Sub Form_Activate()
   Me.Refresh
End Sub

Or, in the dialog that's causing the grief (not the main form), try
this:
Sub Form_Unload() :
   ...               'whatever other code you might have in here
   Me.Hide
   frmMain.Refresh   'replace frmMain with name of your main form
End Sub

I haven't installed VB yet (just reinstalled Windows) so I can't check
if these work right offhand, but one of them might help.
Signature

auric "underscore" "underscore" "at" hotmail "dot" com
*****
People should be measured in feats, not feet.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.