|
How To Call CLSID And ProgID Related COM APIs in Visual Basic
|
Total Hit (5735) |
This article demonstrates how to use a set of related Component Object Model (COM) APIs that retrieve and manipulate CLSIDs and ProgIDs. The following APIs are discussed:
«UL»«LI»CLSIDFromProgID: To retrieve the CLSID of a COM object with a given ProgID.
«LI»StringFromCLSID: To convert a CLSID s
....Read More |
Rating
|
|
|
|
|
Transparent form (glass effect)
|
Total Hit (2569) |
This example will show you how to create a transparent form.
«b»Step-By-step example«/b»
- Create a standard exe project
- Add the following code in form1
«code LangId=1»Option Explicit
Private Declare Function CreateRectRgn Lib "gdi32" ( _
ByVal X1 As Long, ByVal Y1 As Long, ByVal
....Read More |
Rating
|
|
|
How to create pattern brush from bitmap or picture object ?
|
Total Hit (6606) |
In this article we will learn how to use CreatePatternBrush along with CreateBitmap API. CreateBitmap can be used to create a memory bitmap of specified width, height and Bits/Pixel. CreatePatternBrush can create a pattern brush based of Bitmap. You can also use VB Picture object as a bitmap handle.
....Read More |
Rating
|
|
|
How to resize window accurately to get desired client area ?
|
Total Hit (7629) |
Sometimes you might get unexpected window size when you resize or assign different height or width. To resize or change window height/width accurately based on required client area you can use AdjustWindowRect or AdjustWindowRectEx api. You can pass required client area as a RECT parameter to Adjus
....Read More |
Rating
|
|
|
|
Retrive and set Auxiliary devices volume info.
|
Total Hit (3774) |
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
|
|
|
How to create XP-Style Balloon Tooltip in VB.net (Updated)
|
Total Hit (36794) |
Using api you can create ballon style tooltip. You can also set various parameters for tooltip i.e. Delay, Visible Time, Style, Title, Description , Font, TextColor, BackColor etc...
Note: If tooltip is OnDemand ToolTip then VisibleTime and Delay Properties have no effect. To set VisibleTime and
....Read More |
Rating
|
|
|
Working with AVI Files - Part 3 (Working With Frames, AVI to BMP)
|
Total Hit (25888) |
In my previous 2 articles «a href='CodeDetail.aspx?CodeId=3612'»«b»Part-1 (Opening and Closing AVI file)«/b»«/a» and «a href='CodeDetail.aspx?CodeId=3613'»«b»Part-2 (Working with AVI Streams)«/b»«/a» you learned that how to open and close AVI file and Stream we also learned how to get basic informat
....Read More |
Rating
|
|
|
|
How to load BMP file into memory and perform rotation on it ?
|
Total Hit (8965) |
Bitmap rotation is a graphic effect that Visual Basic does not natively offer. This article shows how to rotate a given image in 90-degree increments. It allows you to rotate any image 0, 90, 180 or 270 degrees. With a little work, the code can be modified to rotate to any angle, but that is beyond
....Read More |
Rating
|
|
|
How to set default printer programatically on Win 9x/NT ?
|
Total Hit (4508) |
This article shows how to programmatically set which printer is the system default printer. Not all applications or components can select a specific printer to use. This often makes it necessary to change the default printer for the system so that the application or component will use the desired pr
....Read More |
Rating
|
|
|
Get CPU name using low level machine instructions (Assembly!) in VB!
|
Total Hit (4107) |
Here is the most advanced technique probably you have ever seen in VB. Haven't you been told by the "experts" that you can't do low level programming stuff in VB which you can do in C/C++/ASM ? But here I shall prove them wrong. This little code will demonstrate how to execute low level Machine inst
....Read More |
Rating
|
|
|
|
FillFlexGrid - Routine to fill flexgrid from ADO recordset
|
Total Hit (3673) |
The following routine takes 2 arguments, ADO recordset and flexgrid which you want to fill.
«code LangId=1»
Sub FillFlexgrid(rst As ADODB.Recordset, msfGrid As MSFlexGrid)
Dim cln As Field
With msfGrid
.Rows = 2
.Cols = rst.Fields.Count
'get the number of gri
....Read More |
Rating
|
|
|
Optimize Parametrized Queries With ADO Objects
|
Total Hit (3135) |
When you write Insert statements, it can be difficult to accommodate the possible values end users might enter into a textbox. The most common task is replacing single quotes with double quotes. However, parameterized queries provide two benefits: You do not have to parse data entered by users—excep
....Read More |
Rating
|
|
|
|
Load, Modify and Save 1, 4, 8, 15 (Bit-fields), 16, 24 and 32-bit Bitmaps using GDI Apis.
|
Total Hit (5164) |
This sample code will show you how to load 1, 4, 8, 15 (Bit-fields), 16, 24 and 32-bit images from disk and modify them into memory and save back to disk.
Just copy/paste the following code into form1 code window. Before you run this example make sure that you modify the ImgPath and SavePath.
....Read More |
Rating
|
|
|
Dynamically Add Controls to a Form with Visual Basic 6.0
|
Total Hit (29615) |
Visual Basic 6.0 allows you to dynamically add control to a form at run- time using the new Add method of the Controls collection. This article shows how to dynamically add intrinsic and ActiveX controls.
«pre»«b»Control«/b» «b»ProgID«/b»
==========================================
CheckB
....Read More |
Rating
|
|
|
Dream Night Part-1
|
Total Hit (1953) |
«BR»«P Align=center»«img src='/Main/Articles/Lang8/Cat254/Code3683/image3683_1.JPG'/»«/P»«BR»
«BR»«P Align=center»«img src='/Main/Articles/Lang8/Cat254/Code3683/image3683_2.JPG'/»«/P»«BR»
«BR»«P Align=center»«img src='/Main/Articles/Lang8/Cat254/Code3683/image3683_3.JPG'/»«/P»«BR»
«BR»«P Align=ce
....Read More |
Rating
|
|
|
Chattanooga trip with masi Part-1
|
Total Hit (2143) |
«BR»«P Align=center»«img src='/Main/Articles/Lang8/Cat254/Code3684/image3684_1.JPG'/»«/P»«BR»
«BR»«P Align=center»«img src='/Main/Articles/Lang8/Cat254/Code3684/image3684_2.JPG'/»«/P»«BR»
«BR»«P Align=center»«img src='/Main/Articles/Lang8/Cat254/Code3684/image3684_3.JPG'/»«/P»«BR»
«BR»«P Align=ce
....Read More |
Rating
|
|
|
Working with Bitmap and DIB
|
Total Hit (16024) |
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
|
|
|
|
How to use BeginPath and EndPath to fill open shapes.
|
Total Hit (4471) |
Have you ever tried to fill shapes which are drawn by Polyline or PolyBezier which doesn't draw closed figures. The problem is its not closed figure so you cannot fill using regular fill method which works very well with closed figures. The solution to this problem is BeginPath and EndPath apis
Y
....Read More |
Rating
|
|
|
A Complete guide to .net Framework
|
Total Hit (1731) |
The Microsoft .NET Framework is a platform for building, deploying, and running XML Web services and applications. It provides a highly productive, standards-based, multiple-language environment for integrating existing investments with next-generation applications and services, as well as the agili
....Read More |
Rating
|
|
|
Handling NTFS Permissions Part-4 (handling registry key permissions)
|
Total Hit (7988) |
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
|
|
|
Handling NTFS Permissions Part-5 (handling printer permissions)
|
Total Hit (11207) |
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
|
|
|
How to use Named Pipes in a Visual Basic 32-bit Program ?
|
Total Hit (11973) |
Visual Basic can create applications that communicate to other processes by means of Named Pipes. The Named Pipe must be created on Windows 2000 or Windows NT; however, you can read from and write to that pipe from any 32-bit platform.
This article demonstrates Client/Server communication using a
....Read More |
Rating
|
|
|
How to force a window to be a ForeGround Window on Win 9x/NT both ?
|
Total Hit (9038) |
Microsoft changed the rules with Win98 and Windows 2000 . The SetForegroundWindow API can no longer be used directly to take focus away from another application. Here is the code to implement ForceForeGround window functionality.
Here I have used VB function that uses AttachThreadInput together w
....Read More |
Rating
|
|