Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / desktop / Win32

Win32

Win32

Great Reads

by hxhl95
Escalating a process to system critical status using a Win32 kernel function
by Sergeant Kolja
This is an alternative for "Memory leak detection for WinCE".
by Pedram_Niloufari
C# .Gif viewer / Snipper control
by Yuriy Magurdumov
Calling native methods from .NET application via standard Windows Named Pipes

Latest Articles

by hxhl95
Escalating a process to system critical status using a Win32 kernel function
by Sergeant Kolja
This is an alternative for "Memory leak detection for WinCE".
by Pedram_Niloufari
C# .Gif viewer / Snipper control
by Yuriy Magurdumov
Calling native methods from .NET application via standard Windows Named Pipes

All Articles

Sort by Score

Win32 

by Pedram_Niloufari
C# .Gif viewer / Snipper control
by BrokenEvent
.NET WinForms Tray icon implemenation with Win7 and Vista features: GUID identification, large custom icons, custom UI instead of the hint, etc.
by zippy1981
This is an alternative for "ODBCTracer"
by Southmountain
Some take-away to improve the quality of desktop software
by AshakiranBhatter
ScreensSaver through fullscreen mode using Win32 APIs in C.
by WhiskeyBeforeWater
A nodular Singely Linked List for VBA with some basic functions
by nilotpalbarpujari
VS 2010 style toolbox written in C#
by Ritesh_Singh
C++ code to connect/access DB2 database using DB2 call level interface(CLI)
by sam stokes
This is a really simple implementation of JavaScript and HTML5 to be used in a Windows 8 Store app.
by Douglas de Alvarenga Silva
Add-in Word for PrintScreen
by Mukit, Ataul
This tip, taken from MSDN tells the basic of ownership in windows.
by U_IO
Consider possibility of alternative syntax usage to refer and access to last anonymous objective variables in C# instead of using construction in code.
by Ștefan-Mihai MOGA
How to download files from an HTTP server.
by Steffen Ploetz
Step-by-step instructions and source code snippets for inserting a bitmap (or a section of it) into an icon image.
by Steffen Ploetz
Automatically Disappearing Dialog
by veen_rp
Big lists (>1,000,000 items) can cause out-of-memory errors raised by .NET. Manage them by a List of List(Of T)
by Grigory Avdyushin
Short description how to create a sexy badge for windows 7 taskbar
by Laurie Stearn
Dialogex with Listbox to manipulate long paths in Windows
by hirosht
Step by step method of thresholding a image using the EmguCV API in C#
by Matthias Böhnke
Bug Fixes for Reading Barcodes from an Image - III
by JinWenQiang
Get started with your own SDN (Software Defined Network) simulation network
by OKarpov
How to use ASM in C#.NET and most fast memory copy method
by Emiliarge
Both MS Access formats (mdb and new - accdb), MSSQL 2008 R2, MSSQL CE, SQLite, MySQL
by Emiliarge
Read and write data to Access databases without limitations caused by the use of the SQL.
by Ahmed Amer Jaf
Downloading files from the Internet with one line without Freezing Form
by ehab_nour
Fast algorithm
by Szymon Roslowski
Just another approach to understanding communication between HID devices and C#.
by metastruct
When WebClient, HttpRequest, and all else fail, BITSadmin solves your download woes
by Emiliarge
2 ways to read and write data to *.xls and *.xls files and display it on DataGridView.
by Farhad Reza
This tip describes how we can design application interface using Win32 API in Rust Programming language.
by maftahur
Capturing web screen in different formats without any browser(PhantomJS)
by DaveyM69
How to prevent a CD/DVD drive from being opened.
by Steve Maier
To get this to work in .NET 4, you have to change the DLLImport signature.[DllImport("kernel32.dll", SetLastError = true)]private static extern IntPtr CreateFile( string lpFileName, uint dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, ...
by Dave Kreskowiak
This is probably why your global keyboard and mouse hooks stopped working on Windows 7
by Tejashwi Kalp Taru
Ever wanted to change the Windows Aero color without restarting the DWM?
by djdynamix
A little workaround to enable a VB.NET application to read and alter the WPC settings for any user.
by Cinchoo
This article show how to consume Windows registry information using Cinchoo Configuration Manager.
by Chris Jorna
Communication Library Files - LMS5lib | Connection and structure
by Chris Jorna
Communication Library Files - NetTools | IsSameSubnet
by Chris Jorna
Source code and demo on general TCP client & server library mainly usable for / tested on SICK lidar devices
by Chris Jorna
Communication library files - UDP broadcast
by aaverian
A very simple console progress bar.
by Mukit, Ataul
this tip tells about a tool that converts a win32 rc file to XML
by Mukit, Ataul
This tip shows you how to convert the dimension values in the .rc file of a dialog into pixels
by El_Codero
Convert doc/docx documents to pdf with Foxit Reader Printer. Works without use of Word Interop/SharePoint.
by Altaf Ansari
Converting XML Data into DataTable and Exporting DataTable into Excel File
by Mukit, Ataul
This tip shows how to create a service
by Farhad Reza
This tip describes how we can create a simple window in Go programming language using Win32 API functions.
by Mukit, Ataul
This is not so much of a trick, just a little tip about how CTRL+I is interpretated in a window
by Mike Hankey
A simple solution to rolling up a Custom ComboBox list on mouse leave.
by Alex Culea
Shows how to create a window that behaves like a context menu
by Gautham Prabhu K
Perform custom disk clean up when hard disk free space goes low
by Javad Taheri (drjackool)
Show or hide, reorder, save and restore list view column headers
by Gihan Liyanage
Simple Dapper.NET Example with MVC
by Yochai Timmer
Debugging C++ projects in release. Finding the lost object information
by slaon77
Setting APM level for SATA hard drive
by Vinod Viswanath
Are you annoyed of the "Restart now" message in Windows? Here is a solution for that.
by Niklas L
This tip show how to display all entries from a C++ vtable in the VS debugger.
by Jose A Pascoa
Part 1 - Using DMath from C#
by Johnny J.
How to do a program whose main graphic interface consists of an icon in system tray
by Sujith Karivelil
This article Describes Connectivity to Gmail using IMAP, and also guide you to download and save mail content along with attachment.
by Clifford Nelson
This article presents a way to display totally dynamic data in a windows grid using a dictionary.
by metastruct
SFTP Files using PLINK as a process in C#
by Ahmed Elkafrawy
An easy way to simulate keyboard press & release keys to another application
by Muhammad Muddasar Yamin
The article is about launching elevated processes through command line
by Brandon Rohrer
Embed HTML in a Word Document
by George Swan
Couldn't the class RegEdit be replaced by one simple method?private void SetKey(bool enableTaskManager) { using ( var mKey = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System")) {...
by Brady Kelly
A quick and easy way to ensure that your Code First DB Initializer is always run when your app starts, not just on the first data access operation
by Debopam Pal
How to bring data from Entity model to Excel file using LINQ.
by Dejan Mauer
Probably the easiest way to detect faces in images by using Accord.net framework
by pavan1361
adding require blocking site in hosts file
by Ștefan-Mihai MOGA
A quick solution to transform binary data to plain text
by Eric Payne
The simplest, fastest way to send a file from your computer using Bluetooth!
by Suraj S Koneri
Test whether your remote server rebooted or not from C# code.
by Not Active
Plagiarized from http://msdn.microsoft.com/en-us/library/ms724429(VS.85).aspx[^]
by Vahid_N
Microsoft has not updated Iran's daylight saving time information since 2009. Let's find out how it works and then fix it for the next 100 years!
by Tejashwi Kalp Taru
When we have to scroll some text in the dialog box with a background image, you can see flicker. Here's the technique of double buffer to solve this problem
by Ajay Vijayvargiya
Need to Format/sprintf a string before displaying a messagebox? Here is solution!
by Aescleal
printf is so 1980s. If you don't want to dig out your shoulder pads and big hair why not go for a more modern C++ approach?Instead of a function try a stream buffer:class message_box_stream_buf : public std::basic_streambuf{ public: message_box_stream_buf( const...
by Rich Turner
Free space cleaner to overwrite empty space on logical disks
by David O'Neil
I needed an 'Update' solution for a project, and modified Geert van Horrik's 'Updater' to do so. This is the solution in Visual Studio Community Edition
by Southmountain
Gems for typedef and namespace in C
by Ștefan-Mihai MOGA
How to get temporary files with any extension.
by JamesFaix
Get a collection of all running Excel interop Application objects (not just the active one)
by pdoxtader
Use DeviceIoControl, QueryDosDevice and WNetOpenEnum to get information about your system.
by Thomas B Dignan
Getting the text of Win32 Error codes for 99% of cases.
by Orjan Westin
Simple function to get the text message corresponding to a system error.
by Mr Nukealizer
Ideal for finding LoadLibrary() in 32 bit programs from a 64 bit program but it works for any function in any DLL and supports forwarded functions and ordinals.
by John Torjo
Want to automatically let your users know when you've posted an update of your application? If your project is hosted on github, you're in luck!
by Steffen Ploetz
A solution for: If the toolbar is created button by button with single TB_ADDBUTTONS calls, the width of the separators is not calculated correctly.
by HP2M
This tip covers handling two Excel lists using Interop.
by Clifford Nelson
These are some methods I created to help with creating and deleting Windows shared directories.
by honey the codewitch
Extensive performance and API improvements for streaming MIDI and more
by Dr. Vinayak Ashok Bharadi
Homomorphic filtering is a generalized technique for signal and image processing, involving a nonlinear mapping to a different domain in which linear filter techniques are applied, followed by mapping back to the original domain.
by Simon-Benyo
Hooking unmanaged processes using VB.NET.
by bleedingfingers
I want to share a simple class I use for this purpose. The class operates on kernel objects.
by Aescleal
I tend to use boost::interprocess::named_mutex for the same thing. The equivalent code is something like:using boost::interprocess;const char *application_name = "Application Name";int main()try{ struct named_mutex_killer { ~named_mutex_killer() {...
by Malli_S
Solution II used to use following simple way to manage the single instance of the app.//Usually I append the UID to the application name to achieve the unique object name.TCHAR szAppName[] = _T("Application_Name_999e7ba3-e8fc-4c21-985b-ab11f39ce759");HANDLE hMutex =...
by Menuki
This solution works in Windows environment under Visual Studio.I don't know if there is a Linux equivalent.I use a counter common for all processes.#pragma data_seg("counter") // counter common for all processesLONG gs_nCtApp = -1; #pragma data_seg()#pragma comment(linker,...
by Kees van Spelde
How to control a Windows Service from C# .NET
by Anuraj Parameswaran
Delete a file or folder to Recyclebin using C#
by Mike Meinz
How to use .NET Framework to determine the drive letter of the CD/DVD (optical) drive.
by PJ Arends
I needed to disable the Sleep button on my keyboard, here's how.
by dapeacenforcement
Easy way to edit the right ListViewItem (Row/Column) after MouseDoubleClick.
by Ed Nutting
How to fix LocalDB / SQL Server: "Cannot open database "XYZ" requested by the login. The login failed. Login failed for user ABC"
by Pasan Eeriyagama
how to get gridview selected row value to text box which is in another windows form
by KazMaxLtd
This article describes how to hide or show TabControl tabs at runtime
by Bernhard Hiller
That's far too obscure.All you need to do is store a reference to the TabPage instance which was removed from the TabPages collection of the TabControl. You may use the form where the TabControl is placed for that purpose.You could also create your own TabControl which has an extra property...
by Aydin Homay
In the tip, I want to illustrate how to host windows form in windows user control
by Amit KD
How to identify if the executable is 32-bit or 64-bit
by emranallan
Lock Device Screen ,to prevent an one working on the device
by Md. Marufuzzaman
Introduction How can you lock your Windows NT based Workstation programmatically? To do this, you just need a little basic knowledge on how to use user32.dll. Here you will find a function name as LockWorkStation() and you need to know how to call this function. A sample example with the...
by George Jonsson
This tip uses SendMessage and WM_COPYDATA to transfer the data.
by maratoni
This is a brief tutorial on how to sign a Windows device driver with WDK 7.1
by Ahmed Elkafrawy
Implementation of an easy, fast, and optimized (CByte, CShort, CInt) with bits access using bit field and union
by Nick Tziamihas
In this article, we show how you can execute asynchronous code on the main thread without async, by replicating Unity's coroutine framework.
by Debopam Pal
Export Advanced Excel 2007 Report
by sunhui
Integrate .NET Component to your Native MFC Application at runtime
by flyhigh
SOUI is a directui library and had been used in many commercial softwares, which is published based on MIT and is completely free to any user.
by Steffen Ploetz
How to embed icons into Win32 programs without utilizing resources - useful for platforms without resource editor/resorce compiler, e.g., ReactOS. Learn the missing things about the .ico format.
by ugavnholt
How to invoke foreign remoting interfaces in remote hosts.
by Karthik Kalyanasundaram
Do you really need an explicit call to _endthreadex() in your thread function created using _beginthreadex()
by Mircea Sirghi
Jacob for Excel, pivot tables, VBA functions, etc.
by Joshua Tully
So I’m playing around with DX10 and decide to do some input work.  After much research apparently no one can decide what the best way to handle keyboard input so I’m just going to use WM_KEYDOWN/UP and store the state in a bool[] and check that in the rendering code.  Also, instead of using...
by Mukit, Ataul
This tip shows the technique of loading a 256 color bitmap into an image list
by Lars [Large] Werner
Use the standard GDI API to load an HBITMAP into SFML.
by FlyersWeb
This article present how to make async HTTP Request in a command line application
by joejames111
Raw input 64-bit .NET classes.
by Zanga D. Dagnogo
This is a simple multiclient server chat on a Local Area Network.
by John J. Scott
A tip that compares the performance of a simple Mandelbrot generator in C# against native C++
by Mike Meinz
PartnerTech provides a 32-bit DLL and a 64-bit DLL for communicating with the CD-7220 Series Customer Display in true USB mode. This tip demonstrates a .NET class that can be used to provide an easy way to access the PartnerTech-provided 32-bit DLL.
by Michael_Davies
Printing To Line Printers (EPOS) Using Windows
by Max Methot
This little simple and easy to read program will help you understand how to print to a specific printer, local or shared on a network.
by K.badari
Programmatically Convert PDF-To-XPS Document
by Maxim Komlev
.NET classes to enumerate applications associated with protocol
by peterswinkels
A Visual Basic 6 program demonstrating how to access databases using Microsoft ADO and how to automate Outlook and Excel.
by TapasU
Steps to decode Windows Error code
by Subha.N
Tip to create a database application using C# .NET in the shortest time possible.
by imagiro
How to use the shell to unzip a file to a folder location
by Yuksel YILDIRIM
How to show digits of reciprocal of a number (or division) in more precision
by Henryk Filipowicz
A class to read and parse reg files
by Demid Korneev
Example of AltNETType use in OpenGL
by Mukit, Ataul
Given a device context, replace a color (clrColorReplace) in a rectangular region of the device context with another color (clrColorFill)
by flyhigh
By implementing a UI library and exporting its necessary components to lua script, we can create a beautiful UI and implement relevant logic in Lua script completely.
by Keith Balaam
Run multiple instances of a Windows service on the same machine.
by Mukit, Ataul
This tip shows how to save a 24 bitmap to a file given filename, pixel data, bitmap width and bitmap height
by himanshupareek
Parse the PCAP dump and extract NETBIOS and DNS queries.
by Yohamnes Hernandez
How to free blocked files, inclusive if they are mapped in memory. Something that many tools are missing.
by Richard MacCutchan
Obscure a window or the screen and show a dialog.
by Brisingr Aerowing
This is an alternative for "Security Blackout Window"
by Adamanteus
Intercepting SEH exceptions in C++ program
by Mike 2005
Code to include in a deployment project
by Member 11246861
Under laptop's control, microcontroller sends sensor data to laptop that displays numbers and graphic.
by Gautham Prabhu K
Creating and using Service Locator pattern
by Allegra Angelo
Save, read and text recognition of network parameters
by Gun Gun Febrianza
Show and hide your drive using software drive conceal
by Dean Feng
A simple method to display a waiting dialog in WinForm application, and not block the main form.
by l_sheba
:laugh: :laugh: :laugh: This trick will show you how shellcode works (in a simple way). First, create a Win32 application, and delete all generated code in your main.cpp and leave the _tWinMain block empty and return 0. And then, put MessageBox function, make all parameters zero. The code...
by hussam.it
Simple Word Document File Viewer
by Mukit, Ataul
This tip shows how to simulate a key stroke in windows environment
by Jose David Pujo
With SendInput:void SetNumLock (bool active){ BYTE keyState[256]; GetKeyboardState((LPBYTE)&keyState); bool active0= keyState[VK_NUMLOCK] & 1; if (active0!=active) { INPUT inp[2]; ZeroMemory(inp, sizeof(inp)); inp[0].type=INPUT_KEYBOARD; ...
by citrin
About the bitness challenge in software development
by Jake Franta
SolidWidgets Grid tutorial.
by Redgum
A customizable MessageBox() DLL and test application with dozens of built-in icons and color schemes
by sam stokes
How to implement live tile notification in just a few lines of code
by sam stokes
This sample demonstrates how to use the Tile Template, specifically the TileSquareImage and an image.
by Emmery Chrisco
Tabbed Browser Control addon
by Asif Bahrainwala
Atomic set and test in critical sections
by Bruno van Dooren
What to do when you want to use the current thread handle
by Michael Chourdakis
A ready to use equalizer for your projects
by pasztorpisti
A custom implementation of the FindResource() and LoadString() functions with better error indication. Pointing the direction for those who want to learn the binary PE resource format.
by Thiago Gaidzinski
UniDAC allows you to connect your cross-platform application directly with many database's types.
by xdoukas
A tip on the implementation of Unix ucontext_t operations on Microsoft Windows.
by Prabakaran T
Ultimate USB Reset Attribute with powerful option
by Tsuda Kageyu
An application of lambda expressions to simplify your code.
by codefabricator
// Even more simplifiedclass Program{ [DllImport("user32", ExactSpelling = true)] static extern bool EnumWindows(WNDENUMPROC lpEnumFunc, IntPtr lParam); [UnmanagedFunctionPointer(CallingConvention.Winapi)] delegate bool WNDENUMPROC(IntPtr hwnd, IntPtr lParam); ...
by Piyush Manharlal
Using integer instead of Enum for ComboBox and Radio Button in XAML
by LarryCharlton
Using system, named, and hex color values
by andrewbb@gmail.com
Includes most API functions except for graphics.
by Gerardo Recinto
Virtualization of RAM & Disk for high-speed, low-footprint & scalable data caching
by Emiliarge
How to statically link a Win32 Project with Visual C++ libraries (m***.dll)
by Ayush Swiss
C++, WebView2, Edge Browser, Edge in MFC application
by Leonid Belousov
This tip shows how to find the default browser command line in registry using Visual C++.
by Farhad Reza
In this tip, we will see how we can use the Rust language to do GUI (Graphical User Interface) programming. As an example program, we will create a simple Window. Using Win32 API functions.
by REALTBU
Easy to use class which supports displaying icons on button controls
by Steffen Ploetz
The Win32++ class library sample collection does not contain a sample, that creates the frame menu via API instead of via resources. Here is the missing part.
by Tim Stevens
An updated version of the code in David A Jones' article "Memory Leak Detection"
by Manish K. Agarwal
Windows symbols and crash dump analysis.
by Antagony
Schedule a task to run this script, which checks whether Windows has [re]connected to the specified router after startup, sleep, or hibernation – and attempt to connect if not.
by Daniel Lieberwirth (BrainInBlack)
A class representing the state of a connected XBOX 360 controller
by Kai Schtrom
Display smart messages on the Windows Desktop as XBOX360 achievements
by Anamera
This XSLT will output an Excel worksheet containing a CSV type of record collection in a more usable XML format.
by Dariush Tasdighi
A very powerful and customizable source code that converts the Infix to Postfix expression.
by Steffen Ploetz
Another fully functional ownerdraw menu with minimal effort - this time based on Win32, with icons instead of bitmaps, with accelerators and tested for ReactOS and WinNT 4.0 to Windows 10
by Akos Mattiassich
Find a window on the desktop, spy its properties and manipulate it.
by User 5250478
Application to show how to zigzag order a matrix