Kust Starting

  • Thread starter Thread starter JustStarting
  • Start date Start date
J

JustStarting

I am creating my first control and have a few basic questions

How do i trigger the control to repaint when I change a attribute
programtically...refresh does not seem to work

Do I have to dispose of componets when the program closes or does VB
dispose of the automatically?
 
How do i trigger the control to repaint when I change a attribute
programtically...refresh does not seem to work
..Invalidate

Do I have to dispose of componets when the program closes or does VB
dispose of the automatically?

When the program closes it should release the components
automatically. There are some exceptions though, like say with COM
objects - it's usually good practice to release these manually.
However, while the program is running you will probably want to
dispose of any unneeded objects. You don't want your app to be a
resource hog (unless it has to be) especially when it serves no
purpose - you shouldn't wait to close to release unneeded objects. One
easy way to do this is to use the "Using" block which calls the object
Dispose method when the block ends. Be aware it only works with
objects that implement the IDisposable interface. For others,
especially COM objects, look into using a try...finally blocks to
release the references.

Thanks,

Seth Rowe
 
Back
Top