Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to deleting controls at run time ?

Status
Not open for further replies.

Suwito

Programmer
Apr 24, 2001
16
0
0
ID
HI,

Anyone knows how to deleting controls at run time ?

Regards,
Suwito ;-)
 
now i don't know, but simply set the .visible property to false
 
If the controls are Loaded, then you can Unload them _________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
Making them Invisible is not the same as Deleting them: in the former case, the resources used by the Control are not released! _________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
You can not delete a control at runtime. It's impossible. But if you want to delete a control to prevent low memory errors you may create a control array (like above messages say) and then load and unload one or more controls. But again you won't be able to unload the control indexed 0. Because this means you DELETE the control. But i said it's impossible...
 
My last remark was related to the Load/Unload item, which in turn was related to the Control Arrays.

You're absolutely right: an individual control or the first control (indexed 0) of a control array shouldn't be unloaded.

Good points for making this explicit!

_________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
 
About Cut method, anyone knows how to use this method ?
Is it use for deleting control ?
 
Hi,

You can delete only those controls at runtime those you have created at runtime. The design time controls you can't delete at runtime. You have to hide them..

hsk007 :cool:
 
Hi hsk007,

You have same think with me, but I don't know what method for using to delete a control at run time.

Do you have a sample code for me ?

Best Regards,
Suwito ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top