vb.net - How does visual know what form I want? -


so have folowing code form.

public class tab      public personas, formaciones, avisos, cursos list(of object)      [lots of code] end class 

on form want formaciones list, can just:

listbox1.datasource = tab.formaciones 

and works, perfectly.

but.. how?

tab class, not instance of it, vb able understand want instance of class.

what happen if there mor 1 tab open? how work internally?

this part of default application framework enabled when creating vb.net winforms applications.

its intent migration vb6 creates singletons of each form.

if want different instances, can disable/ignore framework , write own start methods.

more details:

singleton forms: https://msdn.microsoft.com/en-us/library/ms233839.aspx

enable/disable: https://msdn.microsoft.com/en-us/library/17k74w0c(v=vs.100).aspx

full article: https://visualstudiomagazine.com/articles/2007/10/01/enable-the-application-framework-in-vb.aspx


Comments

Popular posts from this blog

ssh - Vagrant Windows - ssh_exchange_identification: read: Connection reset by peer -

gcc - Neither ld wrap nor LD_PRELOAD working to intercept system call -

I could not debug scala remote application on eclipse or IntelliJ IDEs -