building form @ runtime vs. hiding existing controls

D

David Mueller

I'm trying to decide just how bad runtime design is. Most opinions seem to
steer clear of adding controls, events, etc at runtime. Instead, y'all
advocate keeping controls on the form and hiding them as necessary.

In my application (which will not be an MDE) , each user session builds a
new form - from scratch. Once the form is built, there are no design
changes. And when the user is done the form object is deleted.

Troubleshooting may be more difficult with a form that only exists at
runtime. OTOH, documenting and tracking unused controls (or not having
enough controls, or having too many controls) is no picnic.

I think my disposible form approach mitigates the problems I've seen
described with designing/redesigning the same form object over and over, with
the exception of some bloating. A 100% table-driven form wizard is very
attractive as the business needs are demanding an unthinkable amount of
flexibility.

Your feedback is appreciated.
Thanks
David
 
D

Dale Fye

Although I have done this in the past and am actually doing it now in a
project I am working on, I am only doing this to display information, not for
entry.

When you build your own form at runtime, how are you performing error
checking, or are you?

Dale
 
D

David Mueller

Hey Dale,

I just use ON ERROR GOTO with error handling routines. I often indicate
which part of the code is running and handle the error accordingly.

Have you had trouble errors while building a new form object at runtime?

David
 
D

Dale Fye

Dave,

What I was trying to get at is how do you do check for errors in the forms?
I've never figured out how to add error handling code behind the controls
when I build the form at runtime.

Dale

--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 
D

David Mueller

Oh! You mean adding events to the controls? I'm planning to use the
CreateEventProc method. I haven't gone that far yet but that's on my agenda
for today and tomorrow. I'll keep you posted.
 
D

David Mueller

Yep, CreateEventProc works like a charm.

Dale Fye said:
Dave,

What I was trying to get at is how do you do check for errors in the forms?
I've never figured out how to add error handling code behind the controls
when I build the form at runtime.

Dale

--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 

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