| Visual Basicte Resim Zoomlama Kodları Dim Zoom As Boolean, iHgtMin As Single, iWdhMin As Single
Private Sub DoZoom(index As Integer)
Do
Image1.Visible = False
Select Case index
'Enlarging
Case 0
Image1.Top = Image1.Top - (Image1.Height * 0.025)
Image1.Left = Image1.Left - (Image1.Width * 0.025)
Image1.Height = Image1.Height + (Image1.Height * 0.05)
Image1.Width = Image1.Width + (Image1.Width * 0.05)
'Shrinking
Case 1
If Image1.Height <= 25 Or Image1.Width <= 25 Then
Image1.Visible = True
Zoom = False
Exit Sub
End If
Image1.Top = Image1.Top + (Image1.Height * 0.025)
Image1.Left = Image1.Left + (Image1.Width * 0.025)
Image1.Height = Image1.Height - (Image1.Height * 0.05)
Image1.Width = Image1.Width - (Image1.Width * 0.05)
End Select
Image1.Visible = True
DoEvents
If Not Zoom Then Exit Do
Loop
End Sub
Private Sub Command1_MouseDown(index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Zoom = True
DoZoom index
End Sub
Private Sub Command1_MouseUp(index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Zoom = False
End Sub
Private Sub Form_Load()
Image1.Stretch = True
iWdhMin = Image1.Width / 4
iHgtMin = Image1.Height / 4
End Sub
__________________ İmzA BilmeM; BarmaG BassaK OlmaZ Mı ? Hıı ... |