Re: Using OpenNETCF Community Edition - Display a Control? by Noble
Noble
Mon May 21 11:22:02 CDT 2007
On May 21, 11:01 am, "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote:
> Just like any control. Create it, set the properties and add it to the
> Form's Controls collection. See the designer-generated code for any control
> for an example, but your code might look like this:
>
> Button2 btn = new Button2();
>
> void MyForm()
> {
> InitializeComponent();
>
> btn.Height = 100;
> btn.Width = 100;
> btn.Text = "Hello";
> btn.Visible = true;
>
> this.Controls.Add(btn);
>
> }
>
> --
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Managed Code in an Embedded Worldwww.OpenNETCF.com
>
> "Noble" <NobleB...@gmail.com> wrote in message
>
> news:1179758230.164654.303510@36g2000prm.googlegroups.com...
>
>
>
> >I am using VS2005 and WM5. I also am using the Smart Device Framework
> > 2.0 community edition from OpenNETCF. Can anyone share with me some
> > example C# code of how to make a Button2 control display on a form?
>
> > Thanks in advance,
> > nb- Hide quoted text -
>
> - Show quoted text -
Thanks Chris. I will give it shot and see what happens.
nb