.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Form loaded event?

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
373 Views, 3 Replies

Form loaded event?

ok, the short of it is this:

 

I have a form with a datagrid view in it.  I'm trying to re-size the form to match the size of the data (width) being shown in the grid.   I can do this easily when it's a regular form (ie outside cad), but for some reason I can't get the size to change when it's inside cad (when it's being populated/loaded).  So my question is this.  Is there some way to know when the "load" event is done?  (as I can change the size after this point).

 

Thanks

3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

While I am still open to a better solution, I was able to rig a solution using the "activated" event.  it's not perfect, but does get the job done.

 

 

Other ideas?

Message 3 of 4
norman.yuan
in reply to: Anonymous

With Activated event the form/controls to be resized multiple times, if you have another dialog box pops up on top of this form, or even a message box pops up. To avoid the unnecessary multiple resizing, you may want to use Form's Shown event, which only fires once when the form is, well, shown.

Norman Yuan

Drive CAD With Code

EESignature

Message 4 of 4
Anonymous
in reply to: norman.yuan

I'll take a look at that.

 

 

I got around the perpetual loop of the activated event by using a boolean check (thus it only fires the code once)

 

Thanks.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


AutoCAD Beta