Re: Restore On Exit Vs
- From: "David" <dw85745NOT@xxxxxxxxxxxxx>
- Date: Mon, 27 Oct 2008 10:24:17 -0400
Region? What are you talking about? Exit of what?
Each procedure (function) does something. Say one function draws a line,
another function a circle, etc. Now I want each function to be able to draw
within a region.
So at the beginning of each function I can set my Region boundaries and draw
the function. At the end of the function I can restore the Region
boundaries back to their default (say Picturebox scale). In this case I am
setting the Region twice -- once to set and once to restore.
Alternatively, I can just set my Region boundaries at the beginning of each
function and not worry about setting back to default, so the call to set the
region is only executed once.
Just wondered what is the preferred practice of coding and why?
"Jan Hyde (VB MVP)" <StellaDrinker@xxxxxxxxxxxxxxxxxxx> wrote in message
news:082bg4h5od8tc5832cftcjrs7teu284pnc@xxxxxxxxxx
"David" <dw85745NOT@xxxxxxxxxxxxx>'s wild thoughts were
released on Sun, 26 Oct 2008 17:47:20 -0400 bearing the
following fruit:
I have a general code question. I'm primarily concerned with Regions but
question applies in general.
Is it "more efficient" to:
1)Set a Region in a procedure and then restore the default region on exit
-- OR --
Just set the Region (default or other) each time it is used and don't
worry
about restoring back to the default?
Region? What are you talking about? Exit of what?
--
Jan Hyde (VB MVP)
https://mvp.support.microsoft.com/profile/Jan.Hyde
.
- Follow-Ups:
- Re: Restore On Exit Vs
- From: Jeff Johnson
- Re: Restore On Exit Vs
- References:
- Restore On Exit Vs
- From: David
- Re: Restore On Exit Vs
- From: Jan Hyde (VB MVP)
- Restore On Exit Vs
- Prev by Date: Re: What is wrong with this Date calculation?
- Next by Date: Re: Restore On Exit Vs
- Previous by thread: Re: Restore On Exit Vs
- Next by thread: Re: Restore On Exit Vs
- Index(es):
Relevant Pages
|