Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX (flicker) Modal forms

Status
Not open for further replies.

Gotheallblacks

Programmer
Oct 16, 2003
60
NZ
After programming quite a few TreeView(s) I noticed a distinct flicker on the screen , searched web and found.

"On Fri, 26 Jun 1998 11:54:08 +0200, "Rasmus Moustgaard"
<r.moustga...@cochrane.dk> wrote:
>Anyone knows why treeview controls flicker when you run a modal form?
>Rasmus
Yes, and you won't like the answer.
When you raise a modal form over an ActiveX control in VFP, you willreceive unpredictable results ranging from nothing to GPFs.Raising a modal form over the Listview 5.0 control would actually corrupt the control to the point where it didn't work anymore. The only solution we found was to *not* use modal forms"

Not being around long enough and had never read anywhere of this problem. I am enquiring if anybody has seen a solution to this. and whats a 'GPF'?

Andrew



 
GPF is an acronym for General Protection Fault, otherwise known as a catastrophic error resulting in an application crash.

We still have the same errors, but they manifest as Cnnnnnn errors and we get to send reports to Microsoft.

There is no recovery for a catastrophic crash. Never has been, and never will be.

In VFP, ActiveX controls will not peacefully live "under" VFP interface elements. They "live" in their own Window which always wants to be on top of things.

It's best not to try to do this because it's destined to fail.

HTH
 
Andrew,

Your post mentions Listview version 5.

For treeview and listviews, you want to be using version 6. The previous version was unreliable and prone to crash.

I've used both treeviews and listviews extensively, including with modal forms, and I've never seen the flickering you described. I wonder if it's caused by some unusual code that you've added to the control.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
I agree with Mike. I've been using TreeView, ListView, and other ActiveX controls for over a decade with modal forms brought up over the form hosting them without any crashes and without any flickering.

Doug
 
Mike , I am using Ver 6. But I think your right after looking closer found it is the parent/calling form that seems to be refreshing? underneath when clicking on a root node in the child/modal form but don't know why. Both forms have "Mother of all TreeViews"

Doug, I have put wait states in to track where and notice that it refreshes? AFTER the NodeClick() has COMPLETED!.
I put a wait state as the lastline of this method then press anykey and the calling form refreshes? underneath the child form (whether Modal or NonModal).

I have noticed that once the child nodes have been loaded (whether I have lAutoLoadChildren .T. or .F.)
It does not refresh the parent form below when clicking on the root Node again.
So I have set lAutoLoadChildren .T. to stop refreshs when clicking on root nodes. So it only refreshes? parentform below once.
lLoadTreeViewAtStartup is .F. But refreshes? parentform everytime on a LoadTree().
I still can not find where this is happening

After a NodeClick() where does VFP go I assumed it would be waiting.

Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top