Re: Restore On Exit Vs

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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


.



Relevant Pages

  • Re: Restore On Exit Vs
    ... another function a circle, etc. ... draw within a region. ... So at the beginning of each function I can set my Region boundaries and ... At the end of the function I can restore the Region ...
    (microsoft.public.vb.general.discussion)
  • SELinux is screwing me up!!!! Help!
    ... of the selinux attributes may have been messed up. ... The restore appears correct throughout ... I cannot login as a non-root user! ... %preunscriptlet failed, exit status 255 ...
    (Fedora)
  • Re: Question about the Forth Philosophy
    ... that draw anything. ... Do you require all words that use drawing primitives to restore the ... cursor position is passed to the word as an initial argument. ... you can reorder them and parallelize (to some ...
    (comp.lang.forth)
  • Re: SERIOUS COMPUTER PROBLEM!
    ... You probably are lucky that the system wouldn't restore to an earlier point given the issues on the drive. ... >> due to that chkdsk fault. ... >> exit and see ... the disk check but it is strongly recommended that you continue. ...
    (microsoft.public.windowsxp.general)
  • Re: Playing CD
    ... 'File Types' tab and uncheck all the checkboxes next to each file type and click on ... 'Apply' button again (then on to exit the Options). ... Try opening DVDs again. ... Also System Restore will not restore so I expect the restore ...
    (microsoft.public.windowsxp.general)