วันศุกร์ที่ 16 มกราคม พ.ศ. 2552
Using DrawImage Method In VB.NET
' VB.NET DrawImage Source Code
Option Explicit On
Option Strict On
Public Class Form1
Dim vImages As Image
Dim cPoint As Point
Dim vCar2 As Image
Dim CPtCar As Point
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.SizableToolWindow
Me.Text = " DrawImage method In Form With VB.NET "
Me.BackColor = Color.White
vImages = Image.FromFile("D:\Image Games\0000.bmp")
cPoint = New Point(200, 200)
vCar2 = Image.FromFile("D:\Image Games\0000.Bmp")
CPtCar = New Point(400, 200)
End Sub
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
e.Graphics.DrawImage(vImages, cPoint)
e.Graphics.DrawImage(vCar2, CPtCar)
End Sub
End Class
' Design VB.NET Source Code Games By Fernando Firaht
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น