Q1. Can I show pictures of file types other
than BMP and JPG?
Q2. Is
it possible to show pictures in other controls?
A. The PictureBox is the
control to use when you are just displaying images. However, many other controls
allow you to display pictures as part of the control. For instance, you
can display an image on a button control by setting the button's Image property
to a valid picture.
Q3. How can I easily get more information
about a property when the Description section of the Properties window just
doesn't cut it?
A. Click the property in question to select it, and then
press F1context-sensitive help applies to properties in the Properties window, as well.
Q4. I find that I need to see a lot of design windows at
one time, but I can't find that "magic" layout. Any suggestions?
A. Run
at a higher resolution. Personally, I won't develop in less than 1024x768. As a
matter of fact, all my development machines have two displays, both
running at 1152x864. You'll find that any investment you make in having more
screen real estate will pay you big dividends.
Q5. Is there an
easy way to get help about an object's member?
A. Absolutely. Visual C#'s
context-sensitive Help extends to code as well as to visual objects. To get help
on a member, write a code statement that includes the member (it doesn't
have to be a complete statement), position the cursor within the member text,
and press F1. For instance, to get help on the int data type, you could
type int, position the cursor within the word int, and press F1.
Q6. Are
there any other types of object members besides properties and
methods?
A. Yes. An event is actually a member of an object, although
it's not always thought of that way. Although not all objects support events, most objects do support properties and methods.
Q7. Is it
possible to create custom events for an object?
A. Yes, you can create
custom events for your own objects (you'll learn about such objects in Hour 16,
"Designing Objects Using Classes"), and you can also create them for
existing objects. Creating custom events, however, is beyond the scope of this
book.
Q8. Is it possible for objects that don't have an interface to
support events?
A. Yes. To use the events of such an object, however, the
object variable must be dimensioned a special way or the events aren't available. This gets a little tricky and is beyond the scope of this
book.
Q9. How many form properties should I define at design time as
opposed to runtime?
A. You should set all properties that you can at
design time. First, it'll be easier to work with the form because you can see
exactly what the user will see. Also, debugging is easier because
there's less code.
Q10. Should I let the user minimize and maximize all
forms?
A. Probably not. First, there's no point in letting a form be
maximized if the form isn't set up to adjust its controls accordingly. About forms, print dialog boxes, and spell check windows are examples of forms
that should not be resizable.
No comments:
Post a Comment