|
Interprocess communication using DDE (Dynamic Data Exchange) - Part1
|
Total Hit (16720) |
Microsoft Windows provides several methods for transferring data between applications. One method is to use the Dynamic Data Exchange (DDE) protocol. The DDE protocol is a set of messages and guidelines. It sends messages between applications that share data and uses shared memory to exchange data b
....Read More |
Rating
|
|
|
|
Retrive and set Auxiliary devices volume info.
|
Total Hit (3780) |
This code will loop through all Aux devices and set volume to 50%. You might have problem under NT/Win 2000 using auxXXXXXX APIs. Microsft recommands to use mixerXXXXX APIs. auxXXXXXX APIs are old school APIs. But for example purpose we have used auxXXXXXX APIs here.
«code LangId=1»Private Const
....Read More |
Rating
|
|
|
|
|
|
|
|
Replicate a complete COM+ catalog to another machine
|
Total Hit (1857) |
The Component Services MMC gives you an easy way to export and import COM+ applications. However, if you want to export the entire COM+ catalog to one or more systems on your LAN you can do it quickly with the COMREPL command-line utility, which you can find in the c:\windows\system32\com directory.
....Read More |
Rating
|
|
|
Determine the RecordCount of a forward-only Recordset
|
Total Hit (3177) |
When working with a forward-only, read-only Recordset - that is, the default ADO Recordset - the RecordCount property always returns -1. (This can also happen with other types of server-side cursors, depending on the specific OLEDB provider.) In general, you can determine how many records were retur
....Read More |
Rating
|
|
|
Implement Write-Once Read-Many Properties
|
Total Hit (4083) |
Creating a read-only property or a write-only property isn't difficult, as you probably know: just omit the Property Let (or Set, if dealing with objects) or the Property Get procedure, respectively.
There are cases, however, when you want to implement a write-only-read-many property, that is, a
....Read More |
Rating
|
|
|
Prevent an iconized window from being restored
|
Total Hit (1774) |
When the user clicks on an iconized (minimized) form in the taskbar, Windows sends that form a WM_QUERYOPEN message, and inspects the value returned to the operating system. If this value is zero, the operation is canceled.
Using subclassing you can therefore determine when a form is about to be
....Read More |
Rating
|
|
|
Bind a group of OptionButtons to a Data control
|
Total Hit (2897) |
You can't directly bind a group of OptionButton controls to a Data control, RDO Data control or ADO Data control. However, you can work around this limitation by adding an hidden TextBox control and add a few lines of code:
«Code LangId=1»
Private Sub optRadioButton_Click(Index As Integer)
....Read More |
Rating
|
|
|
Speed up searches with hash tables
|
Total Hit (3054) |
You probably know that there are basically two methods to search a value in an array: the brute force approach (i.e. linear searching) and the binary search. Both of them have disadvantages: when the array counts N items, linear searching requires N/2 comparisons on the average for successful search
....Read More |
Rating
|
|
|
Get the Default Printer
|
Total Hit (5618) |
API Declarations
«Code LangId=1»
Option Explicit
'MS Windows API Function Prototypes
Private Declare Function GetProfileString Lib "kernel32.dll" Alias "GetProfileStringA" (ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVa
....Read More |
Rating
|
|
|
How to move/resize window using API?
|
Total Hit (5108) |
«code LangId=1»Private Const SWP_SHOWWINDOW = &H40
Private Const SW_HIDE = 0
Private Const SW_RESTORE = 9
Private Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameter
....Read More |
Rating
|
|
|
|
How To Use ADO with Excel Data from Visual Basic or VBA
|
Total Hit (1093) |
This article discusses the use of ActiveX Data Objects (ADO) with Microsoft Excel spreadsheets as a data source. The article also highlights syntax issues and limitations specific to Excel. This article does not discuss OLAP or PivotTable technologies or other specialized uses of Excel data.
....Read More |
Rating
|
|
|
Five Tips for the Microsoft Office XP Web Components
|
Total Hit (1719) |
Discover how you can retain the original format of the numbers in a PivotTable component, determine which version of the Office Web Components you have, and more. This article provides the sample code that you can use in you own applications which use the Office XP Web components.
«b»Contents«/b»
....Read More |
Rating
|
|
|
Changing File and/or Folder Attributes Recursively
|
Total Hit (1417) |
The basic recursion techniques from Performing Recursive Searches Using FindFirst and SearchTreeForFile are used in this demo, but modified to include code for changing either the file, folders or both beneath the target directory specified. The code returns to the list all files processed, as well
....Read More |
Rating
|
|
|
|
How to Automatically Select (Track) a ListView Item
|
Total Hit (1440) |
By setting a ListView extended style bit using the API SendMessage with the message LVS_EX_TRACKSELECT, the ListView action changes. While a cursor is moving over the listview items, it is highlighted in coloured text (look at the line below the selection in the illustration.) If the cursor remains
....Read More |
Rating
|
|
|
|
Implementing Unsigned Right and Left Shift Operators
|
Total Hit (1313) |
When translating C code to VB, often you come across the Right Shift and Left Shift operators ( << and >> respectively ). There is no inbuilt support for Right and Left Shift in VB, so you have to code your own. One of the main problems with replacing these functions is that C code often uses them i
....Read More |
Rating
|
|
|
Text Box Balloon tip support in XP
|
Total Hit (970) |
This tip demonstrates how to to use the new Balloon Tip support provided for TextBoxes under XP. Cue Banners may also work, but only if you don't have multiple language support installed.
|
Rating
|
|
|
PopupMenu - Context Menu Demonstration
|
Total Hit (1463) |
All Windows controls provide a facility to show context menus when the user right clicks on the control through the WM_CONTEXTMENU message. VB doesn't provide a way to interact with this message however, so if you want to replace the default context menu on a TextBox, or to provide a custom context
....Read More |
Rating
|
|
|
Creating Shortcuts using VB
|
Total Hit (2280) |
This article expands on the cShellLink class provided to allow the shortcuts used in Window's Recent Document Collection to be investigated. It demonstrates how to use the class to read and write shortcuts, including choosing the icon, start up directory and more.
....Read More |
Rating
|
|
|
|
Internet Protocol Helper API (IP Helper API)
|
Total Hit (2468) |
We have launched new section of the website - IP Helper API. While the IP Helper API is designed for use by C/C++ programmers, it is possible to use this API in Visual Basic. In this section you will find out how to use some functions of that API. At this time there are two articles: "How to get all
....Read More |
Rating
|
|
|
Tutorial : Tracking FTP session state
|
Total Hit (2115) |
The CFtpClient class has a number of helper properties and events that allow us to find out what is going on inside the class and what data is transferred on the wire at any moment of the FTP session. Today we’ll examine two events of the class: OnStateChange and SessionProtocolMessage. We’ll modify
....Read More |
Rating
|
|