|
|
How to Add/Remove NT group programatically
|
Total Hit (4034) |
This article will show you use of NetGroupAdd and NetGroupDel API to add/remove NT user group.
Windows NT and Windows 2000 exposes LanMan 32-bit Application Programming Interfaces (APIs) to provide network services. These APIs are called only from 32-bit programs running on a Windows NT or Window
....Read More |
Rating
|
|
|
|
Handling NTFS Permissions Part-2 (handling user object permissions)
|
Total Hit (11217) |
The Win32 Application Programming Interface (API) provides two sets of APIs for working with security descriptors and access control lists (ACLs): low-level and high-level. This series of articles provide a complete set of Microsoft Visual Basic code samples that use low-level access control APIs to
....Read More |
Rating
|
|
|
|
|
|
|
|
|
|
|
|
NormRand - Produce random numbers with normal distribution
|
Total Hit (2306) |
«Code LangId=1»' VBA's intrinsic Rnd function returns numbers evenly
' distributed between 0 and 1. Each number in that
' interval has equal probability of being returned
' for any given function call.
' This function NormRand returns a random number between
' -infinity and +infinity distib
....Read More |
Rating
|
|
|
Combine Default attribute with other attributes
|
Total Hit (3246) |
When building an ActiveX control, you can set a default property or method using the Procedure Attributes dialog box, after clicking on the Advanced button. However, if your default property also happens to require another special attribute - as is the case with Caption and Text properties-you're in
....Read More |
Rating
|
|
|
Determine the optimal width for ListView columns
|
Total Hit (2963) |
Here's a simple but effective trick to ensure that the column of a ListView control is wide enough to display the entire string you're assigning to the column title or to an element. Just drop a Label on the form, set its Autosize property to True and Visible property to False. Also, ensure that the
....Read More |
Rating
|
|
|
Get full control on the text typed in a TreeView's node
|
Total Hit (3697) |
The TreeView control exposes the AfterLabelEdit event to let the programmer validate the text entered in a Node, but there is no way to trap keys as they are typed by the user. This prevents you from discarding unwanted characters while the user types them.
You can work around this problem by sub
....Read More |
Rating
|
|
|
Detect whether a field on a form has been edited
|
Total Hit (1958) |
Many tip & trick collections report that you can learn if the contents of a text box has been modified by sending a EM_GETMODIFY message to the control. Actually, getting this information is much more simple. Just test the DataChange property: if non zero the field has been modified since the form w
....Read More |
Rating
|
|
|
Search multiple substrings with the RegExp object
|
Total Hit (3720) |
The RegExp object in the Microsoft VBScript Regular Expression type library supports regular expression patterns containing the | (or) operator, which lets you search for multiple substrings at the same time. For example, the following piece of code lets you search for a month name in a source text:
....Read More |
Rating
|
|
|
Simplify your code with Inc and Dec functions
|
Total Hit (3405) |
Unlike other languages - such as C and Delphi - VB lacks of the capability to increment and decrement a variable. Adding this feature, in the form of reusable Function routines, is simple:
«Code LangId=1»
Function Inc(Value As Variant, Optional Increment As Variant = 1) As Variant
Value = V
....Read More |
Rating
|
|
|
How to run an AVI inside a PictureBox control
|
Total Hit (3506) |
API Declarations
«Code LangId=1» Const WS_CHILD = &H40000000
Private Declare Function mciSendString Lib "winmm.dll" Alias _
"mciSendStringA" (ByVal lpstrCommand As String, _
ByVal lpstrReturnString As String, ByVal uReturnLength As Long, _
ByVal hwndCallback As Long) As Lon
....Read More |
Rating
|
|
|
Protect the form unloading in accidently
|
Total Hit (1450) |
When you want ot protect the form unload in accidently you can use this following code.
In this code, the action is When a form is prepared to
unload The unload event was automatically raised.
on that event there is an parameter named "Cancel" which in the data type integer.
When the unload ev
....Read More |
Rating
|
|
|
How to Subclass a Form
|
Total Hit (3644) |
«Code LangId=1»'==============inside a MODULE
Option Explicit
'************************************************************
'API
'************************************************************
Private Declare Function CallWindowProc Lib "user32.dll" Alias "CallWindowProcA" ( _
ByVal lpPrev
....Read More |
Rating
|
|
|
Your First TAPI Program
|
Total Hit (2630) |
This sample application shows you how you can use the TAPI 3.0 functions to create a TAPI application of your own. This application uses the Windows Phone Dialer utility that comes with Windows and can be found under the Accessories group. That program will act as the call manager and will handle th
....Read More |
Rating
|
|
|
HOWTO: Use the Spreadsheet Web Component with Visual Basic
|
Total Hit (2233) |
You can add the Office Web Components to a form in Visual Basic in the same way that you add any other ActiveX control. The Spreadsheet control included with the Office Web Components is a more robust option than the DataGrid control that ships with Visual Basic. Use the spreadsheet data to display
....Read More |
Rating
|
|
|
Determining a ListView's Visible Item Count
|
Total Hit (1618) |
This shows a quick call you can add to any ListView code to determine the number of currently-visible ListItems in the control when in Report mode. By calling SendMessage with the LVM_GETCOUNTPERPAGE message, the call returns the number of items that can be completely contained in the visible area o
....Read More |
Rating
|
|
|
Brightness and Contrast
|
Total Hit (1669) |
This article demonstrates how to apply two of the simplest image processsing filters, brightness and contrast, to an image.
|
Rating
|
|
|
Displaying Alpha (32bit) Icons with ImageLists
|
Total Hit (1890) |
Version 6 of ComCtl32.DLL (shipped with Windows XP) supports icons with alpha channels. This article describes how you can use icons with alpha channels with the vbAccelerator Image Lists.
|
Rating
|
|
|
XML Property Bag
|
Total Hit (1392) |
This ActiveX DLL is derived from an excellent original XML PropertyBag sample by Aaron Anderson (Aaron.Anderson@mail.farmcreditbank.com). It allows you to persist and recreate your own objects directly to XML based-files using a simple interface closely related to VB's PropertyBag object. By impleme
....Read More |
Rating
|
|
|
Using RC.EXE
|
Total Hit (1550) |
This article provides a short look at how to use the Resource Compiler (RC.EXE) to create resource files (.RES) for Visual Basic applications. Using RC.EXE directly is often better than using the wizards provided with VB5 and 6 as you have more control over including arbitrary data; in addition the
....Read More |
Rating
|
|