Tip:
Highlight text to annotate it
X
configuring windows forms
all right so we're gonna focus this video entirely on
working with the windows form and we'll win the swarm is of course the basis
of all windows applications that contain user a fixed rate so
new into small because is really our campus
for placing controls and objects in the things that users are going to be interacting with
in order to make our application function
so let's jump into allen hearing
uh... cover a lot more detail re talking about his video
will set up here with an introduction to windows format anti-religious work
give you brief introduction here give you the anatomy of a form of different areas
you know blah what the control boxes of course will know what the minimize maximize and close
button is all about
it is dark although body many apartment different types of forms out there
they'll jump into adding in configuring windows forms will get right into the jewel studio
two thousand five environment here
or not to add forms into our projects
configure their property the design time to modify to look
infield and behavior of the form
uh... within the environment self
they will get into working with windows forms and hear all had a
to do things that you-know-who are necessarily inside the environment but will learn how
to
manipulate properties of are forming behaviors and look and feel such
at run time which is of course when the application is rice will do that kind of stuff dynamically
using code
also do an interesting thing out sugar creek
announce standard windows form and that is something that is unjust
you know your your standard rectangular windows for me will make a
a formal sort of circle
and uh... just give you a little insight on how you can really design your own forms
from scratch
all right so stick a doctorate in introduction to windows forms an extra set off by getting
familiar with
again what a windows form is the types of forms that are out there so much so parts
up as i mentioned here
of windows forms really the basis for applications that require grapple user fees of that otherwise
known as agree
and uh... and you know we could have applications that have just one forever simplifications
or we could have complex applications that contain many forms that
uniforms they communicate and uh... in cooperate in order to force
get the job done
uh... and of course earlier this ah... quite a bit
uh... forms are just simply the hosts elijahlist containers or the campuses
for controls which provide ways
for user interaction of immigration and the one who probably hear most is actually container
i think it is a popular word inside of
uh... the visual studio byron because we have container controls we'll talk more about that
when we get a good into controls but
controls could contain other control so
it's a good idea to take it away with the term container because the poor really is
just one big container
for all of its controls
now here's a quick reform looks like by itself if you read a form for project this is what
you start out west
and duchess of some notes here this area right here are the icon is
this is considered the control box
is considered the control box because there's a little menu in here just like all applications
in de klerk appear
here's the control box with the menu items
i'll restore minimize maximize close move in sizes are all
standard amongst all windows applications
so it's not control box you'll see that as a property that we can manipulate this of
course
called the text here
so we can manipulate this property the text property of the foreign changed added well
here
uh... we also have the area where minimize maximize and close buttons are these are pretty
obvious internal air hopefully to everyone
and of course we have control over these buttons as well
now of course this would be considered our work area within hear anything it's outside
of this this border here of blues of course
for sizing talk if you have a sizable for of course we have control over that as well
uh... other things you may know about forgery not no
this is your your standard
form there's also something called m_c_i_ forms but stand for multiple document interface
and ironically enough this web revocation of reason right here
is just that
because what that means here
is it's you can have multiple form so
each one of these is an actual form
and we have our main india i form on the outside here with the gray area in the background
which can of course contain other forms
so in this case r_n_d_ i formed as the container
other forms right so at n_b_c_ education like this for they call a word or excel or any
office application earlier
anything that has tennis outside
andy i standard feel here and they have all these uh... some forms of any of these are
called andy i applications
so that's how that works in the sky one of the to give you an idea of the different units
difference between those because
you can certainly create india applications within visual studio can create
one form and then you can
designate that form is in mt i'd
uh... application her hand and yeah i formative course you would host other forms inside of
it
uh... and of course and yet again since for
multiple document interface
faisal childless line jump individual children get familiar with how to work with windows
for himself so i'm gonna start button and up to programs
board a visual studio two thousand five or fire open visual studio two thousand five
here
refine create our own project
so that they create project years ago was surely create
a project from scratch out some forms into it
and of course recreate a windows application underneath the visual basic language
we're going to use which is of course arty shows and by default here
windows application
i'm actually had to go ahead and uh... store this down here inside of our three dash five
to six directory inside of my
user profile here
soul wages given application uh... it an application name slips cosa me despite two six
about syrah two bench
winforms their ego
or hill k
and that will create
just like then you can see by default we are to get
one form thrown into the project here you can add
more kid like he can right click on the project here
put on the ad
in choose new form
you can also just choose new item here we're going to dinner windows form
uh... regardless which are going to take a story taking to the same dialogue box does
just that a lot of at behayelit windows form here
in given a name
or not which we want to hear all this click on that
now we have
multiple forms
parcels close out a form to here for a more will come back to only talk about how to
work with multiple forms
tools quit the expert here to close out of it
and sore back to form one in the first thing you probably do
when you at a form to your application is configured regular
t to get it to look the way he wanted to before you earlier controls and everything on it
the first he'll probably do then is click on the form
and they'll allow us to work with the properties
for the subject in this case of course
is the form
so this is our properties windows down here and others contains all of the properties
that we can manipulate at design time
uh...
and really disturbs properties when it just has a few buttons appear
if you don't like it sore did
uh... alphabetically like i have here you can sort by group
and that will
you can see sort of group everything's who excess ability appearance behavior dat design
focus layout miscellaneous
in windows that look through quite a quite a few uh... good ones here so the common ones
though so respect alphabetically
desired tabor buttons over here
uh... if you want to view properties which we are now or if you want to view me vent
so we'll talk about events here in a little bit
uh... but for now let's go back to properties let's just say we wanna
modify the look and feel the first you'll probably want to do is give your form a name
uh... and of course the reason being is
because this is how can i refer to this in code and also give you more of a a better
identifier
what this was all about the ship it many forms interpretation
form one obviously his in very descriptive so
let's go and just
call this army inform
so severe mean farm
uh... the next thing you'll probably want to do here is a is modified a look and feel
a little bit
else do that by to look at the form border sell what type of form is this
it is a form that we allow the user to resize in which case a lot of course think about
by the time the actual try not to put it in order to to sure that all your controls properly
resizing scale
as you
as the user modifies of the size of your form so
or a job is done you can choose as a bunch who's from urea fixed single for instance
and fixing will just basically indicates
that uh... we can size the application there's no sizing going on here in a fixing or environment
we can't see that your cat run
then ninety contestants outsole have run
now the world i'm also right you can see if normal sort of borders
there's no size you know
so it's fixed
and that's exactly what that stands for it
absolute back into the same time by
stopping application there
and back to our form border-style
will serve three d
three-d_ concede is kinda sinks
the inside containers usable three-d_ look and feel affix dialogue
just simply means
that it's a dialog box write it
there's no control external moving there's no resizing it's a complete fixed
dialogue just like a standard dialog box
sizable is really the default here as you can see
asia is in default and the property when dole shel bold
you can see sizable is in bold here so if we turn it back
retreated fixed or you can see upholds a text
uh... fixed or when does it all window meaning it
no minimize our maximize but has no control box
justice standard
looking for matha small close button appear and of course fixed meaning
you can resize but of course finally here we have a sizable toward the same thing only
it is sizable let's go back to the standard one which is just
standard old sizable
and leave it at that but that's a popular one that i see uh... that i personally configure
a lot right up the bad as well
uh... obviously some other ones here enabled
if the form is uh... enabled which is by default that means all the controls in a car
uh... also enabled meaning users can click on them and
and use them
if it is
i've not enabled if we have a disabled form that means everything in the form is also
disabled all controls absolutely everything
we also have ah... similar ones in here let's go and thrown down the fire
i will be changed the font to everything that again is on the form
when parent that far
uh... so keep in mind the forms ten-year tomo slowing thing you do such as four colors fonts
uh... anything in in in that kind of nature
uh... will
absolutely off lowdown
and are all the controls on the bottom line parrot those properties unless you override
them at the control level
and for colored means all the text
so any tax on a for a text on controls if you have it
if we set this up deformable get all the control who also contain a text
help but here
help button is uh... it will actually had a little palpable question mark appear on
the title bar and of course a lot to implement code
to tell the form what to do with the help button is clicked
well seven icon
you like the standard i'm not looking like i mean you can click this button
and you can browse through life and i just happen to have a bunch of icons lying around
in here so loyal and uh...
changeset about to an application icon ericko
excellent different
so that's all the icon is pretty straightforward
uh... you can see here is our
is andy i containers of twenty two send ya evocation we can
change that's true and with that
we have a form that looks like our
whiteboard application here now we obviously have other forms that we would then uh...
uh... attached to this mean for here
so there's that
similar standard ones in here
it's going to have a maximize box
soap return at the false the maximize box will actually go away still see here
but if we were to run here
you will see that the maximize backs is
disable so i can click it's actually disabled there
succeeding with the minimized xa minimize that's actually goes away though and if they're
both
pitfalls then they both go away
because he had to maximize if any one of them
is uh... is false then
though both stay there it's just the other one will be disabled