Summary

Team Fly 

Page 641

Private Sub Button1_Click(ByVal sender As System.Object, _
 ByVal e As System.EventArgs) Handles Button1.Click
        Timer1.Enabled = True
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, _
 ByVal e As System.EventArgs) Handles Timer1.Tick

        Panel1.Left += 2

        'stop when it hits the correct position
        If Panel1.Left >= X Then Timer1.Enabled = False

End Sub

When you run this, you see the panel slide in and take its correct position. Adjust the step size (+–2) to fiddle with the granularity; it's unlikely that you can lower the timer's Interval enough to speed things up as much as you'd like to, so you have to accept some granularity. However, a step of 4 isn't noticeable, and 12 is probably too fast for you.

Try dropping panels or other controls down from the top; slipping them in, then back out when the user is finished with them; sliding more than one control at a time; and so on.

Summary

This chapter covers one of the most overlooked aspects of program design—the design itself, properly so called; the actual look of the finished application. Among the issues considered in this chapter are metallic surfaces, fonts, layering, light sources, depth, framing, shading, gradients, and transitions.

If you think the design job is best left to the art department, either you work for a very large company (with enough cash to hire application-design specialists with Windows ergonomics experience) or you're trying to avoid what is partly a programmer's responsibility. You, the programmer, are often the best person to advise which controls should be grouped together, and how the various windows in your application interact (and therefore what kinds of transitions should link them), and other graphics issues.

At the very least, the programmer or programming team should participate in meetings with the art department—if there is one—to ensure that purely visual considerations aren't overriding logical groupings or Windows conventions. And if there is no art department, that's all the more reason for programmers to refer to this chapter's suggestions before considering an application finished. Oh, and one more thing: Take a good look at Word or the Visual Studio IDE and make sure that your Cancel, OK, and other buttons are in the same location as theirs on your forms; make sure that your toolbars look like theirs; ensure that your menus are located where theirs are, and so on. Microsoft has spent loads of money testing their designs, so if you follow their conventions you won't go far wrong.

Team Fly 


Visual Basic  .NET Power Tools
Visual Basic .NET Power Tools
ISBN: 0782142427
EAN: 2147483647
Year: 2003
Pages: 178

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net