[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Paint event not working when showing .NET dialog from VB6

JJ

6/6/2007 6:40:00 PM

Here's the setup. I have a MDI application that I am porting to .NET. I am
going to upgrade the modal screens first (put them into a .NET library and
call them from VB6). As the code exists right now we have a global function
called RefreshEverything. When called, this method spins through the
VB.Global Forms collection and calls a standard method we have on all of our
forms, we'll call it "RefreshData". So you could be 5 modal screens deep (a
total of 7 screens including the MdiMain and MdiChild screens), call
RefreshEverything and all 7 screens get updated. I won't go into detail on
how I am calling this from a .NET modal but I do have it working.

Problem... everything works great except for a third party list box we use.
If I call ShowDialog on my .NET screen, which in turn calls
RefershEverything, for some reason my list boxes on my VB6 screens don't get
repainted properly. All they show are empty rows. If I get back to that
screen and click on a row in the list the row gets repainted and I can see
the correct data.

If I simply do a .Show on my .NET screen and do the same steps the lists
repaint properly. However, this obviously won't work because I need the
modal to act like a modal.

I tried to use the SetParent API on the .NET screen, but it's parent is
still enabled and if I set the parent's Enabled property to False the child
(.net screen) get's disabled too.

Any ideas?