|
Open MS-DOS prompt from any directory in Explorer
|
Total Hit (2625) |
By adding a couple Registry keys you can add a commond to the context menu that appear when you right-click a directory when inside Windows Explorer. The new command lets you open the MS-DOS prompt and navigate to that directory with just one mouse click:
«Code LangId=1»
---------------------
....Read More |
Rating
|
|
|
Open Windows's Start menu
|
Total Hit (2043) |
By simulating the pressing of the "Windows" menu - or better yet, of the Ctrl-Escape key combination, which also works on older keyboards - you can programmatically bring up the Start menu. You can't use the SendKeys function to do so, though, and you have to resort to the keybd_event API function:
....Read More |
Rating
|
|
|
Provide a free preview of Office Documents
|
Total Hit (1659) |
NOTE that this tip requires Windows 98, Windows 2000, Windows 95/NT 4.0 + Active Desktop. If your application must do a lot of work with Office documents, then chances are that you might need to provide a quick preview of them. I'm not talking about scrolling pages up and down as in Word or Excel bu
....Read More |
Rating
|
|
|
Retrieve CPU information the simple way (NT/2000 only)
|
Total Hit (1532) |
The Windows API includes all the functions you need to retrieve and display information about the CPU the machine is equipped with. However, if you're running under Windows NT or Windows 2000, you don't need to make complicated API calls, because this information is already available in several envi
....Read More |
Rating
|
|
|
Return a Dos error code on exit
|
Total Hit (2167) |
At times you may want to return a Dos ErrorLevel when closing your VB application. This can be necessary, for example, if the EXE is meant to be called from a batch file. Exiting the program with an error code is really simple, and requires only a call to the ExitProcess API function:
«Code Lang
....Read More |
Rating
|
|
|
Show the contents of the Recycle Bin folder
|
Total Hit (1948) |
You can use the ShellExecute API function to programmatically open a window of Explorer and display the contents of the Recycle Bin. This is the function's declare:
«Code LangId=1»
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpO
....Read More |
Rating
|
|
|
Track changes in system time and display resolution
|
Total Hit (3430) |
Whenever the system time or the display resolution changes, Windows sends all the top-level windows (forms, in VB jargon) the WM_TIMECHANGE or WM_DISPLAYCHANGE message, respectively. Therefore, you can easily determine when these system-wide settings change by subclassing any form in your applicatio
....Read More |
Rating
|
|
|
Undocumented dialog box to change screen saver's password
|
Total Hit (2006) |
When you write a screen saver in C and SDK you can use a static library (SCRNSAVE.LIB) that allows you to create custom dialogs to change and request the password. In VB you can't access this library, but if you don't want to create your forms to replace the custom dialogs, you can use a couple of u
....Read More |
Rating
|
|
|
Wait for the termination of a program using Windows Scripting Host
|
Total Hit (2708) |
If you want to execute an application and waiting for its termination, you can follow two approaches. The "classic" approach is based on API functions such as OpenProcess, WaitForSingleObject and CloseHandle. However, there is a simpler technique based on the Windows Scripting Host object model.
....Read More |
Rating
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|