I want to create a program in VB.NET2005 windows application which will show google map on the form along with its contols of zoom.
OR
Also an image on form having zoomin and zoomout buttons.
Please Help!!!!
:icon_cry:

Dani AI

Generated

: two practical routes depending on whether you need an interactive map or just a zoomable image. 's idea of scaling an image is the simplest for a local file. For an interactive map (pan/zoom, real tiles), use a mapping control rather than stretching a PictureBox — that gives smooth tiles, caching and provider support.

A quick, reliable pattern for a zoomable image in VB.NET WinForms: keep the original Image untouched, generate a scaled Bitmap on each zoom step using high-quality interpolation, and dispose old bitmaps to avoid leaks. This preserves image quality and lets you add Zoom In/Out buttons or mouse-wheel support.

Private original As Image
Private scale As Double = 1.0

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    original = Image.FromFile("C:\map.png")
    PictureBox1.SizeMode = PictureBoxSizeMode.Normal
    UpdateImage()
End Sub

Private Sub btnZoomIn_Click(sender As Object, e As EventArgs) Handles btnZoomIn.Click
    scale *= 1.2
    UpdateImage()
End Sub

Private Sub btnZoomOut_Click(sender As Object, e As EventArgs) Handles btnZoomOut.Click
    scale /= 1.2
    UpdateImage()
End Sub

Private Sub UpdateImage()
    Dim newW = CInt(original.Width * scale)
    Dim newH = CInt(original.Height * scale)
    Dim bmp As New Bitmap(newW, newH)
    Using g As Graphics = Graphics.FromImage(bmp)
        g.InterpolationMode = Drawing2D.InterpolationMode.HighQualityBicubic
        g.DrawImage(original, New Rectangle(0, 0, newW, newH))
    End Using
    Dim old = PictureBox1.Image
    PictureBox1.Image = bmp
    If old IsNot Nothing AndAlso old IsNot original Then old.Dispose()
End Sub

Notes: for very large images this is CPU/memory heavy—consider tiling or a scrollable Panel around the PictureBox. For real map tiles, investigate GMap.NET or embedding Google Maps in a WebBrowser (Google Maps APIs require an API key and adherence to Google Maps Platform terms; see the official docs such as the Static/JavaScript API pages).

do you have plenty of picture of the map????? maybe u should use stretch to zoom in and zoom out using your picture

can you give me the code please

i can't give u the code but you should create that by your own and i will check it ok

nasl?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.