wrote:
> The ControlCollection class which has the collection of controls for a form
> or container, doesn't support accessing controls by name in the Compact
> Framework. You could loop through the collection until you find the required
> control, or you could use reflection to get hold of a specific control.
>
> For Each c As Control in Me.Controls
>
> If c.Name == nameFromDatabase Then
> c.BackColor = Color.FromArgb(colorValueFromDatabase)
> End If
> Next
>
> Peter
>
> --
> Peter Foot
> Device Application Development MVP
www.peterfoot.net|
www.inthehand.com >
> <Mario.L...@gmail.com> wrote in message
>
> news:1179144222.604126.251040@l77g2000hsb.googlegroups.com...
>
>
>
> > Hi,
>
> > I have 32 Bottons on a Form
> > and via sql i make a call to a tabel
> > in the table there is the button name and the color saved
>
> > so i made a sql statement
> > there call all buttons there are red
>
> > then write the name in a variable
>
> > ok now beginn my problem
>
> > i have the variable with the name of the button
>
> > in this button must be set the backcolor to red
>
> > sry for my english my fav language is german
>
> > thx
>
> > Mario
>
> > work with VS2005 Professional - Compact Framework 2 / Mobile SQL
> > Server 2005
>
> > On 14 Mai, 12:47, "Peter Foot [MVP]" <feedb...@nospam-inthehand.com>
> > wrote:
> >> First things first - what are you trying to achieve? Secondly, what
> >> errors
> >> are you getting with this approach (there is no such class as
> >> DrawingSystems
> >> for a start...
>
> >> Assuming you have a button on your form called myButton, you would set
> >> it's
> >> back color like this:-
> >> Me.myButton.BackColor = System.Drawing.Color.Red
>
> >> Peter
>
> >> --
> >> Peter Foot
> >> Device Application Development MVP
www.peterfoot.net|
www.inthehand.com >
> >> <Mario.L...@gmail.com> wrote in message
>
> >>news:1179136124.459896.180130@w5g2000hsg.googlegroups.com...
>
> >> > Hi there
>
> >> > how i can made this
>
> >> > me.variable.backcolor = DrawingSystems.Red
> >> > me(variable).backcolor = DrawingSystems.Red
>
> >> > this dosent work pleas help me
>
> >> > thx
>
> >> > Mario- Zitierten Text ausblenden -
>
> >> - Zitierten Text anzeigen -- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -