This Wrox Blox shows you how to add graphics to Visual Basic 2008 applications by explaining fundamental graphics techniques such as: drawing shapes with different colors and line styles; filling areas with colors, gradients, and patterns; drawing text that is properly aligned, sized, and clipped exactly where you want it; manipulating images and saving results in bitmap, JPEG, and other types of files. Also covered are instructions for how to greatly increase your graphics capabilities using transformations, which allow you to move, stretch, or rotate graphics. They also let you work in coordinate systems that make sense for your application. The author also describes techniques for using the above in printouts, describing the sequence of events that produce a printout and show how to generate and preview printouts, with examples which show how to wrap long chunks of text across multiple pages, if necessary.
In addition, you will learn about two powerful new graphic tools that were introduced with .NET Framework 3.0: WPF graphics and FlowDocuments. XAML graphic commands allow a WPF application to draw and fill the same kinds of shapes that a program can draw by using graphics objects.
Finally, a discussion on the FlowDocument object shows you how to define items that should be flowed across multiple pages as space permits. This lets you display text, graphics, controls, and other items that automatically flow across page breaks. FlowDocument viewers make displaying these documents easy for you, and simplifies the user's reading of the documents.
This Wrox Blox also contains 35 example programs written in Visual Basic 2008, although most of the code works in previous versions of Visual Basic .NET as well. The most notable exceptions are WPF graphics and FlowDocuments, both of which require WPF provided in .NET Framework 3.0 and later.
Table of Contents
Section 1: Using Graphics, Pens, and Brushes 2
Getting a Graphics Object 3
Using a Graphics Object 5
Creating Pens 8
Creating Brushes 11
Section 1 Wrap-up 13
Section 2: Using Advanced Pens and Brushes 14
Custom Dash Patterns 14
Longitudinal Stripes 16
Custom End Caps 17
Linear Gradient Brushes 18
Path Gradient Brushes 20
Section 2 Wrap-up 21
Section 3: Drawing Text 22
Drawing Simple Text 22
Using Layout Rectangles 23
Section 3 Wrap-up 27
Section 4: Manipulating Images 27
Creating and Loading Bitmaps 27
Manipulating Bitmaps 29
Saving Image Files 32
Section 4 Wrap-Up 33
Section 5: Using Transformations 33
Basic Transformations 33
World Coordinate Mapping 36
Section 5 Wrap-up 40
Section 6: Printing 40
Using PrintPage 41
Using Other Event Handlers 44
Printing Transformations 45
Section 6 Wrap-up 48
Section 7: Using WPF Graphics 48
Decorative Controls 49
Shape Controls 49
Brushes 53
ImageBrush 56
Section 7 Wrap-up 57
Section 8: Building FlowDocuments 57
BlockUIContainer 58
List 58
Paragraph 58
Section 58
Table 58
Section 8 Wrap-up 60
Conclusion 61
About Rod Stephens 62
Usage Rights for Wiley Wrox Blox
Any Wrox Blox you purchase from this site will come with certain restrictions that allow Wiley to protect the copyrights of its products. After you purchase and download this title, you:
If you have any questions about these restrictions, you may contact Customer Care at (877) 762-2974 (8 a.m. - 5 p.m. EST, Monday - Friday). If you have any issues related to Technical Support, please contact us at 800-762-2974 (United States only) or 317-572-3994 (International) 8 a.m. - 8 p.m. EST, Monday - Friday).
"synopsis" may belong to another edition of this title.
ROD STEPHENS is a contract software engineer specializing in graphical user interface design, algorithms, and database systems. He writes a column on Visual Basic algorithms for the professional newsletter Visual Basic Developer. Previously a senior member of the technical staff at GTE Laboratories, he has developed several large systems for GTE and other clients using components.
The definitive guide to creating graphics applications and features with Visual Basic—including version 5.0
In this book, Visual Basic expert Rod Stephens provides a powerful blend of graphics principles and proven hands-on techniques. He teaches the practical fundamentals for the full range of graphics-intensive programs, including data display, multimedia, and games. Readers will learn how to both create entire graphics applications and add sophisticated graphics capabilities to nongraphics applications. Visual Basic Graphics Programming covers:
Includes CD-ROM with
Visit our Web site at: http://www.wiley.com/compbooks/
"About this title" may belong to another edition of this title.
US$ 3.95 shipping within U.S.A.
Destination, rates & speedsSeller: Once Upon A Time Books, Siloam Springs, AR, U.S.A.
paperback. Condition: Good. This is a used book in good condition and may show some signs of use or wear . This is a used book in good condition and may show some signs of use or wear . Seller Inventory # mon0001038970
Quantity: 1 available
Seller: Blue Vase Books, Interlochen, MI, U.S.A.
Condition: good. The item shows wear from consistent use, but it remains in good condition and works perfectly. All pages and cover are intact including the dust cover, if applicable . Spine may show signs of wear. Pages may include limited notes and highlighting. May NOT include discs, access code or other supplemental materials. Seller Inventory # BVV.0471155330.G
Quantity: 1 available
Seller: Bulrushed Books, Moscow, ID, U.S.A.
Condition: Acceptable. LIGHTNING FAST SHIPPING! A heavily used, but still working copy. Coffee stain and wrinkling to the edge of the pages when a tired undergrad fell asleep and knocked their cup over on their books. The binding and pages of the book have been reinforced with tape, has tape and stickers on the cover, as well as lots of notes (some of the answers in the learning activities may be filled in) on the pages. Definitely not pretty, but it's a working copy at a great price that ships fast. ~ Book does NOT contain an access code or CD/DVD. Seller Inventory # #180D-00141
Quantity: 1 available
Seller: AwesomeBooks, Wallingford, United Kingdom
Paperback. Condition: Very Good. Visual Basic Graphics Programming (with CD-ROM) This book is in very good condition and will be shipped within 24 hours of ordering. The cover may have some limited signs of wear but the pages are clean, intact and the spine remains undamaged. This book has clearly been well maintained and looked after thus far. Money back guarantee if you are not satisfied. See all our books here, order more than 1 book and get discounted shipping. Seller Inventory # 7719-9780471155331
Quantity: 1 available
Seller: Bahamut Media, Reading, United Kingdom
Paperback. Condition: Very Good. This book is in very good condition and will be shipped within 24 hours of ordering. The cover may have some limited signs of wear but the pages are clean, intact and the spine remains undamaged. This book has clearly been well maintained and looked after thus far. Money back guarantee if you are not satisfied. See all our books here, order more than 1 book and get discounted shipping. Seller Inventory # 6545-9780471155331
Quantity: 1 available
Seller: El Club de los Raros, Sevilla, Spain
Libro de 2ª mano verificado y vendido por el emprendimiento social El Club de los Raros. Con cada compra estás ayudando a plantar árboles, financiar ONGs y proyectos culturales. Libro en buen estado, puede presentar algunas marcas de desgaste por el uso. Seller Inventory # ECDLR-16-05-2024-.org-233004-6591
Quantity: 1 available
Seller: El Club de los Raros, Sevilla, Spain
NO INCLUYE CD - Libro de 2ª mano verificado y vendido por el emprendimiento social El Club de los Raros. Con cada compra estás ayudando a plantar árboles, financiar ONGs y proyectos culturales. Libro en buen estado, puede presentar algunas marcas de desgaste por el uso. Seller Inventory # ECDLR-01-06-2024-.org-T242T051-7204
Quantity: 1 available