Posts

Showing posts from June, 2014

How to Minimize/Send an App Icon to System Tray in Visual Basic 6

The following code snippet allows to manipulate the system tray by adding your apps icon when you minimize the form and restore when you double click on the app's icon on the system tray area. Option Explicit Public Type NOTIFYICONDATA cbSize As Long hWnd As Long uId As Long uFlags As Long uCallBackMessage As Long hIcon As Long szTip As String * 64 End Type Public Const NIM_ADD = &H0 Public Const NIM_MODIFY = &H1 Public Const NIM_DELETE = &H2 Public Const WM_MOUSEMOVE = &H200 Public Const NIF_MESSAGE = &H1 Public Const NIF_ICON = &H2 Public Const NIF_TIP = &H4 Public Const WM_LBUTTONDBLCLK = &H203 'Double-click Public Const WM_LBUTTONDOWN = &H201 'Button down Public Const WM_LBUTTONUP = &H202 'Button up Public Const WM_RBUTTONDBLCLK = &H206 'Double-click Public Const WM_RBUTTONDOWN = &H204 'Button down Public Const WM_RBUTTONUP = &H205 'Button up Public Declare Function Shel

How to Set Windows Form Always on Top of Other Applications in VB6

The following code snippets allows to set Windows Form Always on Top of Other applications in Visual Basic 6.0. Public Const SWP_NOMOVE = 2 Public Const SWP_NOSIZE = 1 Public Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE Public Const HWND_TOPMOST = -1 Public Const HWND_NOTOPMOST = -2 Declare Function SetWindowPos Lib "user32" _ (ByVal hWnd As Long, _ ByVal hWndInsertAfter As Long, _ ByVal x As Long, _ ByVal y As Long, _ ByVal cx As Long, _ ByVal cy As Long, _ ByVal wFlags As Long) As Long The following SetTopMostWindow() function takes two parameters as follows:       hWnd : the window handle       Topmost : It is either True to set the on top or False if Not. Public Function SetTopMostWindow(hWnd As Long, Topmost As Boolean) As Long If Topmost = True Then 'Make the window topmost SetTopMostWindow = SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS) Else SetTopMostWindow = SetWindowPos(hWnd, HWND_NOTOPM

How to Make Windows Form Transparent using Visual Basic 6/VB6

The following code snippets allows you to make windows form transparent using VB6. In a standard module, copy and paste the following declarations and function. [ Module1.bas ] Option Explicit Const LWA_COLORKEY = 1 Const LWA_ALPHA = 2 Const LWA_BOTH = 3 Const WS_EX_LAYERED = &H80000 Const GWL_EXSTYLE = -20 Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal color As Long, ByVal x As Byte, ByVal alpha As Long) As Boolean Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAP

Internet Connection Speed Booster

Image
Internet Speed Booster is a simple tool that can be used to reset internet connection, flush DNS resolver cache, and renew dynamic IP addresses. This tool allows online and massive gamers to feel like a boss in the games arena. This tool primarily solves the problem if you're having limited connectivity or frequent disconnection from the internet. Internet Speed Booster is just right for you for FREE. Internet Speed Booster is available for free download .

How to Get the Count of Filtered Sets of Data Rows in Excel using VBA

Image
The following function below allows you to get the number of visible rows from a filtered sets of rows in Excel using VBA. The function takes two arguments which is the Column and StartRow. Calling the FilterCount() function returns the number of visible rows. Also added an error handler which process the error description to determine if there's a visible row. Parameters: Column : The column of the data to be filtered. If you have multiple columns being filtered you can just set the first Column or any column in the dataset.         StartRow : Start row of the data to be filtered. Function FilterCount(ByVal Column As String, ByVal StartRow As Long) As Long     On Error GoTo errHandler       FilterCount = Application.WorksheetFunction.CountA(ActiveSheet.Range(Column & StartRow, Cells(ActiveSheet.UsedRange.Rows.Count, Range(Column & StartRow).Column)).SpecialCells(xlCellTypeVisible))     'Debug.Print FilterCount   Exit Function errHandler:     If Err.D