Author Archives: Andrew

How to minimize a window by passing the process name

The VB.Net code posted on this page minimizes the window for the given process name. Module modMain #Region “Declarations for Minimizing Windows” Private Declare Function ShowWindow Lib “user32.dll” (ByVal hWnd As IntPtr, ByVal nCmdShow As SHOW_WINDOW) As Boolean Private Enum … Continue reading

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

How to convert RGB Color to HTML color code

The following VB.Net code convert RGB color code to equivalent HTML color code. Module modMain Sub Main() ‘How to call this function: Console.WriteLine(ConvertRGBToHTMLColor(255, 2, 2)) Console.Read() End Sub Public Function ConvertRGBToHTMLColor(ByVal iRedColor As Integer, ByVal iGreenColor As Integer, ByVal iBlueColor … Continue reading

Posted in VB.Net | Tagged convert rgb to html, How to, How to convert RGB Color to HTML color code, html color code, rgb color code | 1 Comment

How to check for previous instances in .Net?

There are some instances you may want to disallow the user to launch your program if it is already running. There are few ways to check whether the previous instance of your application is already running. Here is one of … Continue reading

Posted in C#.Net, VB.Net | Tagged c#.net .Net, How to, How to check previous instance, previous instance, VB.Net, vb.net code | Leave a comment

How to check whether a file exists in FTP server

Here is the a VB.Net source code which will check whether a file is exists in FTP server. Instructions: Open a New Console application Add a new bas module called Module1 Copy the following code to Mod1 bas module Imports … Continue reading

Posted in VB.Net | Tagged check ftp file exists, file exists, ftp, IsFileExists | Leave a comment

How to Center a form in run time in .Net?

The built-in StartupPosition property will set the form to center of the screen when the form is loaded. Let’s say the user of your application moves the form and want it back to center of the screen again. The following … Continue reading

Posted in VB.Net | Tagged .Net, How to, How to Center a form, run time, vb.net code | Leave a comment