-
Declaring variables
Hi,
Q1.In vb.net how can you declare a variable that works for all foms in a project whithout having to declare it in every form?
Q2. Almost the same: All my forms work with data, and in every form I have to declare a dataset and do a dataset.readxml(..). Can I do this somewhere so that it is valid for all forms automatically?
Thanks in advance.
-
Hi
Q1 declare it has public
Q2) Create a class that encapsulates all the functionalities you need.
Regards
Jorge
-
Hi,
That's what Modules are for.
Declare the variables as public in a module and write the database coding in a public sub in the module.
-