Buy Used
Used - Acceptable See details
$4.07 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Have one to sell? Sell yours here
Visual Basic Graphics Programming
 
See larger image
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Visual Basic Graphics Programming [Paperback]

Rod Stephens (Author)
4.2 out of 5 stars  See all reviews (16 customer reviews)


Available from these sellers.


Textbook Student FREE Two-Day Shipping for Students. Learn more

There is a newer edition of this item:
Visual Basic(r) Graphics Programming: Hands-On Applications and Advanced Color Development, 2nd Edition Visual Basic(r) Graphics Programming: Hands-On Applications and Advanced Color Development, 2nd Edition 4.7 out of 5 stars (10)
$30.71
In Stock.

Book Description

0471155330 978-0471155331 April 7, 1997 1
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:

  • Are entitled to three downloads
  • Are entitled to make a backup copy of the file for your own use
  • Are entitled to print the Wrox Blox for your own use
  • Are entitled to make annotations and comments in the Wrox Blox file for your own use
  • May not lend, sell or give the Wrox Blox to another user
  • May not place the Wrox Blox file on a network or any file sharing service for use by anyone other than yourself or allow anyone other than yourself to access it
  • May not copy the Wrox Blox file other than as allowed above
  • May not copy, redistribute, or modify any portion of the Wrox Blox contents in any way without prior permission from Wiley

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).



Editorial Reviews

Amazon.com Review

Would you ever write a complex graphics application in Visual Basic (VB)? Author Rod Stephens presents a convincing demonstration that Visual Basic 5.0 can handle just about any complex graphics task, including bitmap processing, complex scan conversions, fractal image generation, 3-D vector graphics, and even ray tracing.

You'll need to understand VB basics before picking up Visual Basic Graphics Programming, but the book's clear writing style and measured pace will help you master these relatively arcane subjects and add powerful graphics features to your programs. The book begins with a quick brush-up on standard Visual Basic graphics features such as coordinate systems, graphics objects, and calls to Windows graphics application programming interfaces (APIs), but quickly moves on to a broad spectrum of bitmap- and vector-oriented topics.

The world may not need another Photoshop or AutoCAD written in VB, but if any aspect of your program could benefit from the addition of complex graphics--possibilities include anything from an enhanced interface to data visualization--this book can show you how it's done. Visual Basic Graphics Programming also serves as a fine introduction to many classic graphics techniques that are more traditionally presented in C. The bundled CD includes all code examples from the book as well as a large library of useful graphics functions and procedures.

From the Publisher

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 teachers 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. CD-Rom is included. Visual Basic Graphics Programming covers: VB controls programming; graphics programming with the Windows 95 API; Image processing; animation, 2D, and 3D graphics; shading models, ray tracing, and radiosity; and geometric and other graphics algorithms for VB.

Product Details

  • Paperback: 704 pages
  • Publisher: Wiley; 1 edition (April 7, 1997)
  • Language: English
  • ISBN-10: 0471155330
  • ISBN-13: 978-0471155331
  • Product Dimensions: 7.8 x 5.1 x 1 inches
  • Shipping Weight: 1 pounds
  • Average Customer Review: 4.2 out of 5 stars  See all reviews (16 customer reviews)
  • Amazon Best Sellers Rank: #1,268,426 in Books (See Top 100 in Books)

 

Customer Reviews

16 Reviews
5 star:
 (8)
4 star:
 (5)
3 star:
 (1)
2 star:
 (2)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.2 out of 5 stars (16 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

3 of 3 people found the following review helpful:
5.0 out of 5 stars Excellent reference, September 15, 1999
By A Customer
This review is from: Visual Basic Graphics Programming (Paperback)
This is a good book for anyone with some knowledge about Visual Basic who wants to know how to make better graphics in the language. It starts off with the basics--lines, API functions, etc. Later, it has sections on more complex topics, such as ray tracing and higher-dimensional graphics.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


2 of 2 people found the following review helpful:
5.0 out of 5 stars Great book for graphics programming!, January 14, 1999
This review is from: Visual Basic Graphics Programming (Paperback)
When you are making games in Visual Basic or in any other language for the matter, then most of the graphics are done before the game code even thinks about executing. Usually you have bitmaps with sprites and masks. These are copied or most likely blitted to the gaming field using various methods. This is usually good enough for the simplest of games, but what happens when you want to create those special effects you see in the commercial games - such as a fading game field when you have completed a level or when everything turns red as your game character die? Well the old way of doing things was to get a Graphics Programming book, which showed you various algorithms usually written in C or some other non-VB friendly language. Not surprisingly I now tell you that this is not way any more, simply because there is a book on this subject written for Visual Basic programmers - Visual Basic Graphics Programming by Rod Stephens.

If you ever want to program serious games in Visual Basic or do some serious graphics programming then I can only recommend this book. The book starts out by explaining the various methods you have available when doing graphics programming with VB, including a discussion on when to actually do then drawing. You are then carried gracefully through the API way of doing things and lead into the world of colors. Colors are, as you probably already know, a confusing issue especially when it comes to color modes and color palettes. The book explains the palette issue in a very compelling way and best of all there are examples using the techniques described. The next issue in the book that is of critical interest to the VB game programmer is the chapter on image processing. The techniques describe therein will enable you to create those special fades and color conversions i.e. turning the gaming field into bloody red scene. As you read through the chapter on image processing you will undoubtedly get many ideas for small special effects that will spice your game up, such as a blur on the gaming field when the player has done something wrong. Chapter 5 in the book is the chapter I thing is most relevant for game programmers, simply because it deals with the essence of game programming - Animation. If you don't know how to speed your games up and even keep them down, then you will learn it here. The chapter also deals with many cool effects to apply to your games. Among these are some very cool wipes and dissolve effects, which would suit any `in-between' level transitions.

There are many special effects described in the book that you can apply to your games if you want to spice them up a bit, but the most important aspect is actually the future. The future I speak of here is of course the support for DirectX in Visual Basic programs, a support Microsoft will realize with DirectX 7.0. This will enable you to use the video hardware for some of the ordinary operations such as Blits, Color fills, rotation, scaling etc... But it also imposes a challenge to the game programmer, since using the GDI subsystem with DirectX is very slow and is only recommended for Text output. So what do you do when you have to draw lines, curves or even simple rectangles? Well the simple solution is of course not to use them, though this is hardly a viable one if you want to be serious. The only solution is to draw them manually using scan-line algorithms. Not surprisingly I recommend the book again, since it will give the needed background information to do this. Another cool feature in DirectX is that you are able to work with memory surfaces that contains the raw bitmap data, meaning that you have direct access to the graphical data. This access level is a great basis for performing splitting fast image processing that will take game your application to the next level using the algorithms discussed in the book.

You can't mention DirectX without going into Direct3D, the standard 3D engine used for many Window games. Direct3D comes in two flavors Retained Mode and Immediate Mode. Retained mode is the `easy' mode for using Direct3D, which naturally also means that it is the slow mode. Using Retained mode does not require you to know much of the underlying 3D techniques, but as stated it does impose a great deal of overhead and thus it is not ideal for fast games. For games you are almost forced to use Immediate mode if you want speed and space to work with. Immediate does, unlike Retained mode, require knowledge of 3d math and techniques. Though the book does not teach you how to build a full-flexed 3D engine it does cover the basics that you need to know, such as Vector and matrix operations, scaling, rotation and much more. It also covers simple and complex surfaces and how to hide parts of these when that is needed. You might be wondering why you would need a graphics-programming book instead of one the books that will undoubtedly be published on the subject of Direct3D and Visual Basic? If we were to take the C world of programming as an example, then the books there that describes Direct3D is very poor and basically useless. The reason is of course that Direct3D is a vast subject with many intricacies and quirks, and the best source is the SDK that comes with it. But this SDK does not teach the basics, it teaches you how to use the Direct3D API and nothing more. So to get anything out of this you definitely need a resource that explains the basics of 3D in a way so you fully understand it. This is what the book does, simply because it shows you how implement your own 3D algorithms and if you can implement the techniques then you also understand them.

That is about everything I have to say on this and to conclude I can only recommend this book as a great source for graphical programming with Visual Basic, either with the ordinary GDI but also more importantly in the future with DirectX. Don't think that the book will give ready to plug-in code for your game projects because it will not. What it will give you is an explanation on the topics along with a whole array of samples (over 150), and then you can take it from there. Knowledge of simple geometry math and some experience in VB programming is a prerequisite for the book.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


1 of 1 people found the following review helpful:
5.0 out of 5 stars Well-Done Stephens!, November 18, 1999
This review is from: Visual Basic Graphics Programming (Paperback)
This book includes a lot of ideas and concepts that extremely serve graphics programmers. I really found this book very useful, and it gave me new ideas that enhanced my way in programming. Besides it gives the reader full illustration for some problems in descriptive geometry and numerical analysis. REALLY Well-done Rod! Adel
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews











Only search this product's reviews



What Other Items Do Customers Buy After Viewing This Item?


Suggested Tags from Similar Products

 (What's this?)
Be the first one to add a relevant tag (keyword that's strongly related to this product).
 
(3)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums


Listmania!


Create a Listmania! list

So You'd Like to...


Create a guide


Look for Similar Items by Category


Look for Similar Items by Subject