Home

How to compress and decompress a file in VB.Net

In this tutorial/code example, I’m going to provide you with a piece of code to compress and decompress a file in VB.Net without using any additional libraries. Option Explicit On Option Strict On Imports System.IO Imports System.IO.Compression Namespace FileSystem Public Class Compressor ''' <summary> ''' This metho...

Read more

Comparing two images to see if they are the same

In this tutorial I’m going to show you how to compare two images to see whether they are the same or not using C#. /// <summary> /// This method deals with checking whether the two bitmaps that are passed to it are the same or not /// </summary> /// <param name="img1">The first image</param> /// <param name="img2">...

Read more

Tell if Microsoft Office Save As PDF add in is installed

In this VB.Net Tutorial/Code Example I’m going to show you how to check whether the Microsoft Office 2007 Save As PDF addin (available from here) is installed. Public Shared Function isPDFSaverInstalled() As Boolean Dim rtn As Boolean Dim key As RegistryKey = Registry.LocalMachine.OpenSubKey("SoftwareMicrosoftWindowsCurrentVersionUninst...

Read more

Is Excel installed and what version?

In this VB.Net Tutorial/Code Example, I’m going to provide you with a simple class that allows for you to check whether Excel is installed on the computer and also figure out which version of the Excel it is. The version function uses late binding. Imports Microsoft.Win32 Namespace MS.Office Public Class Excel Public Shared Functi...

Read more

Is Word installed and what version?

In this VB.Net Tutorial/Code Example, I’m going to provide you with a simple class that allows for you to check whether Word is installed on the computer and also figure out which version of the Word it is. The version function uses late binding. Imports Microsoft.Win32 Namespace MS.Office Public Class Word Public Shared Function ...

Read more

Is Access installed and what version?

In this VB.Net Tutorial/Code Example, I’m going to provide you with a simple class that allows for you to check whether Access is installed on the computer and also figure out which version of the Access it is. The version function uses late binding. Imports Microsoft.Win32 Namespace MS.Office Public Class Access Public Shared Fun...

Read more

Is Outlook installed and what version?

In this VB.Net Tutorial/Code Example, I’m going to provide you with a simple class that allows for you to check whether Outlook is installed on the computer and also figure out which version of the Outlook it is. {code}Imports Microsoft.Win32 Namespace MS.Office Public Class Outlook Public Shared Function isInstalled() As Boolean Dim regClasse...

Read more

Check if a VAT Number is valid

In this VB.Net Tutorial/Code Example, I’m going to show you how to check whether a VAT Number is valid or not. For this piece of code you will need to import “System.Text.RegularExpressions” Public Shared Function isValidVATNumber(ByVal theVATNumber As String) As Boolean Dim startChar As String = "^" Dim endChar As String = "$" Dim...

Read more