Tag Archives: VB.Net

How to Check whether the application is running in IDE or as EXE

In our Windows Application, some times we may need to check whether our application is running in IDE or is running as EXE. A typical example would be, we might use Development Server while working in development/debug mode. Once the … Continue reading

Posted in VB.Net | Tagged application running in IDE, c#.net .Net, How to, How to check application running, VB.Net, vb.net code | Leave a comment

How to properly terminate the application by passing the process name

We should not directly kill the process. We should properly close the main window of the application using CloseMainWindow(). Here is the proper way of terminating the application in VB.Net. The code below will request the application to close properly … Continue reading

Posted in System & API, VB.Net | Tagged c#.net .Net, How to, How to terminate application, proper way of terminating the application, terminate application, VB.Net, vb.net code | Leave a comment

How to get the active Window Title by passing the process name

Here is the VB.Net code which will help you to get the active Window title for the given process name: Module modMain Sub Main() ‘How to call this function: Console.WriteLine(GetWindowTitleNameByProcessName(“firefox”)) ‘This will return the current title of firefox application End … Continue reading

Posted in VB.Net | Tagged c#.net .Net, How to, How to get window titile, VB.Net, vb.net code, window title | Leave a comment

How to get list of installed software names and its locations

The following VB.Net code grabs list of all installed software and its installed location from your PC. Imports Microsoft.Win32 Module modMain Sub Main() Dim InstalledSoftwareKey As String = “SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products” Using RegKey As RegistryKey = Registry.LocalMachine.OpenSubKey(InstalledSoftwareKey) For Each iKey In RegKey.GetSubKeyNames() … Continue reading

Posted in VB.Net | Tagged c#.net .Net, get list of installed programs, grab list of installed software, How to, How to get list of installed software, VB.Net, vb.net code | Leave a comment

How to compare two Array lists

The following VB.Net code compares two ArrayLists and returns an ArrayList containing the non-matching items. VB.Net Code: Module modMain Function CompareArrays(ByVal FistArray As ArrayList, ByVal SecondArray As ArrayList) As ArrayList Dim ResultArray As New ArrayList Dim sItem As String For … Continue reading

Posted in VB.Net | Tagged array lists, arraylist, c#.net .Net, compare array lists, How to, How to compare arraylists, VB.Net, vb.net code | 1 Comment