June 2006
Intermediate to advanced
1344 pages
42h 52m
English
Visual Basic’s multimedia capabilities include graphics, images, animations and video. Previous sections demonstrated vector-graphics capabilities; this section presents image manipulation. The application in Fig. 17.23 loads an Image (System.Drawing namespace), then allows the user to scale the Image to a specified width and height.
1 ' Fig. 17.23: FrmDisplayLogo.vb 2 ' Displaying and resizing an image 3 Public Class FrmDisplayLogo 4 Private imageValue As Image 5 Private graphicsObject As Graphics 6 7 ' load image and obtain Graphics object 8 Private Sub FrmDisplayLogo_Load(ByVal sender As Object, _ 9 ByVal e As System.EventArgs) Handles Me.Load 10 11 imageValue = Image.FromFile("images\Logo.gif") ... |
Read now
Unlock full access