|
How to get information of all installed IP's on current system.
|
Total Hit (3501) |
This article will show you how to get all installed IP addresses and subnet mask on your system.
To implement quick demo perform the following steps
- Create a standard exe project
- Add a module
- Add 1 command button and 1 text box with MultiLine=True
Place the following code in Form1 d
....Read More |
Rating
|
|
|
How to disable word wrap in RichTextBox control
|
Total Hit (2995) |
By default rich textbox control wrap a long line. Sometimes we want to disable this inbuilt feature then here is some trick.
set RightMargin property to an arbitary high value which will not wrap your long line.
Happy Programming....
|
Rating
|
|
|
|
|
|
|
|
SaveImageList - Save the images in an ImageList control
|
Total Hit (3902) |
«Code LangId=1»
' Save all the images in an ImageList control to a disk file
' Images can be later loaded in the same ImageList control using the
' LoadImageList routine
'
' Note 1: if the file exists, it is overwritten
' Note 2: this routine always save the contents of the ListImages collecti
....Read More |
Rating
|
|
|
WindowsDirectory - The path of the Windows directory
|
Total Hit (1994) |
«Code LangId=1»Private Declare Function GetWindowsDirectory Lib "kernel32" Alias _
"GetWindowsDirectoryA" (ByVal lpBuffer As String, _
ByVal nSize As Long) As Long
' Return the path of the Windows directory
Function WindowsDirectory() As String
Dim buffer As String * 512, lengt
....Read More |
Rating
|
|
|
|
|
Show the contents of the Recycle Bin folder
|
Total Hit (2014) |
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
|
|
|
Create a better InStr function with VBScript regular expressions
|
Total Hit (15302) |
Regular expressions offer an extremely powerful way to search and replace text inside a string using sophisticated search criteria, far behind the capabilities of VB's InStr and Replace functions. For example, you can search for whole words, or find a match with a range of characters (for example, a
....Read More |
Rating
|
|
|
|
Don't test auto-instancing variables using Is Nothing
|
Total Hit (2995) |
You can't reliably test an auto-instancing object variable using the Is Nothing test, because as soon as you reference the variable Visual Basic silently creates an object of the given class, and the test always returns False:
«Code LangId=1»
Dim x As New MyClass
If x Is Nothing Then
' this
....Read More |
Rating
|
|
|
Create TextBox with dithered background
|
Total Hit (2149) |
If your video display has 256 colors or less and you assign a dithered color to the BackColor property of a TextBox control, you'll find that the background color under the text inside the TextBox is displayed in a different (solid) color.
To work around this issue, you must trap the WM_CTLCOLOR
....Read More |
Rating
|
|
|
Benchmarks with millisecond accuracy
|
Total Hit (3883) |
The Timer function returns a value which is only accurate to about 55 milliseconds, therefore it is not very useful for doing accurate benchmarks. If you need a better resolution you may try out this function:
|
Rating
|
|
|
Creating an API Window (Using C Style Message Loop and Window Proc)
|
Total Hit (11171) |
Sometimes you might need to create a window using code on the fly. Many times I have been asked that why do I write this odd code to create a very simple form,I can use VB form instead of Dynamic C style window creation....
Now here is the answer
One common use of this technique in socket pro
....Read More |
Rating
|
|
|
Using GetPath and PolyDraw API to extract and draw path segments.
|
Total Hit (5617) |
GDI Paths are different than most of GDI objects. Path doesn't have handle but they always bound to device context. Path can be generated by calling BeginPath and EndPath API. Here the example how path can be generated.
«code LangId=1»BeginPath(Me.hDc)
'//....
'//Draw Lines
'//Draw Polygon
'/
....Read More |
Rating
|
|
|
|
Working with Bitmap and DIB
|
Total Hit (16058) |
In this article we will learn basic concept to work with Bitmap and DIB. We will wrap all functionality in a handy class which can give you ability to work with 2D Pixel array of Bitmap loaded into the memory.
Before we implement DIB and BMP class lets understand BMP file format which is DIB (Dev
....Read More |
Rating
|
|
|
279815 - How To Validate User Credentials from Visual Basic by ...
|
Total Hit (3034) |
A user's credentials are made up of his or her user name and password, which can be used to validate the user on a given Microsoft Windows NT, Microsoft Windows 2000, or Microsoft Windows XP domain. This article demonstrates how to call the Security Support Provider Interface (SSPI) functions from M
....Read More |
Rating
|
|
|
Tutorial - TreeView Control Introduction
|
Total Hit (1854) |
The Tree View control is a Visual Basic version of the control you see used in many programs, including Explorer and FrontPage, used to list the folders on your hard disk. This control allows you to add nodes to a tree, each of which can have sub items. Below is an image of the Tree View control in
....Read More |
Rating
|
|
|
|
Read the NumLock and CapsLock key states
|
Total Hit (2124) |
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
|
|
|
Reading EXIF and Other Image Properties Using GDI+
|
Total Hit (1334) |
Many digital cameras record information about when and how a picture was taken using the EXIF format (which is slowly becoming the DCF format under ISO). You can read and write this information using GDI+; not just that but you can also read the image metadata from TIF and PNG files.
....Read More |
Rating
|
|
|
StringBuilder Class for VB
|
Total Hit (1866) |
If you need to build a string by adding lots of pieces together, VB's string handling is slow because a new string is created in memory every time a new piece is added. This article presents a class which allocates a string chunk and then uses memory copy methods to manipulate the data within the sa
....Read More |
Rating
|
|
|
Compositing Operations
|
Total Hit (2151) |
There are various ways of combining two images together, particularly when either or both of the two images contain alpha channels. As the real-time video-effects industry has developed, twelve standard compositing techniques, know as the Porter-Duff Compositing Operations, have emerged. In addition
....Read More |
Rating
|
|
|
Forcing Any Window to Show in the Taskbar
|
Total Hit (2028) |
VB provides a ShowInTaskBar property for forms which is meant to set whether a form is shown in the Alt-Tab sequence and the shell's task bar. However there are two limitations to this:
The property can't be set at run-time.
Erm, it doesn't work anyway.
Ok, it can work, but only when your form
....Read More |
Rating
|
|
|