|
|
Forcing a local or remote NT system to reboot
|
Total Hit (2814) |
Under Windows NT, you can force a timed system shutdown on either the local machine or a remote network machine. This code tip shows how to do it. You can specifiy how long it will be before the machine will be shutdown in seconds (a zero value shuts down immediately), how remorseless the shutdown p
....Read More |
Rating
|
|
|
Start a document based on its filename
|
Total Hit (1207) |
Starting any document file based on its file name only is very simple in Windows using the ShellExecute function. This tip shows how simple it is - you only really need one declare and one line of code!
|
Rating
|
|
|
Restrict Mouse Movement to an Area of the Desktop
|
Total Hit (1971) |
This tip shows you how to ensure a cursor remains within a certain rectangle on the screen. Note that if the user uses Alt-Tab to switch to another application, the clipping cursor is cleared.
|
Rating
|
|
|
Read the NumLock and CapsLock key states
|
Total Hit (2073) |
This sample demonstrates how to determine the state of the NumLock and CapsLock key (plus any other key on the keyboard at the same time).
|
Rating
|
|
|
Read A Custom Clipboard Format
|
Total Hit (2649) |
VB limits you to getting information in just the standard clipboard formats. However, a number of applications paste information in other formats, for example Rich Text Format, HTML format and so forth. This tip shows you how to read the data for a custom format from the clipboard as a string.
....Read More |
Rating
|
|
|
|
Force an area of a Window to Repaint
|
Total Hit (2161) |
This sample shows how to force an area of a window to repaint. Sometimes this is necessary, particularly when you're experimenting with owner draw control techniques, or when using the LockWindowUpdate API call to improve the speed at which a control fills with data.
....Read More |
Rating
|
|
|
Change the drop-down width of a Combo Box
|
Total Hit (1974) |
This tip shows you how to get and set the width of the drop down portion of a combo box. It also includes code to automatically set the drop down width based on the contents of a combo box by measuring the size of the text in each combo box item.
|
Rating
|
|
|
Get System Display Fonts and Non-Client Area Sizes
|
Total Hit (2605) |
The Non-Client area of a window is defined as the area you don't draw on; i.e. the window border, caption, menu bar and scroll bars. Whilst it is easy to get the colours that Windows uses to display these items (the VB enumeration SystemColorConstants supplies all the OLE_COLOR versions of these col
....Read More |
Rating
|
|
|
Using PSAPI to get a complete task list and memory usage.
|
Total Hit (3872) |
PSAPI.DLL is a DLL provided for NT/2000/XP systems which greatly simplifies the job of getting task list and memory usage information. The information is also available in the dyamic data section of the registry, but the format is fairly obstructive and it is a considerable task to extract it progra
....Read More |
Rating
|
|
|
Show and Hide a Form's Titlebar at run-time
|
Total Hit (2300) |
This tip shows you how to show and hide the title bar of a window at run-time. To make a window's title bar disappear, you have to remove the control box, the maximise box and the minimise box as well as set the caption of the form to blank. Unfortunately, VB's ControlBox, MinButton and MaxButton pr
....Read More |
Rating
|
|
|
|
|
How to Shutdown the System in Windows 9x and NT
|
Total Hit (2791) |
This tip demonstrates how to shutdown, logoff and/or reboot a system. Shutting down a Windows 9x system is very straightforward - just one API call to ExitWindowsEx is all that is required. However, under NT it is a little more tricky. By default, no application processes under Windows NT have the p
....Read More |
Rating
|
|
|
Get an RGB Colour from an OLE_COLOR
|
Total Hit (1519) |
Sometimes you need to know the Red, Green and Blue values of a Visual Basic/COM OLE_COLOR, particularly if you are going to use the colour in an API function. This tip shows you how to correctly convert an OLE_COLOR type to a RGB value using the OleTranslateColor API call exposed by OLEPRO32.DLL. It
....Read More |
Rating
|
|
|
|
Tutorial : Using DLLs and The Windows API
|
Total Hit (2314) |
Windows provides a number of function calls, in the form of DLLs, that are useful to VB programmers. You can also co-opt DLLs from other programs to do work for you. We'll concentrate on using the Windows DLLs here, but what we learn is widely applicable
....Read More |
Rating
|
|
|
Creating and using your own VC++ dlls
|
Total Hit (953) |
Using the Windows API is a wonderful way to speed up your applications when they need to perform processor intensive tasks like graphics manipulation. However, the Windows API doesn’t always provide all the functionality you need for your application. Perhaps some 3rd party control does what you wan
....Read More |
Rating
|
|
|
Tutorial : Drawing & Animation
|
Total Hit (1485) |
These tutorials are were originally developed as part of a VB Game Programming for beginners book Soren and I were working on. For a variety of reasons the book idea never came to fruition and so we decided to post the material that is finished as a series of tutorials in the hopes that you would fi
....Read More |
Rating
|
|
|
Tutorial : Sound & Games
|
Total Hit (1639) |
These tutorials are were originally developed as part of a VB Game Programming for beginners book Soren and I were working on. For a variety of reasons the book idea never came to fruition and so we decided to post the material that is finished as a series of tutorials in the hopes that you would fi
....Read More |
Rating
|
|
|
Using the Joystick, Mouse and Keyboard
|
Total Hit (2098) |
So far we have learned how to move, animate and do some other stuff to sprites. We have also looked into the area of sound playback in games. This is all very nice if you want to create a game with no human interaction. Since this is most likely not the kind of game you want to make, then you need t
....Read More |
Rating
|
|
|
Get Disk Information for any Machine In the selected Domain
|
Total Hit (1070) |
This is a project that enumerates drive details on remote NT systems, but is not limited by GetDriveSpace's 2.0 GB limit. It uses GetDriveSpaceEx and the Currency Data Type (multiplied by 10000) to accurately return large drive sizes. It enumerates all NT workstations and servers and propagates a se
....Read More |
Rating
|
|
|
Enumrate Local or Remote Disks
|
Total Hit (1657) |
VB example of using the NetServerDiskEnum API call from within VB. It returns a list of disk drives on a machine (local or remote).
Author: Michael S. Jones
|
Rating
|
|
|
|
GetLastErr
|
Total Hit (942) |
This code snippet returns any error codes from net related functions and system related functions.
Author: Elvio Serrao
|
Rating
|
|
|
|
|
|