|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
How to read value from remote registry ?
|
Total Hit (3583) |
This article explains how to use a Visual Basic application to access the registry on a remote computer in conjunction with the Windows application programming interface (API).
«B»Requirements«/B»
You need the following hardware and software to perform the procedures in this article:
A Micro
....Read More |
Rating
|
|
|
|
Moving a Window Without a Titlebar
|
Total Hit (3411) |
«Code LangId=1»'Place this code in the declarations section of your form:
Option Explicit
Declare Function ReleaseCapture Lib "user32" () As Long
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As _
Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Lo
....Read More |
Rating
|
|
|
Centering a Window with a Taskbar Visual
|
Total Hit (3099) |
«Code LangId=1»Option Explicit
Private Const SPI_GETWORKAREA = 48
Private Declare Function SystemParametersInfo& Lib "User32" Alias _
"SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As _
Long, lpvParam As Any, ByVal fuWinIni As Long)
Private Type RECT
Left As Long
Top As Long
....Read More |
Rating
|
|
|
Changing Display Settings on the Fly
|
Total Hit (3827) |
«Code LangId=1»'Place this code in a Module:
'Place this code in a Module:
Option Explicit
Private Declare Function lstrcpy Lib "kernel32" Alias "lstrcpyA" (lpString1 As _
Any, lpString2 As Any) As Long
Const CCHDEVICENAME = 32
Const CCHFORMNAME = 32
Private Type DEVMODE
dmDevi
....Read More |
Rating
|
|
|
Flashing Form Caption
|
Total Hit (3004) |
«Code LangId=1»'Ever wanted to get the users attention without one of those annoying BEEPs, or just have a 'little fun? Here is a good way to do it. Flash the caption of your Form. That should get 'their attention!
'Place this code into a Module:
Option Explicit
Declare Function FlashWindow L
....Read More |
Rating
|
|
|
Keeping a Window On Top
|
Total Hit (3002) |
«Code LangId=1»'Place this into your Module:
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
Global Const SWP_NOMOVE = 2
Global Const SWP_NO
....Read More |
Rating
|
|
|
LOG Files
|
Total Hit (2682) |
«Code LangId=1»'Just place this in a Module and you can call it from anywhere in your program!
Sub SetLog(Message As String)
'This Sub writes to a LOG file.
Dim theFile As String, theMessage As String
theFile = App.Path & "\PRGMLOG.TXT"
theMessage = Message & vbCrLf
Open theFile For Append A
....Read More |
Rating
|
|
|
Right Click PopUp Menu
|
Total Hit (1531) |
«Code LangId=1»'First, create a menu using menueditor. Add all of your menu items as if you were just making
'a regular menu. Now set the VISIBLE property of the main menu item to false (see below, set
'the MNUEDIT item's VISIBLE to false). Like this:
'mnuEdit
'---mnuUndo
'---mnuRedo
'---m
....Read More |
Rating
|
|
|
|