Monday, August 26, 2013

Close WinForm with Escape Key in visual basic

Close WinForm with Escape Key in visual basic

Close WinForm
How to close a Winform by pressing ESC ? Using VB is very simple. Here is the sample code:


Private Sub Form1_KeyUp(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp

        If e.KeyCode = Keys.Escape Then
            Me.Close()
        End If

End Sub


Visual basic is a very popular programming language and is important to use it to make nice programs. That includes for example good user interface.
Put an Escape function and a cancel function in very of your applications to enhance your work.

Friday, August 23, 2013

free Antivirus review

Top 3 free anti-virus

Quick review of 3 top best free antivirus programs for your computer with all most common protection in 2013.

Avast Free Antivirus

Easy to install and easy to use, Avast Antivirus was one of my favorites antivirus until 2011. Today is still a good antivus. The only thing I don’t really like because they will try to offer you a lot of their stuff. Get’s annoying. Registration is free for all your computers for personal use.

AVR Antivirus

This is a good antivirus. That is all I could say. Give all the basic stuff. Free to use.

AVG Antivirus

Not bad. AVG Antivirus is available in most language. Windows 8 ready. For example, all the program is in Chinese is 100% Chinese, not half translated. One thing I don’t like about this antivirus is king of giving false alarm. So is not very good for your grandma.
Note that in 2008, an update from AVG made Windows XP impossible to start. User32.dll was detected as a Trojan.

Antivir antivirus  (Avira Antvirus)

This antivirus is not recommended. If you want an anti-virus that detects nothing, then you could install it. I had enough of the umbrella popup every 10 minutes. Year after year, I am not impressed with this antivirus. Always problem updating itself.

Tuesday, August 20, 2013

Excel VBA for beginners

Excel VBA for beginners

Get WorkSheet and get cells inside Excel with VBA


Build macro in Excel with VBA easily by knowing at first the basic principal of object order inside Excel.

Excel file -> Excel Sheet -> Excel Cell.

When you are working in VBA inside Excel, you don’t need to worry about the Excel file because the Excel file is the file you opened.

That means that you just need to get the right Excel Sheet first. Here is a simple Youtube video and it will illustrate the very basic steps.

Tuesday, August 13, 2013

Display Printers

Display Printers

Get Installed Local Printer


Here is the simplest code to retrieve all printer names on a local computer programmatically.

In Visual Basic
Imports System.Drawing.Printing

'[...]
For index1 = 0 To PrinterSettings.InstalledPrinters.Count
      MsgBox(PrinterSettings.InstalledPrinters.Item(index1))
Next