Instead of setting button.Parent, try using this.Controls.Add(button)
"Michael Daniels" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi NG:
>
> this code works on a desktop
>
> it also works on a Windows ce Maschine BUT their is no text on the
button???
>
> Am I doing something wrong or is it a bug?
>
> Regards Michael
>
> public Form1()
>
> {
>
> //
>
> // Erforderlich für die Windows Form-Designerunterstützung
>
> //
>
> InitializeComponent();
>
> for(int i = 0; i < 5 ; i++){
>
> System.Windows.Forms.Button button = new Button();
>
> button.Parent = this;
>
> button.Text = "Test";
>
> button.Location = new System.Drawing.Point(0,i * 40);
>
> button.Size = new System.Drawing.Size(100,40);
>
> }
>
> }
>
>
|