[program-l] Re: positioning controls in Visual Basic 2008 with Window-Eyes

  • From: "David Lant" <david.lant1@xxxxxxxxxxxxxx>
  • To: <program-l@xxxxxxxxxxxxx>
  • Date: Sat, 5 Apr 2008 20:31:48 +0100

In .Net, forms are stored as XML files with a .vb or .cs extension,
depending on which language you are using.  

Given that you can write your own VB or C# code to position the controls at
runtime, there's nothing stopping you writing a standard routine that will
reposition controls to your specification that way.  Indeed, a colleague of
mine wrote just such a routine for our VB6 systems, so that all the screens
in our systems would have the same look and feel.  As I mentioned before
though, this can become complicated should you develop a need to change
something about either individual forms, or the general layout of your
forms.  It's much easier, even for blind programmers, to have some kind of
design surface on which to design your layout, rather than having to mess
around with calculating borders and spacing.

The beauty of .NET is, you can do it any way you like.

All the best,

David


-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Doug Lee
Sent: 04 April 2008 22:06
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: positioning controls in Visual Basic 2008 with
Window-Eyes

Are forms still stored as text .frm files?  Any reason one could not
write a Perl or other language utility to re-align the controls in a
given file to fit rules of your choice?

On Fri, Apr 04, 2008 at 08:31:07PM +0100, David Lant wrote:
I've mentioned this before, but there is a pretty good add-in for Visual
Studio 2003/5/8 called MZTools.  It isn't free, but it's very reasonably
priced for individual developers.  One of the more interesting features it
adds is an intelligent form layout feature, which automatically lays out
controls on a form for you, based on rules you provide in the options.  For
example, you can specify the minimum distance between controls, and the
margin about the edge of the form and so on.  It's a handy way to start your
form off quickly, and then you can fine tune it manually later if necessary.

Also, Visual Studio 2005/8 includes some automatic form layout features of
its own.  Particularly when using the Data Source facility, you can define
either a database, class or web service as a data source.  You can then drag
that data source on to a form, and VS will automatically create a form with
bound controls laid out for you.

All the best,

David

-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Pranav Lal
Sent: 04 April 2008 02:11
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: positioning controls in Visual Basic 2008 with
Window-Eyes

Hi Jason,

Another thing to keep in mind when laying out controls on a form is the
detection of overlapping controls. This is the biggest issue I face when
positioning controls on a form. You need to leave enough space amongst
different controls on a form so that they don't overlap. Usually, I look at
the left property of a control and then, the value of the width property to
get a feeling for the size of the control. Once that is done, I keep some
margin and then position my next control accordingly. Of course, this is
during horizontal positioning. When looking at verticle positioning, you
need to do a similar calculation using the top and height properties.

I believe the forms designer displays information regarding the currently
focused control on the status line. You could set window eyes to monitor the
status line and see if that helps.


If I'm wrong about any of this, someone will correct me.

-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Jason Fayre
Sent: Friday, April 04, 2008 12:53 AM
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] positioning controls in Visual Basic 2008 with
Window-Eyes

Hi Everyone,
I am trying to learn Visual Basic.  I am a Window-eyes user, and as a
result, do not have access to the nifty scripts which are available
for JAWS.  Can anyone give me some tips for form design using wineyes?
 I'm referring to positioning controls on forms.  Right now, to add a
control, I am just adding it by pressing enter from the
toolbox.  Is there any better way to do this?
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq


** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

-- 
Doug Lee                 dgl@xxxxxxxx        
SSB BART Group           doug.lee@xxxxxxxxxxxxxxxx
http://www.ssbbartgroup.com
"It is not the mountain in the distance which makes you want to stop
walking; but the grain of sand in your shoe."  --Anon
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq


** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: