|
| | |||||||
| Windows XP Tablet PC Newsgroup Join the discussions in the Microsoft Windows XP Tablet PC Newsgroup |
| | LinkBack | Thread Tools |
| |||
| Form Resizer I have a VB.NET application that will run on an IBM ThinkPad tablet PC. I can easily trap the DisplaySettingsChangedEvent to determine when the user swiches from portrait to landscape mode. I'm trying to work out the logic neeed to reposition/resize the controls on a form when the orientation changes. It would seem that you could just determine the ratio of the height/width when you change modes and multiply the Top, Left, Width, and Height properties of all the controls. Then, when switching back, you could apply the inverse of the height/width ratio to restore the original values. This works well in theory but has some issues in practice. For example, if I reduce a label width to 75% of its starting value, text could be cut off. TextBoxes and ComboBoxes won't size at all if the control is smaller that the Text property and thus adjacent controls will not be positioned properly in relation to it. Can this be done without taking into account portrait mode when developing the screen landscape? This is not a new problem so I was wondering what the best solution is to handle this. Any tablet PC application would have this issue. Any suggestions? Thanks Carl |
| |||
| Re: Form Resizer Please avoid cross-posting in several groups without determing where the answers shall appear. X-posting needs setting a F'up2" (follow-up-to). Rainald SetonSoftware schrieb: > I have a VB.NET application that will run on an IBM ThinkPad tablet > PC. I can easily trap the DisplaySettingsChangedEvent to determine > when the user swiches from portrait to landscape mode. I'm trying to > work out the logic neeed to reposition/resize the controls on a form > when the orientation changes. It would seem that you could just > determine the ratio of the height/width when you change modes and > multiply the Top, Left, Width, and Height properties of all the > controls. Then, when switching back, you could apply the inverse of > the height/width ratio to restore the original values. This works > well in theory but has some issues in practice. For example, if I > reduce a label width to 75% of its starting value, text could be > cut off. TextBoxes and ComboBoxes won't size at all if the control > is smaller that the Text property and thus adjacent controls will > not be positioned properly in relation to it. Can this be done > without taking into account portrait mode when developing the > screen landscape? > > This is not a new problem so I was wondering what the best solution > is to handle this. Any tablet PC application would have this issue. > Any suggestions? > > Thanks > > Carl |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| image resizer powertoy | H.S. | Windows XP | 7 | 02-16-2008 08:41 AM |
| File resizer | Dr S Namasivayam | Windows Vista | 3 | 02-08-2008 04:42 PM |
| Re: Image Resizer Doesn't Work | Polcat | Windows XP | 3 | 12-17-2007 11:10 PM |
| Picture Resizer Power Toy | Andrew Aitchison | Windows Vista | 2 | 06-27-2007 09:30 AM |
| Image resizer by MS powertoys for XP | Franktee | Windows XP | 4 | 01-04-2007 05:45 AM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |