How can I access controls of one class from another class.
Your question should probably be something like, "How can I access controls on one dialog from a separate dialog?" While it is not a good idea to do so directly (see "loose coupling"), a better way would be to send a message to the parent (the one that owns the control) dialog.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
I have created a simple dialog application where it can perform crud operations but how I did it was I open a connection an do some operations inside most of the buttons as I'm still starting out as a beginner(noob).
What will be a good approach to separate all the database related operations in another class? or keeping as it is, is it a good practice?
I would like some suggestions.
Last Visit: 5-Dec-19 17:35 Last Update: 5-Dec-19 17:35