Re: VS 2008, forms, and controls

  • From: "RicksPlace" <ofbgmail@xxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Sun, 23 Jan 2011 05:39:43 -0500

Hi: I'm not sure about the Fruit Basket program but you can put any number of 
pixels between controls, either left, right, top or bottom of any given 
control. To have a sighted person see some intervening space between 2 controls 
you might consider 5 or a few more pixels. You can judge how many total pixels 
to use vertically or horizontally by calculating the height or width of the 
controls in a column or row on the screen and then add in the seperator pixels 
and compare the total to the screen resolution in pixels to determine how the 
control layout will "fit" on the display screen. 
  You can set the position of each control's upper left corner pixel in the 
properties page for the form in question and also the height and width. Then 
you can calculate the total height and width of the control from the starting 
position and add a few pixels either to the right or the bottom position to add 
some blank space between controls. For groups of related controls like the day, 
month and year of a date you might want only a few pixels seperating them but 
for space between groups of controls you might want more space. For example: 
You might put 3 pixels between a date's month, day and year. Then put 25 pixels 
between the end of the year, to the right of it, and then start another group 
of fields like perhaps Price, Quantity and Total - again all seperated by a few 
pixels. If you have a Form with a width of say 1,000 pixels set up to fill 
pretty much an entire screen and centered you could put the Date Fields on the 
left upper quadrant and perhaps the other fields in the upper right quadrant by 
putting the date group between the horzontal pixels 0 and 500  and putting the 
setting the horzontal pixels of the other fields between 500 and 1,000 taking 
into consideration margins where necessary. You would set the vertical position 
to less than half the height of the form height to put the fields in the upper 
quadrants. There is a write up with some specific examples of laying out forms 
using pixels and other methods floating around out there somplace. I think they 
are on either Inthane's Grabag or perhaps it has been taken over by one of the 
other guys but they are out there. As for MDI, I have not yused it but I would 
guess you would just drop controls into the MDI control and then position them 
in the Properties for the MDI Windowas you might for a table of controls so 
that the positioning would be relative to the MDI control rather than the 
screen or form itself. If you can't find the tutorials on positioning controls 
on a form let me know and I will see if I can dig them up and send them to you 
if I still have them floating around my machine.
  Rick USA
  ----- Original Message ----- 
  From: Darko Pogačić 
  To: programmingblind@xxxxxxxxxxxxx 
  Sent: Saturday, January 22, 2011 5:19 PM
  Subject: VS 2008, forms, and controls


  Hi there!
  How I started to use VS 2008, I need some help when drawing a controls on a 
form.
  I've seen the Fruit basket example, and I know how to make the design of a 
form, but I want to know more details about controls, how many picsels one 
control needs to be right, or bottom from another, and how to know the best 
control position on a form.
  How to know this, if I want to have more then given number of controls in the 
Fruit basket program on my form?
  Also, I found property for an mdi form, it's IsMDIContainer, but what's 
property for a child window, which belongs to an mdi form?
  Best regards.

Other related posts: