How to make a Magnifier
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
9 posts
Page 1 of 1
Hello Everyone,
I just talked with my friend about my magnifier and he suggested that I should make a tutorial on it so that's what I'm gonna do seeing that I am bored and don't have anything to work on. So in this tutorial you will learn how to make a magnifier similar to the one which comes with every version of Windows but a bit advanced (better I mean). This one will be able to support 3 colour modes i.e. Normal, Inverted and Grayscale. It will also be able to zoom by the factors 1-100. I tested this and it has a great feature, when you zoom in with the zoom factor 100 and go to any of windows controls, you will see some awesome gradients. And the Inverted mode looks really cool. So here is the start...
---------------------------------------------------------------------------
First of all, open Visual Basic 2008, create a new project, choose Windows Forms Application, type in the textbox Magnifier and press the OK button. As soon as you have done this, the Form1 will appear on the screen on which we will design our application and code it.
First we will do the designing and then the coding. So now we will change the Form1's properties to make it look good. Change the Form1's Text property to Magnifier. Change it's StartPosition property to CenterScreen. Change it's MaximizeBoz property to False (Recommended, Optional).
Now add the following things to the form:
(1)_ 5 Labels. Change Label1's Text property to "Colour Mode:", Label2's to "Zoom Factor:", Label3's to "0", Label4's to "Zoom In/Out:" and Label5's to "". Place Label1 at the top left of the form, Label2 below it, Label3 in front of it and Label4 below Label2. Change Label5's AutoSize property to False, Anchor property to "Top, Bottom, Left, Right", Visible property to False. Label5 will work for the resizing of the magnifying screen. So resize it and place it below the above labels and all controls.
(2)_ 1 ComboBox. Change it's Anchor property to "Top, Left, Right" and add these items to it: "Normal", "NormalInverted", "Grayscale". Place it next to Label1.
(3)_ 1 HScrollBar. Place it next to Label4. Maybe change it's Height property to "21". Change it's Anchor property to "Top, Left, Right", LargeChange property to "1", Maximum property to "99", RightToLeft property to "Yes" and Value property to "50".
(4)_ 1 CheckBox. Place it next to Label3 on the right side of the Form. Change it's Anchor property to "Top, Right" and Text property to "Topmost".
(5)_ 1 Timer. Change it's Enabled property to "True". Change it's interval to whatever you think is memory efficient. In my case I set it's Interval property to "100" (Didn't changed it in the first place)
Now is the time to code Form1 and it's components. So right-click on the form in the Solution Explorer and click View Code.
Type the following code after Public Class Form1:
---------------------------------------------------------------------------
Voila! You have just completed making a Magnifier which zooms all the way to X100 along with three cool colour modes. Now debug and run it by pressing the Start Debugging button located at the main toolstrip. Test it, if it works fine then its SAVING time. You can save your project by going to File -> Save All and then pressing Save.
And there! You have your project and application that works. If you have any problem or can't understand something, please feel free to ask by either a comment or by PM. I have also attached a screenshot.
Please use the Give Thanks button and the Reputation System to appreciate my hard work. I have wrote this tutorial while making an Magnifier project myself so you can download the source file in the attachments.
Thank you.
![Image]()
I just talked with my friend about my magnifier and he suggested that I should make a tutorial on it so that's what I'm gonna do seeing that I am bored and don't have anything to work on. So in this tutorial you will learn how to make a magnifier similar to the one which comes with every version of Windows but a bit advanced (better I mean). This one will be able to support 3 colour modes i.e. Normal, Inverted and Grayscale. It will also be able to zoom by the factors 1-100. I tested this and it has a great feature, when you zoom in with the zoom factor 100 and go to any of windows controls, you will see some awesome gradients. And the Inverted mode looks really cool. So here is the start...
---------------------------------------------------------------------------
First of all, open Visual Basic 2008, create a new project, choose Windows Forms Application, type in the textbox Magnifier and press the OK button. As soon as you have done this, the Form1 will appear on the screen on which we will design our application and code it.
First we will do the designing and then the coding. So now we will change the Form1's properties to make it look good. Change the Form1's Text property to Magnifier. Change it's StartPosition property to CenterScreen. Change it's MaximizeBoz property to False (Recommended, Optional).
Now add the following things to the form:
(1)_ 5 Labels. Change Label1's Text property to "Colour Mode:", Label2's to "Zoom Factor:", Label3's to "0", Label4's to "Zoom In/Out:" and Label5's to "". Place Label1 at the top left of the form, Label2 below it, Label3 in front of it and Label4 below Label2. Change Label5's AutoSize property to False, Anchor property to "Top, Bottom, Left, Right", Visible property to False. Label5 will work for the resizing of the magnifying screen. So resize it and place it below the above labels and all controls.
(2)_ 1 ComboBox. Change it's Anchor property to "Top, Left, Right" and add these items to it: "Normal", "NormalInverted", "Grayscale". Place it next to Label1.
(3)_ 1 HScrollBar. Place it next to Label4. Maybe change it's Height property to "21". Change it's Anchor property to "Top, Left, Right", LargeChange property to "1", Maximum property to "99", RightToLeft property to "Yes" and Value property to "50".
(4)_ 1 CheckBox. Place it next to Label3 on the right side of the Form. Change it's Anchor property to "Top, Right" and Text property to "Topmost".
(5)_ 1 Timer. Change it's Enabled property to "True". Change it's interval to whatever you think is memory efficient. In my case I set it's Interval property to "100" (Didn't changed it in the first place)
Now is the time to code Form1 and it's components. So right-click on the form in the Solution Explorer and click View Code.
Type the following code after Public Class Form1:
Code: Select all
Write the following code by double-clicking CheckBox1 whose Text property was "Topmost":
Public Const BLACKNESS = &H42
Public Const DSTINVERT = &H550009
Public Const CAPTUREBLT = &H40000000
Public Const MERGECOPY = &HC000CA
Public Const MERGEPAINT = &HBB0226
Public Const NOMIRRORBITMAP = &H80000000
Public Const NOTSRCCOPY = &H330008
Public Const NOTSRCERASE = &H1100A6
Public Const PATCOPY = &HF00021
Public Const PATINVERT = &H5A0049
Public Const PATPAINT = &HFB0A09
Public Const SRCCOPY = &HCC0020
Public Const SRCAND = &H8800C6
Public Const SRCERASE = &H440328
Public Const SRCINVERT = &H660046
Public Const SRCPAINT = &HEE0086
Public Const WHITENESS = &HFF0062
Public Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (ByVal hDestDC As Integer, ByVal x As Integer, ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal hSrcDC As Integer, ByVal xSrc As Integer, ByVal ySrc As Integer, ByVal dwRop As Integer) As Integer
Public Declare Function GetDesktopWindow Lib "user32" () As IntPtr
Public Declare Function GetDC Lib "user32.dll" (ByVal hWnd As IntPtr) As IntPtr
Public Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Integer, ByVal hdc As Integer) As Integer
Dim GrayscaleMatrix As Imaging.ColorMatrix = New Imaging.ColorMatrix(New Single()() {New Single() {0.3, 0.3, 0.3, 0, 0}, New Single() {0.59, 0.59, 0.59, 0, 0}, New Single() {0.11, 0.11, 0.11, 0, 0}, New Single() {0, 0, 0, 1, 0}, New Single() {0, 0, 0, 0, 1}})
Dim ImageAttributes As New Imaging.ImageAttributes
Private Sub RepaintMagnifier()
Dim e As Graphics = Me.CreateGraphics
Dim hr As Integer = Screen.PrimaryScreen.Bounds.Width
Dim vr As Integer = Screen.PrimaryScreen.Bounds.Height
Dim percent As Single = Me.HScrollBar1.Value / 100
Dim lengthX As Single = (Label5.Width) * percent
Dim lengthY As Single = (Label5.Height) * percent
Label3.Text = 100 - HScrollBar1.Value & " X"
Dim offsetX As Single = lengthX \ 2
Dim offsetY As Single = lengthY \ 2
Dim blitAreaX As Integer = Label5.Width
Dim blitAreaY As Integer = Label5.Height
Dim b As New Bitmap(CInt(blitAreaX), CInt(blitAreaY))
Dim g As Graphics = Graphics.FromImage(b)
g.SmoothingMode = Drawing2D.SmoothingMode.HighSpeed
g.CompositingQuality = Drawing2D.CompositingQuality.HighSpeed
g.PixelOffsetMode = Drawing2D.PixelOffsetMode.HighSpeed
g.InterpolationMode = Drawing2D.InterpolationMode.Low
e.SmoothingMode = Drawing2D.SmoothingMode.HighSpeed
e.CompositingQuality = Drawing2D.CompositingQuality.HighSpeed
e.PixelOffsetMode = Drawing2D.PixelOffsetMode.HighSpeed
e.InterpolationMode = Drawing2D.InterpolationMode.Low
Dim hWndWindow As IntPtr = GetDesktopWindow()
Dim hdcWindow As IntPtr = GetDC(hWndWindow)
Dim hdcGraphics As IntPtr = g.GetHdc()
BitBlt(hdcGraphics.ToInt32, 0, 0, blitAreaX, blitAreaY, hdcWindow.ToInt32, Cursor.Current.Position.X - offsetX, Cursor.Current.Position.Y - offsetY, SRCCOPY Or CAPTUREBLT Or NOMIRRORBITMAP)
If ComboBox1.SelectedItem = "Inverted" Then
BitBlt(hdcGraphics.ToInt32, 0, 0, blitAreaX, blitAreaY, hdcGraphics.ToInt32, 0, 0, NOTSRCCOPY)
End If
ReleaseDC(hWndWindow.ToInt32, hdcWindow.ToInt32)
g.ReleaseHdc(hdcGraphics)
If ComboBox1.SelectedItem = "Normal" Or ComboBox1.SelectedItem = "Inverted" Then
e.DrawImage(b, New Rectangle(Label5.Location.X, Label5.Location.Y, blitAreaX, blitAreaY), 0, 0, lengthX, lengthY, GraphicsUnit.Pixel)
ElseIf ComboBox1.SelectedItem = "Grayscale" Then
e.DrawImage(b, New Rectangle(Label5.Location.X, Label5.Location.Y, blitAreaX, blitAreaY), 0, 0, lengthX, lengthY, GraphicsUnit.Pixel, ImageAttributes)
End If
e.Dispose()
End Sub
Code: Select all
Add the following code to Form1_Load event by double-clicking Form1's designer window or right-clicking and pressing "View Code":
If CheckBox1.Checked = True Then
Me.TopMost = True
Me.MinimizeBox = False
Else
Me.TopMost = False
Me.MinimizeBox = True
End If
Code: Select all
And now add the following (final) code to Timer1 by double-clicking it:
ImageAttributes.SetColorMatrix(GrayscaleMatrix)
ComboBox1.SelectedItem = "Normal"
Code: Select all
Well, that's all. It was real easy, wasn't it?RepaintMagnifier()
---------------------------------------------------------------------------
Voila! You have just completed making a Magnifier which zooms all the way to X100 along with three cool colour modes. Now debug and run it by pressing the Start Debugging button located at the main toolstrip. Test it, if it works fine then its SAVING time. You can save your project by going to File -> Save All and then pressing Save.
And there! You have your project and application that works. If you have any problem or can't understand something, please feel free to ask by either a comment or by PM. I have also attached a screenshot.
Please use the Give Thanks button and the Reputation System to appreciate my hard work. I have wrote this tutorial while making an Magnifier project myself so you can download the source file in the attachments.
Thank you.

You do not have the required permissions to view the files attached to this post.
Last edited by Usman55 on Sat Feb 05, 2011 3:02 am, edited 1 time in total.
Nice tut Usman55!
Instead of LOL use this -
LSIBMHBIWFETALOL
Which means -
Laughing silently in between my head because it wasn't funny enough to actually laugh out loud!
LSIBMHBIWFETALOL
Which means -
Laughing silently in between my head because it wasn't funny enough to actually laugh out loud!
This seems quite resource hungry (most magnifiers don't need 300MB of RAM).
You can also print the screen every second or so , It takes alot of memory
Did you take that from FreeVBCode?
I applaud you if you didn't, but I frown upon you for giving no credits if you did.
I applaud you if you didn't, but I frown upon you for giving no credits if you did.
Whoa ok wow.. great tut however the source code is REALLY REALLY similar to the one in FreeVBCode..
Great job writing this tutorial, however please give credits to the ones who made it..
Code: Select all
'It has 3 different color settings to choose from (normal, grayscale, invert colors)
Public Class Form1
Inherits System.Windows.Forms.Form
'dwRop Constants
Public Const BLACKNESS = &H42
Public Const DSTINVERT = &H550009
Public Const CAPTUREBLT = &H40000000
Public Const MERGECOPY = &HC000CA
Public Const MERGEPAINT = &HBB0226
Public Const NOMIRRORBITMAP = &H80000000
Public Const NOTSRCCOPY = &H330008
Public Const NOTSRCERASE = &H1100A6
Public Const PATCOPY = &HF00021
Public Const PATINVERT = &H5A0049
Public Const PATPAINT = &HFB0A09
Public Const SRCCOPY = &HCC0020
Public Const SRCAND = &H8800C6
Public Const SRCERASE = &H440328
Public Const SRCINVERT = &H660046
Public Const SRCPAINT = &HEE0086
Public Const WHITENESS = &HFF0062
Public Declare Function BitBlt Lib "gdi32" Alias "BitBlt" (ByVal hDestDC As Integer, ByVal x As Integer, ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal hSrcDC As Integer, ByVal xSrc As Integer, ByVal ySrc As Integer, ByVal dwRop As Integer) As Integer
Public Declare Function GetDesktopWindow Lib "user32" () As IntPtr
Public Declare Function GetDC Lib "user32.dll" (ByVal hWnd As IntPtr) As IntPtr
Public Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Integer, ByVal hdc As Integer) As Integer
Dim GrayscaleMatrix As Imaging.ColorMatrix = New Imaging.ColorMatrix(New Single()() _
{New Single() {0.3, 0.3, 0.3, 0, 0}, _
New Single() {0.59, 0.59, 0.59, 0, 0}, _
New Single() {0.11, 0.11, 0.11, 0, 0}, _
New Single() {0, 0, 0, 1, 0}, _
New Single() {0, 0, 0, 0, 1}})
Dim ImageAttributes As New Imaging.ImageAttributes
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
'Double Buffering
Me.SetStyle(ControlStyles.DoubleBuffer Or ControlStyles.UserPaint Or ControlStyles.AllPaintingInWmPaint, True)
Me.UpdateStyles()
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents stbMagnifier As System.Windows.Forms.StatusBar
Friend WithEvents vsbMagnifier As System.Windows.Forms.VScrollBar
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
Friend WithEvents itmNormal As System.Windows.Forms.MenuItem
Friend WithEvents itmGrayScale As System.Windows.Forms.MenuItem
Friend WithEvents itmInvertColors As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem5 As System.Windows.Forms.MenuItem
Friend WithEvents itmExit As System.Windows.Forms.MenuItem
Friend WithEvents tmrUpdate As System.Windows.Forms.Timer
Friend WithEvents tmrRepaint As System.Windows.Forms.Timer
Friend WithEvents mnuMagnifier As System.Windows.Forms.MainMenu
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.stbMagnifier = New System.Windows.Forms.StatusBar
Me.vsbMagnifier = New System.Windows.Forms.VScrollBar
Me.tmrRepaint = New System.Windows.Forms.Timer(Me.components)
Me.mnuMagnifier = New System.Windows.Forms.MainMenu
Me.MenuItem1 = New System.Windows.Forms.MenuItem
Me.itmNormal = New System.Windows.Forms.MenuItem
Me.itmGrayScale = New System.Windows.Forms.MenuItem
Me.itmInvertColors = New System.Windows.Forms.MenuItem
Me.MenuItem5 = New System.Windows.Forms.MenuItem
Me.itmExit = New System.Windows.Forms.MenuItem
Me.tmrUpdate = New System.Windows.Forms.Timer(Me.components)
Me.SuspendLayout()
'
'stbMagnifier
'
Me.stbMagnifier.Location = New System.Drawing.Point(0, 251)
Me.stbMagnifier.Name = "stbMagnifier"
Me.stbMagnifier.Size = New System.Drawing.Size(292, 22)
Me.stbMagnifier.TabIndex = 0
'
'vsbMagnifier
'
Me.vsbMagnifier.Dock = System.Windows.Forms.DockStyle.Right
Me.vsbMagnifier.LargeChange = 1
Me.vsbMagnifier.Location = New System.Drawing.Point(276, 0)
Me.vsbMagnifier.Minimum = 1
Me.vsbMagnifier.Name = "vsbMagnifier"
Me.vsbMagnifier.Size = New System.Drawing.Size(16, 251)
Me.vsbMagnifier.TabIndex = 1
Me.vsbMagnifier.Value = 50
'
'tmrRepaint
'
Me.tmrRepaint.Enabled = True
'
'mnuMagnifier
'
Me.mnuMagnifier.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1})
'
'MenuItem1
'
Me.MenuItem1.Index = 0
Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.itmNormal, Me.itmGrayScale, Me.itmInvertColors, Me.MenuItem5, Me.itmExit})
Me.MenuItem1.Text = "&Color Settings"
'
'itmNormal
'
Me.itmNormal.Checked = True
Me.itmNormal.Index = 0
Me.itmNormal.Text = "&Normal"
'
'itmGrayScale
'
Me.itmGrayScale.Index = 1
Me.itmGrayScale.Text = "&Grayscale"
'
'itmInvertColors
'
Me.itmInvertColors.Index = 2
Me.itmInvertColors.Text = "&Invert Colors"
'
'MenuItem5
'
Me.MenuItem5.Index = 3
Me.MenuItem5.Text = "-"
'
'itmExit
'
Me.itmExit.Index = 4
Me.itmExit.Text = "E&xit"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.vsbMagnifier)
Me.Controls.Add(Me.stbMagnifier)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.MaximizeBox = False
Me.Menu = Me.mnuMagnifier
Me.MinimizeBox = False
Me.Name = "Form1"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Magnifier"
Me.TopMost = True
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Open Transparent Form
Dim Form2Instance As New Form2
Form2Instance.Show()
Form2Instance.Left = Me.Left - Form2Instance.Width
Form2Instance.Top = Me.Top
'Open Normal Form
Dim Form3Instance As New Form3
Form3Instance.Show()
Form3Instance.Left = Me.Left + Me.Width
Form3Instance.Top = Me.Top
'Initialize Greyscale Matrix
ImageAttributes.SetColorMatrix(GrayscaleMatrix)
End Sub
'Timer use to repaint magnifier with the set time interval or refresh rate
Private Sub tmrRepaint_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrRepaint.Tick
RepaintMagnifier()
End Sub
'By using a seperate function to repaint the screen magnifier program
'it will help prevent flickering from happening.
'using Invalidate will cause flickering.
'Thanks for Dr. ScrewUp for this solution!!
Private Sub RepaintMagnifier()
Dim e As Graphics = Me.CreateGraphics
Dim hr As Integer = Screen.PrimaryScreen.Bounds.Width
Dim vr As Integer = Screen.PrimaryScreen.Bounds.Height
'Get Zoom Percentage
Dim percent As Single = Me.vsbMagnifier.Value / 100
Dim lengthX As Single = (Me.Width - Me.vsbMagnifier.Width) * percent
Dim lengthY As Single = (Me.Height - Me.stbMagnifier.Height) * percent
'Zoom Factor To Statusbar
Me.stbMagnifier.Text = "Zoom Factor : " & 100 - Me.vsbMagnifier.Value & " X"
'Center Image Around The Mouse
Dim offsetX As Single = lengthX \ 2
Dim offsetY As Single = lengthY \ 2
'Actual Area To Blit To
Dim blitAreaX As Integer = Me.Width - Me.vsbMagnifier.Width
Dim blitAreaY As Integer = Me.Height - Me.stbMagnifier.Height
'New Bitmap & Graphics Object
Dim b As New Bitmap(CInt(blitAreaX), CInt(blitAreaY))
Dim g As Graphics = Graphics.FromImage(b)
'Try to make things faster
g.SmoothingMode = Drawing2D.SmoothingMode.HighSpeed
g.CompositingQuality = Drawing2D.CompositingQuality.HighSpeed
g.PixelOffsetMode = Drawing2D.PixelOffsetMode.HighSpeed
g.InterpolationMode = Drawing2D.InterpolationMode.Low
'Try to make things faster
e.SmoothingMode = Drawing2D.SmoothingMode.HighSpeed
e.CompositingQuality = Drawing2D.CompositingQuality.HighSpeed
e.PixelOffsetMode = Drawing2D.PixelOffsetMode.HighSpeed
e.InterpolationMode = Drawing2D.InterpolationMode.Low
'DC Of Desktop And Graphics Object
Dim hWndWindow As IntPtr = GetDesktopWindow()
Dim hdcWindow As IntPtr = GetDC(hWndWindow)
Dim hdcGraphics As IntPtr = g.GetHdc()
'BitBlt & Graphics.DrawImage Solution
'------------------------------------------
'BitBlt the Screen (Captures Transparent Windows & Prevents Mirror Effect)
BitBlt(hdcGraphics.ToInt32, 0, 0, blitAreaX, blitAreaY, hdcWindow.ToInt32, Cursor.Current.Position.X - offsetX, Cursor.Current.Position.Y - offsetY, SRCCOPY Or CAPTUREBLT Or NOMIRRORBITMAP)
'BitBlt to Invert Colors
If Me.itmInvertColors.Checked = True Then
BitBlt(hdcGraphics.ToInt32, 0, 0, blitAreaX, blitAreaY, hdcGraphics.ToInt32, 0, 0, NOTSRCCOPY)
End If
'Free Memory
ReleaseDC(hWndWindow.ToInt32, hdcWindow.ToInt32)
g.ReleaseHdc(hdcGraphics)
If Me.itmNormal.Checked = True Or Me.itmInvertColors.Checked = True Then
e.DrawImage(b, New Rectangle(0, 0, blitAreaX, blitAreaY), 0, 0, lengthX, lengthY, GraphicsUnit.Pixel)
ElseIf Me.itmGrayScale.Checked = True Then 'DrawImage w/ Grayscale ImageAttributes
e.DrawImage(b, New Rectangle(0, 0, blitAreaX, blitAreaY), 0, 0, lengthX, lengthY, GraphicsUnit.Pixel, ImageAttributes)
End If
e.Dispose()
End Sub
Private Sub itmNormal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles itmNormal.Click
Me.itmNormal.Checked = True
Me.itmGrayScale.Checked = False
Me.itmInvertColors.Checked = False
End Sub
Private Sub itmGrayScale_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles itmGrayScale.Click
Me.itmNormal.Checked = False
Me.itmGrayScale.Checked = True
Me.itmInvertColors.Checked = False
End Sub
Private Sub itmInvertColors_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles itmInvertColors.Click
Me.itmNormal.Checked = False
Me.itmGrayScale.Checked = False
Me.itmInvertColors.Checked = True
End Sub
End Class
Great job writing this tutorial, however please give credits to the ones who made it..
I don't know about the code copying because my friend gave me this code. And about the frame rate, I'll add something to make it custom. BTW my computer doesn't takes any high memory when I am using this...
EDIT: I don't think I have much time to update the source code and screen shot according to the custom interval thing, but I have updated the timer-adding part.
EDIT: I don't think I have much time to update the source code and screen shot according to the custom interval thing, but I have updated the timer-adding part.
Very nice...but when i run it , it show next error :
Dim b As New Bitmap(CInt(blitAreaX), CInt(blitAreaY)) <- ArgumentException was unhandle
Parameter is not valid.
Edit : Srry...it work very nice...
Dim b As New Bitmap(CInt(blitAreaX), CInt(blitAreaY)) <- ArgumentException was unhandle
Parameter is not valid.
Edit : Srry...it work very nice...
If somebody helps you, don't forget to say "Thank You!".
I think it was caused because of some designing problem or maybe just a glitch. Because when you restarted it, it worked okay, thanks god!
9 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023