giovaniluigi
Member
- Joined
- Jan 9, 2011
- Messages
- 16
- Programming Experience
- 5-10
How to share an instance of a class to all the application in VB.NET ?
Probably you are going to answer: "Use Shared members"
Ok, but I have one particular problem:
I have an application that has multiple forms.
The application is connected through the serial port to a hardware.
The communication with this hardware should be available to all the forms of my application.
So, can I use a shared function to handle the serial port ?
Can I declare any function/sub/member as shared in a class ?
Is there any restriction ?
The part that I'm concerned is about the serial port events and serial port connection like opening and closing it.
Probably you are going to answer: "Use Shared members"
Ok, but I have one particular problem:
I have an application that has multiple forms.
The application is connected through the serial port to a hardware.
The communication with this hardware should be available to all the forms of my application.
So, can I use a shared function to handle the serial port ?
Can I declare any function/sub/member as shared in a class ?
Is there any restriction ?
The part that I'm concerned is about the serial port events and serial port connection like opening and closing it.