Picture nesnesi yerine Image kullanımı sistem kaynaklarını artırır. Picture ya da Image nesnelerine yüklenecek resimlerin RLE formatında olması, daha hızlı bir ekran güncellemesi ve az bellek kullanımı sağlar. LoadPicture komutu ile resmin yüklenmesi "EXE" dosyasının daha küçük olmasını sağlayacaktır.
PictureBox - Özellikler
Align
Appearange
AutoRedraw
AutoSize
BackColor
BorderStyle
CausesValidation
ClipControls
Container
CurrentX
CurrentY
DataChanged
DataField
DataFormat
DataMember
DataSource
DragIcon
DragMode
DrawMode
DrawStyle
DrawWidth
Enabled
FillColor
FillStyle
Font
FontBold
FontItalic
FontName
FontSize
FontStrikethru
FontTransparent
FontUnderline
ForeColor
HasDC
HDC
Height
HelpContextID
HWnd
Image
Index
Left
LinkItem
LinkMode
LinkTimeout
LinkTopic
MouseIcon
MousePointer
Name
OleDragMode
OleDropMode
Parent
Picture
RightToLeft
ScaleHeight
ScaleLeft
ScaleMode
ScaleTop
ScaleWidth
TabIndex
TabStop
Tag
ToolTipText
Top
Visible
WhatsThisHelpID
Width
Align : PictureBox’un form üzerindeki yeri
AutoRedraw : Kendini yeniden çizebilme
AutoSize : PictureBox’un otomatik olark yüklenen resim
boyutuna ayarlanması
CurrentX : Fare işaretçisinin X kooordinatı
CurrentY : Fare işaretçisinin Y koordinatı
PictureBox - Olaylar
Change
Click
DblClick
DragDrop
DragOver
GotFocus
KeyDown
KeyPress
KeyUp
LinkClose
LinkError
LinkNotify
LinkOpen
LostFocus
MouseUp
OleCompleteDrag
OleDragDrop
OleDragOver
OleGiveFeedBack
Paint
Resize
Validate
Change : Resmin değişmesi. DDE linkinin güncelleme yapması
Paint : Boyutunun değişmesi yada üzerinde olduğu formun hareketi ile oluşur
PictureBox - Yöntemler
Circle
Cls
Drag
Line
LinkExecute
LikePoke
LinkRequest
LinkSend
LoadPicture
Move
OleDrag
PaintPicture
Point
PSet
Refresh
ScaleX
ScaleY
SetFocus
ShowWhatsThis
TextHeight
TextWidth
ZOrder
Cls : PictureBox içeriğini temizler
LoadPicture : PictureBox içerisine resim yükler
ZOrder : İki kontrol üst üste yer alıyorsa
0 - Kontrol öne geçirilir
1 - Kontrol arkaya geçirilir
PictureBox İçerisinde Resim Çizmek
(General)(Decşaration)
Dim X1, Y1
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
If Button = 1 Then ‘ Çizim için başlangıç noktası
X1 = X
Y1 = Y
End If
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
If Button = 1 Then ‘ Farenin sol tuşu basılı iken
Picture1.Line (X1, Y1)-(X, Y) ‘ hareket ettirilince çizim
X1 = X ‘ yapar
Y1 = Y
End If
End Sub
PictureBox - Özellikler
Align
Appearange
AutoRedraw
AutoSize
BackColor
BorderStyle
CausesValidation
ClipControls
Container
CurrentX
CurrentY
DataChanged
DataField
DataFormat
DataMember
DataSource
DragIcon
DragMode
DrawMode
DrawStyle
DrawWidth
Enabled
FillColor
FillStyle
Font
FontBold
FontItalic
FontName
FontSize
FontStrikethru
FontTransparent
FontUnderline
ForeColor
HasDC
HDC
Height
HelpContextID
HWnd
Image
Index
Left
LinkItem
LinkMode
LinkTimeout
LinkTopic
MouseIcon
MousePointer
Name
OleDragMode
OleDropMode
Parent
Picture
RightToLeft
ScaleHeight
ScaleLeft
ScaleMode
ScaleTop
ScaleWidth
TabIndex
TabStop
Tag
ToolTipText
Top
Visible
WhatsThisHelpID
Width
Align : PictureBox’un form üzerindeki yeri
AutoRedraw : Kendini yeniden çizebilme
AutoSize : PictureBox’un otomatik olark yüklenen resim
boyutuna ayarlanması
CurrentX : Fare işaretçisinin X kooordinatı
CurrentY : Fare işaretçisinin Y koordinatı
PictureBox - Olaylar
Change
Click
DblClick
DragDrop
DragOver
GotFocus
KeyDown
KeyPress
KeyUp
LinkClose
LinkError
LinkNotify
LinkOpen
LostFocus
MouseUp
OleCompleteDrag
OleDragDrop
OleDragOver
OleGiveFeedBack
Paint
Resize
Validate
Change : Resmin değişmesi. DDE linkinin güncelleme yapması
Paint : Boyutunun değişmesi yada üzerinde olduğu formun hareketi ile oluşur
PictureBox - Yöntemler
Circle
Cls
Drag
Line
LinkExecute
LikePoke
LinkRequest
LinkSend
LoadPicture
Move
OleDrag
PaintPicture
Point
PSet
Refresh
ScaleX
ScaleY
SetFocus
ShowWhatsThis
TextHeight
TextWidth
ZOrder
Cls : PictureBox içeriğini temizler
LoadPicture : PictureBox içerisine resim yükler
ZOrder : İki kontrol üst üste yer alıyorsa
0 - Kontrol öne geçirilir
1 - Kontrol arkaya geçirilir
PictureBox İçerisinde Resim Çizmek
(General)(Decşaration)
Dim X1, Y1
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
If Button = 1 Then ‘ Çizim için başlangıç noktası
X1 = X
Y1 = Y
End If
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
If Button = 1 Then ‘ Farenin sol tuşu basılı iken
Picture1.Line (X1, Y1)-(X, Y) ‘ hareket ettirilince çizim
X1 = X ‘ yapar
Y1 = Y
End If
End Sub
