Control position on Pocket_PC vs CE

J

jayderk

Hello all,

I was just curious on how the best way to control the position for controls
on Windows CE vs Pocket PC?

My guess is in the form load i would do something like this.

foreach(Control objControl in this.Controls)
{
if(OS.Equals("PocketPC"))
{
objControl.Location.Y = (objControl.Location.Y - 24); // moves the
control up 24 points cause the menu bar is on the bottom
}
}

My question is how can I be sure I am only moving textbox, labelbox,
picturebox, etc... and not other controls that do not need to be moved, if
there are any?

Regards,
Jay
 
G

Ginny Caughey [MVP]

Jay,

Something like this should work:

if(objControl is TextBox || objControl is PictureBox)
{
// move it
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top