User Form Leaving Trails

P

PathSmart

I have about 5 user forms, none really more complex than the next. When I
display one on top of a document (as opposed to no doucments being showing),
and then drag the form, the form leaves a visible trail all over the screen. If
I drag any other form, no trail is left. (If I drag this form on a no-document
screen, no trail is left.)

What causes this behavior and what can I do to stop it.

Roy
 
J

Jonathan West

PathSmart said:
I have about 5 user forms, none really more complex than the next. When I
display one on top of a document (as opposed to no doucments being showing),
and then drag the form, the form leaves a visible trail all over the screen. If
I drag any other form, no trail is left. (If I drag this form on a no-document
screen, no trail is left.)

What causes this behavior and what can I do to stop it.


Couple of things worth checking

1. Have you changed the value of Application.Screenupdating anywhere? If it
is True, then i can imaging this problem appearing on some computers

2. Have you checked that you have the latest version of the driver for your
viseo card?

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
 
R

Roy Lasris

Thanks, Jonathan,

Just on a lark, I added a screenupdating =true line in the program and that
seems to have cured it. I stepped through the code to see if a screenupdating =
false command appeared anywhere. It did not, but right now, since
screenupdating = true worked, I am happy. Thanks for the tip.

Roy
 
W

Word Heretic

G'day (e-mail address removed) (Roy Lasris),

ahhh.... I had this argument with the MVPs a long while ago. Yes, not
only do you need an undo clear but if update = false you need to let
the screenrefresh buffer reset and clear. No-one listened. Of course,
I am a mere heretic...

Extended code avail if you need it. Obvious thru interpolation of the
above but.





(e-mail address removed) (Roy Lasris) was spinning this yarn:
Thanks, Jonathan,

Just on a lark, I added a screenupdating =true line in the program and that
seems to have cured it. I stepped through the code to see if a screenupdating =
false command appeared anywhere. It did not, but right now, since
screenupdating = true worked, I am happy. Thanks for the tip.

Roy

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email (e-mail address removed)
Products http://www.geocities.com/word_heretic/products.html

Replies offlist may require payment.
 
J

Jonathan West

Roy Lasris said:
Thanks, Jonathan,

Just on a lark, I added a screenupdating =true line in the program and that
seems to have cured it. I stepped through the code to see if a screenupdating =
false command appeared anywhere. It did not, but right now, since
screenupdating = true worked, I am happy. Thanks for the tip.

I'd be interested in finding out why that worked when you didn't have a
ScreenUpdating = False command in the macro.

Have you recently run any other macros that contained ScreenUpdating =
False? Macros from 3rd party add-ins?


--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
 
W

Word Heretic

G'day "Jonathan West" <[email protected]>,

<coughs politely again>

The render engine is a separate subsystem with its own cache. This I
know without decompiling the code. NO-ONE EVER LISTENS. I have written
a detailed article for your site, politely rejected by Dave Rado as
being based in pure fantasy land.



Jonathan West said:
I'd be interested in finding out why that worked when you didn't have a
ScreenUpdating = False command in the macro.

Have you recently run any other macros that contained ScreenUpdating =
False? Macros from 3rd party add-ins?

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email (e-mail address removed)
Products http://www.geocities.com/word_heretic/products.html

Replies offlist may require payment.
 
J

Jonathan West

Word Heretic said:
G'day "Jonathan West" <[email protected]>,

<coughs politely again>

The render engine is a separate subsystem with its own cache. This I
know without decompiling the code. NO-ONE EVER LISTENS. I have written
a detailed article for your site, politely rejected by Dave Rado as
being based in pure fantasy land.

If you mean the article you submitted in Feb 2002, it was passed to me for
review by Dave and I drafted his reply to you.

I've taken another look at the article now, and it's of dubious relevance to
the problem of this particular thread.

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
 
W

Word Heretic

G'day "Jonathan West" <[email protected]>,

Well, let's try again then shall we.


Thought experiment: We don't turn off application.screenupdating and
run a horrendously long automated edit. PDFMaker does this. What do we
see on screen? All sorts of strange little lines popping up and
artifacts galore. Why? The render engine hasn't been turned off so
it's attempting to display the screen. Sensibly it is a low priority
thread so it doesnt get much time to do an onscreen draw. When it
senses its buffer getting full it merely dumps it out to prevent the
word death through automation prevalent in early versions of Word.

So, we now turn off the render engine via
application.screenupdating=false. Word has internal buffers and caches
as well, and they start banking up with requests as the render engine
is off. Word's subsystem size is much larger than the render engines
space so it takes longer to fill up. Same ole results as before though
- Word eventually goes belly up with an invalid addressing attempt
from a chocka full buffer.

So, on truly long macros where the normal advice of "change methods to
a simpler one" cannot be used, one has to force a clear out of this
screen buffer as well. The easiest way is to just turn on visibility
and screen updating and force a refresh - the buffer empties itself on
the following doevents and your Word session is once again happy to go
back to massively mauling documents.

As it is slow you do not want to run with screenupdating on, but you
do have to let it breathe sometime or Word chokes.

I've proven it before, although it is nasty and takes a while to
demonstrate, here is what you do.

Take one very large document. At least 300 pages.
Turn off screen updating
new sub
for each char
fiddle with the char
every 500 times do an undoclear
next
turn on screen updating
end sub

It falls over. Kersplatto.

Now whack in another incremental count and do a screenupdating=true
refresh every 5000 characters or something.

It works.





Jonathan West said:
If you mean the article you submitted in Feb 2002, it was passed to me for
review by Dave and I drafted his reply to you.

I've taken another look at the article now, and it's of dubious relevance to
the problem of this particular thread.

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email (e-mail address removed)
Products http://www.geocities.com/word_heretic/products.html

Replies offlist may require payment.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top