Complete set: Intro to C - Bill Buchanan
Complete set: Intro to C - Bill Buchanan
Complete set: Intro to C - Bill Buchanan
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
5.10 Using non-visual components<br />
We can import components on<strong>to</strong> our form at design time. These have properties<br />
that we can conveniently <strong>set</strong> at design time.<br />
An example of such a component is the file browser.<br />
duction <strong>to</strong> .NET<br />
<strong>Intro</strong><br />
The non‐visual components can have their properties <strong>set</strong> conveniently at design<br />
time. The code <strong>to</strong> declare these components (globally <strong>to</strong> the project) are included<br />
au<strong>to</strong>matically – as is the code <strong>to</strong> <strong>set</strong> the design time property values.<br />
We can use these controls in code.<br />
Using OpenFileDialog<br />
if (System.Windows.Forms.DialogResult.OK<br />
== openFileDialog1.ShowDialog())<br />
{<br />
string s= openFileDialog1.FileName ;<br />
MessageBox.Show(s);<br />
}<br />
Agilent .NET Course: Module 5, page 8