Hi
Here is the most simple example to get started with.
If you want to try this, start a new test project, in the Designer, add Button1 for x scale plus, Button2 for xscale minus, Button3 for yscale plus, Button4 for yscale minus and a couple of labels just to show what the buttons are for. The copy/replace all code in Form1 with the code below. NOTE: if you want to draw in a container e.g. PictureBox etc, then you would use the Paint event for that container instead of the one I show below (which is for the Form itself)
Option Strict On
Option Explicit On
Public Class Form1
Dim xScale As Single = 1
Dim yScale As Single = 1
Dim th As Single = 2
Private Sub Form1_Paint(sender As Object, e As PaintEventArgs) Handles MyBase.Paint
e.Graphics.ScaleTransform(xScale, yScale)
e.Graphics.DrawRectangle(New Pen(Color.Blue, th), New Rectangle(50, 20, 80, 120))
e.Graphics.DrawLine(New Pen(Color.Red, th + 2), 10, 40, 200, 120)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
xScale += 0.2D
Invalidate()
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
xScale -= 0.2D
If xScale < 0.5 Then xScale = 0.4
Invalidate()
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
yScale += 0.2D
Invalidate()
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
yScale -= 0.2D
If yScale < 0.5 Then yScale = 0.4
Invalidate()
End Sub
End Class