WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

DoEvents alternative

 
   Home -> Office other -> General Discussions RSS
Next:  use of Data1 field  
Author Message
Anders

External


Since: Jul 16, 2004
Posts: 27



(Msg. 1) Posted: Tue Sep 02, 2008 7:20 am
Post subject: DoEvents alternative
Archived from groups: microsoft>public>visio>general (more info?)

Hi!

We are splitting a large page into several small pages. In order to do that
we remove lines from the geometry section in a shapes shapesheet. When a row
is deleted (for instance a LineTo row) we need to perform a DoEvents i the VB
code. Otherwise the segment is not removed.

The problem is that all these DoEvents makes the split functionality very
slow. Is there another way to do this?

/Anders
Back to top
Login to vote
Al Edlund

External


Since: Jun 14, 2006
Posts: 145



(Msg. 2) Posted: Tue Sep 02, 2008 6:02 pm
Post subject: RE: DoEvents alternative [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The doevents in Vba is what gives the cycles back to the system to get some
work done and I use it a lot. That said, in a dotNet world it absolutely will
fry performance.
Some things to look at :

consider putting in a formula modified event processor to put a throttle on
the things that you really need. (I use two event processors, one for
doc/page events that I need and one to watch the other events that I want).

consider wrapping your busy code in something like this
ThisDocument.Application.DeferRecalc = True
ThisDocument.Application.InhibitSelectChange = True
ThisDocument.Application.ScreenUpdating = False
don't forget to turn the stuff back when your done

consider wrapping your busy code in begin/undo scope so that your application
has a flag for when your busy.

HTH
al

"Anders" wrote:

> Hi!
>
> We are splitting a large page into several small pages. In order to do that
> we remove lines from the geometry section in a shapes shapesheet. When a row
> is deleted (for instance a LineTo row) we need to perform a DoEvents i the VB
> code. Otherwise the segment is not removed.
>
> The problem is that all these DoEvents makes the split functionality very
> slow. Is there another way to do this?
>
> /Anders
Back to top
Login to vote
Al Edlund

External


Since: Jun 14, 2006
Posts: 145



(Msg. 3) Posted: Tue Sep 02, 2008 6:08 pm
Post subject: RE: DoEvents alternative [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

forgot to mention that the formula changed event processor is based on using
filters, there's a good example in the visio sdk
al


"Al Edlund" wrote:

> The doevents in Vba is what gives the cycles back to the system to get some
> work done and I use it a lot. That said, in a dotNet world it absolutely will
> fry performance.
> Some things to look at :
>
> consider putting in a formula modified event processor to put a throttle on
> the things that you really need. (I use two event processors, one for
> doc/page events that I need and one to watch the other events that I want).
>
> consider wrapping your busy code in something like this
> ThisDocument.Application.DeferRecalc = True
> ThisDocument.Application.InhibitSelectChange = True
> ThisDocument.Application.ScreenUpdating = False
> don't forget to turn the stuff back when your done
>
> consider wrapping your busy code in begin/undo scope so that your application
> has a flag for when your busy.
>
> HTH
> al
>
> "Anders" wrote:
>
> > Hi!
> >
> > We are splitting a large page into several small pages. In order to do that
> > we remove lines from the geometry section in a shapes shapesheet. When a row
> > is deleted (for instance a LineTo row) we need to perform a DoEvents i the VB
> > code. Otherwise the segment is not removed.
> >
> > The problem is that all these DoEvents makes the split functionality very
> > slow. Is there another way to do this?
> >
> > /Anders
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> General Discussions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET