Creating a Zoom Application in VB.NET
Submitted by donbermoy on Thursday, May 14, 2015 - 23:56.
This tutorial will teach you how to create a zoom application in vb.net.
Now, let's start this tutorial!
1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application.
2. Have only a Timer on the Form named Timer1.
3. Now, we will code our program.
We will declare first the variables. This will have the Graphics library and the bitmap that we will use.
Then after that we will code for the Tick event of the Timer. This will totally create image out from the mouse hovering to zoom the location of the mouse cursor.
Lastly, start the Timer from your Form_Load.
- Dim g As Graphics = Me.CreateGraphics
- Dim bmp As Bitmap
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- bmp = New Bitmap(250, 200)
- g = Graphics.FromImage(bmp)
- g.CopyFromScreen(MousePosition.X - 100, MousePosition.Y - 10, 0, 0, New Size(300, 300))
- PictureBox1.Image = bmp
- End Sub
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Timer1.Start()
- End Sub
Output:
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below. Best Regards, Engr. Lyndon Bermoy IT Instructor/System Developer/Android Developer/Freelance Programmer Mobile: 09488225971 Landline: 826-9296 E-mail:[email protected] Add and Follow me on Facebook: https://www.facebook.com/donzzsky Visit and like my page on Facebook at: https://www.facebook.com/BermzISwareAdd new comment
- 633 views