M
Mark Rae
Hi,
Apologies if this is a stupid question - I'm a C# newbie...
I have a Windows app with two form: frmConfigReg and frmNewApp. frmConfigReg
is the startup form. It has several controls, including a GroupBox called
grpApplications which itself contains a ComboBox called cmbApps and a button
called cmdNewApp. When cmdNewApp is clicked, it loads frmNewApp which
contains a text box where users enter the name of a new application to
configure.
However, I need to validate that the contents of this text box do not
already exist as any of the options in cmbApps on the main form.
I've tried using the following code:
Form frmConfigReg = new frmConfigReg();
but that loads a new instance of frmConfigReg, not unsurprisingly.
Can anyone please tell me how to reference controls and their properties on
another open form from within a C# windows application?
Any assistance gratefully received.
Best regards,
Mark Rae
Apologies if this is a stupid question - I'm a C# newbie...

I have a Windows app with two form: frmConfigReg and frmNewApp. frmConfigReg
is the startup form. It has several controls, including a GroupBox called
grpApplications which itself contains a ComboBox called cmbApps and a button
called cmdNewApp. When cmdNewApp is clicked, it loads frmNewApp which
contains a text box where users enter the name of a new application to
configure.
However, I need to validate that the contents of this text box do not
already exist as any of the options in cmbApps on the main form.
I've tried using the following code:
Form frmConfigReg = new frmConfigReg();
but that loads a new instance of frmConfigReg, not unsurprisingly.
Can anyone please tell me how to reference controls and their properties on
another open form from within a C# windows application?
Any assistance gratefully received.
Best regards,
Mark Rae