Calvin Hsia's WebLog
learn.microsoft.com/en-us/archive/blogs/calvin_hsia
thoughts from a professional developer
C# / .NETC++Dev tools / editors / IDEsMicrosoft blogsMSDN archive
- Posts
- 440 from 1 Jun 2004 to 25 Sep 2024
- Posting
- archived, read-only
- Kind
- personal blog
- Feed
- https://learn.microsoft.com/en-us/archive/blogs/calvin_hsia/feed.xml
2024 1
2018 10
- Export your data to Excel using CSV and all data appears in one column
- Create managed Tests for native code
- Debugger features help to find memory leaks
- Heap Corruption Exception 0xC0000374
- Call C# code from your legacy C++ code
- Write native to managed interop code: reg free COM
- Lasers bouncing off elliptical mirrors in C#
- Wireless HeadPhone Adventures
- Reflect laser beams off multiple mirrors
- Create your own Process Explorer
2017 7
2016 10
- Create a Concordance for a Word Document from C# using Automation
- Use C++ to show memory use in an Excel Pivot table
- Visual Sorting Part 1
- Visual Sorting Algorithms part II
- Mapped Files give very fast access to huge amounts of data
- What's in a PDB file? Use the Debug Interface Access SDK
- Use gravity to generate Cartoon animation frames
- Memory use of Dynamically expanding TreeView
- Automatically open Visual Studio Projects and Solutions using IMessageFilter
- Cannot open include file: 'metahost.h': No such file or directory
2015 11
- Getting started with Windows Internet of Things (Windows IoT)
- Create a security system with cameras on your Windows IOT Raspberry Pi
- Create a Visual Studio Extension with minimal impact on VS startup performance
- The Central Limit theorem, Normal Distribution and Poker hand distributions
- Manipulate Visual Studio from Excel or Word
- Calculate Pi to measure processor performance
- Store different derived classes in collections in C++ and C#: CoVariance, shared_ptr, unique_ptr
- Lasers reflecting off an ellipse
- Getting more disk space, Symbolic Links and Azure Virtual Machines
- Visual Studio slowdown because Virus & Threat protection Windows Defender Antivirus is scanning this file
- Detouring code
2014 10
- Use reflection to get assembly type and method sizes for comparison
- Using Async with ManualResetEventSlim
- How to stress and measure the Garbage Collector
- Fish vs Sharks: Predator Prey simulation
- Logo Turtle Graphics in WPF
- How to monitor and respond to memory use
- Async methods failures can be hard to diagnose
- The Enum changed to int: How do you convert the int back to a name?
- See how often your code runs and how much time it takes
- Create your own CLR Profiler
2013 10
- Use reflection from native C++ code to run managed code
- Manipulate managed and native objects in C++ to show the registry in a WPF TreeView
- Call managed code from your C++ code
- Use Custom Attributes to initialize test environments
- Use status events to log and analyze an application
- Does the CLR release memory when no longer needed?
- Cartoon animation works great on Surface Pro
- The Visual Studio Feedback tool
- Compiling code at runtime and MVP program is 20
- Windows Error Reporting and the Appdomain.UnhandledException Event
2012 12
- Create a logger for watching your test progress as it runs.
- Turn your tests into stress tests easily
- Its easy to Create your own FrameWorkElement in WPF
- The number of Garbage Collections indicate how much memory is used
- Performance of Memory vs Disk
- Examine the layout of managed strings in memory
- Increase the memory available to your tests
- Create multiple threads to see if work is done simultaneously
- Tetris
- Examine your program's available memory: is it leaking?
- Process Windows Messages in your WPF application
- Be careful about nothing in managed code
2011 12
- Advanced debugging: change your program execution without Edit and Continue
- Improve your managed debugging skills: examining registers and memory
- More fun with the Fast Fourier Transform
- Using and styling a treeview in WPF
- Automatic tests protect your code
- Dynamically create huge tooltips in WPF TreeView and ListView
- Returning data from a recursive method
- Embed a ListView inside another ListView for one to many relationships
- Use colors in WPF to show virtual memory fragmentation
- The cost of using nothing
- See and hear the effects of Garbage Collection
- Are you running out of disk space? Treemap your files to see what's eating the most
2010 14
- Write your own Linq query viewer
- Adding a new ADO.NET Entity Data Model "Error HRESULT E_FAIL has been returned from a call to a COM component"
- Why does your code take so long? Profile it!
- Collect system info for your application's runtime environment
- Out of memory? Easy ways to increase the memory available to your program
- Use Perfmon to analyze your managed memory
- Use inline XAML with clr-namespace to create a Styled Treeview
- Using multiple heaps efficiently
- Managed code using unmanaged memory: HeapCreate, Peek and Poke
- Sometimes you want 2 returned values: playing around with Tuples
- Use Named Pipes and Shared Memory for inter process communication with a child process or two
- Use a Custom Allocator for your STL container
- Play around with .Net Dictionaries and STL maps
- Adventures in interop code: explore string interop memory
2009 13
- You can develop code faster
- Look at some hdden code in your VB project
- What is your computer doing with all that memory? Write your own memory browser
- Its easy to create a graph of memory use in Excel
- Make your Task Switcher Window bigger
- Process Explorer and Process Monitor can help you understand a program
- You can use Visual Studio to debug itself!
- Stack overflow, expand your stack? Change your algorithm!
- Area fill algorithm: crayons and coloring book
- Which pixels do you turn on when you draw a line?
- Comment/Uncomment code to switch versions quickly without using macros
- Cartoon animation program
- Overload Operator new to detect memory leaks
2008 20
- Write simple Debug helpers to help you debug and maintain your code
- You can use HWndHost to host a Win32 HWnd window inside a WPF element
- Dynamically load a DLL from a runtime specified path
- Synchronize your files across machines with Mesh
- Magnify your pictures using a PictureBox so that you can zoom with the Mouse Wheel
- Make your code more maintainable: The evils of the Return statement
- Cellular Automata: The Game of Life
- A WPF version of the Typing Tutor game
- The VB WinForm version of the typing tutor game
- Use a dictionary to help create a mnemonic
- How fast is interop code?
- How to interrupt your code
- Examine .Net Memory Leaks
- Persist user form size and location settings per session
- Create your own Test Host using XAML to run your unit tests
- Compress and timestamp your pictures to gain disk space
- Find the Executing function's name
- Use Visual Studio Test framework to create tests for your code
- Use XLINQ to query the references in your project
- Uninstall VB6 causes error message: You do not have a license to use this control
2007 52
- Use WPF and inline XAML in your Fox, Excel or VB6 applications
- Use ElementHost to Add WPF to your Wndows Forms or put your WinForm controls in your WPF app using WindowsFormsHost
- How to Create dynamic XAML to display arbitrary XML
- Use LINQ to Foxpro or any SQL data and display it in a WPF form using DataSetExtensions and DataRowExtensions
- Create your own media browser: Display your pictures, music, movies in a XAML tooltip
- Use the DispatcherTimer, Popup and even a movie to enhance your data presentation
- Use DataTemplates and WPF in code to create a general purpose LINQ Query results display
- Use LINQ with WPF : Styles and DataTemplates in code
- Customer site visit: 3-D printer company
- Extract TreeView or ListView ImageList icons from a DLL
- Create a WPF Form to choose a text color
- Resize your pictures for your phone or pocket pc
- Generate and run PowerShell scripts dynamically
- Use new XML Features of VB to generate dynamic scripts and text files
- Customize the display of types in the Debugger using Extension Methods and DebuggerDisplay Attribute
- Create your own web browser on your SmartPhone
- Customize your Windows Mobile SmartPhone home screen and Start Menu
- How to generate dynamic images for your web application
- Querying Northwind with Group By bug fixed
- Use Stored Procedures when you can for efficiency
- Install Northwind for SQL Express and use Visual Studio and DLINQ to query it
- Linq Queries for .Net Framework members
- C# and Fox versions of Cool Linq Query
- Cool Linq Query
- It's easy to resize your disk volumes on Vista
- Add an interactive map to your web page
- Why the order of shutdown events is important
- Find which DLLs in your system are rebased
- DLL Image base addresses are the same in XP, different on Vista
- SQL Select for most recent record
- Enable people to run your programs without installing anything
- Help->About->System Info doesn't work on Vista
- SQL Select puzzle to count failures and totals for each item
- The VB version of the Flip Task Bar for Vista Desktop Window Manager
- Write Fox code in Visual Studio that interacts with your VB.Net code
- Allowing Optional parameters in your COM objects
- How to schedule your computer to run tasks automatically
- What is Vista Aero?
- Create your own Flip Task Bar with live thumbnails using Vista Desktop Window Manager DWM
- Vista Aero DWM seems to optimize out GDI paint calls
- Fun with Vista Aero using the DwmExtendFrameIntoClientArea
- Windows Vista Aero BorderStyle Paint problem as non Administrator
- Fix your forms to paint borders correctly under Vista Aero
- Foxpro Menu items, combo boxes not refreshing selected item under Aero in Vista
- Why does the component gallery give an error "Error building key for index"?
- Add a manifest to control your application Vista UAC behavior
- Why doesn't Microsoft Excel Spreadsheet control work?
- The MVPs are coming!
- New printers are far more capable: Canon iP4300
- How to log application API calls using import module addresses
- Another way to get data into a web page: using OleDB or ODBC
- Word did not seem to be working
2006 92
- Customer question: what does the crash call stack mean
- Timestamp digital pictures
- The preservation of numerical precision
- The return value of a method can be intercepted using BindEvent
- Is this a Vista bug?
- Write your own hangman game
- Play movies with an ActiveX control
- Strange collection class behavior with objects
- Playing with NTFS File Streams
- Visual Sorting Algorithm comparison
- The Nametag Game
- Does the VFP ODBC driver support subdirectories?
- Create an ActiveX control using ATL that you can use from Fox, Excel, VB6, VB.Net
- Dynamically attaching a debugger
- Various ways to display multiple photographs: on a Fox form
- Various ways to display multiple photographs: Using Rects and thumbs
- Various ways to display multiple photographs
- Bug: a readonly left-aligned textbox has a floating point number whose value changes
- Host the CLR and Generate IL to call a MessageBox
- How to display a list of files in a grid
- Playing around with custom mouse cursors
- What was that strange character? The mystery deepens
- What's that funny character?
- National Public Radio Car Talk
- Off to the races!
- Analyzing Blog hit statistics
- Add a slider control to your TreeMap to vary how much detail is shown
- Use a different kind of grid in your applications
- Create a .Net UserControl that calls a web service that acts as an ActiveX control to use in Excel, VB6, Foxpro
- SmartPhone running low on memory due to Storage Card recognition
- Handling arbitrary strings in URLs: Escape, InternetCanonicalizeUrl, WinHttpCrackUrl and URI.EscapeUriString
- Check for a valid datasource from within the correct datasession
- Can you read or seek from an embedded file?
- Why doesn't my form close?
- Use temporary projects in Visual Studio
- Specifying the size of the program cache
- Customizing the Blog Crawler for different formats
- How does EventHandler work? IConnectionPoint!
- The VB version of the Blog Crawler
- If your machine freezes, maybe you can reboot it gracefully from another machine
- Use conditional build events to freshen zip files in Visual Studio
- Error Reading File infinite loop if drive disabled while file open and Data Session window open
- Webcrawl a blog to retrieve all entries locally: RSS on steroids
- More Multithread capabilities: interthread synchronization, error checking
- Meeting with some customers, manipulating SQL Server with Stored Procs
- Create multiple threads from within your application
- Sample program to create multiple threads
- What API calls reset GetLastError between Declare DLL calls in VFP8?
- Edit and Continue in VFP can save you time
- More DECLARE DLL performance discussion
- DECLARE DLL performance questions
- Using Foxpro to query line lengths
- SQL Server interpreter sample
- Today's Quiz. How many times is a user function called?
- Can you keep a server around after it's been released?
- Microsoft Sudoku article
- Modify resource file entries
- More Resource file data mining
- This code queries the foxuser resource file. What does it do?
- My daughter's soccer schedule
- How do large programs work?
- Creating your own web browser for your SmartPhone
- Collecting garbage at the wrong time
- Using Very large programs
- Will GetLastError ever work properly in VFP8.0?
- Why does BINDEVENT not work with StatusBar_Change?
- Why doesn't drag/drop work with BindEvents?
- Windows SmartPhone can run my Web Apps
- Is this a bug in BindEvents?
- Use an IStream object to avoid disk access
- Is there a 1 Megabyte limit on memo fields using the OleDB provider?
- Customize the VS debugger display of your data
- What about index key distribution?
- Index creation performance issues
- Find all statically linked libraries required before your process can start
- Index creation performance question
- Why did we limit the command window history length?
- What external code does your EXE depend on?
- Is there a way in VFP to pass a DWORD to an API function from VFP?
- Create your own typing tutor!
- Change the default screen saver
- Carburetor is a car part, but prosecutable is not
- Digging through old code: Chess program
- Phone number and wife haven't changed in 11 years
- You can hit enter anywhere on the line in the command window
- Remote Desktop and Offscreen Bitmaps
- Detecting Workstation state changes
- Grid Cell Alignment response
- Is this a bug in the Grid Cell alignment?
- Publishing blog statistics horror story
- Do you know this feature of the Document View Window?
- What's the difference between Vartype and Type
2005 125
- Open a file that's already opened in the editor
- Collection as Rowsource in Listbox
- Inspect your memory image and see fragmentation
- GetEnv Environment Variable question
- What's the greatest invention of all time?
- Use Named Pipes to communicate between processes or machines
- What is a Microsoft MVP? Calvin's List updated for the new century
- Using the Databar feature with real data
- SQL Select helps tune a car engine
- Recompress your digital pictures to save space
- DECLARE DLL allows OBJECT type
- Are water and salt the only inorganics we consume?
- Use Regular Expressions to get hyperlinks in blogs
- Eliminating Fire Alarm sound at Chess Tournament Awards Ceremony
- Excel's new gradient Data Bar feature is cool: you can do it too!
- Fox helps drag racer win Microsoft Start Something Amazing Award
- What happens if external code throws an exception?
- Intentionally crash your program
- Is this a bug in the View Parent Code button?
- Collecting pictures for yearbook, Ektaflex
- How old is your computer?
- Windows Security and how it affects running generated code
- Load, Call, Character Generators, and "Letter Quality" printers
- The vTable name is __vfptr in the debugger
- What to do with the Bindevent return value?
- Quiz: Infinite Continued fractions
- How does Task Manager determine if an Application is Not Responding?
- Local vs Private variables
- My toys over the years
- Customer question: detectan F10 keypress
- Tools->Options->Dump out settings changed
- Why did I get an error while publishing Photos?
- Database Events in Stored Procedures can have default code
- Do you know everything about Factorials?
- Optimization question from a reader
- How to hook command window keystrokes
- A Visual Basic COM object is simple to create, call and debug from Excel
- Replace VFP Native dialogs with your own
- Ctrl-C to capture MessageBox and dialogs
- Run the wizards modelessly
- Why can't I browse my table?
- That was the worst natural disaster to hit the US
- Find out when your password expires
- What is the workarea alias when a trigger is executed?
- DynamicBackColor
- String Optimization: More detail
- String Optimization. How does it work?
- Quiz: String performance optimization
- Get the available paper bins from a printer
- GetLastError: how does it work with DECLARE DLL ?
- GetLastError is a number. What does it mean?
- How to filter out unwanted sounds via Fourier Transform
- The Fast Fourier Transform
- A difficult debugging scenario
- Getting parameters from inherited classes
- Creating a quick report from any cursor
- Binding to Internet Explorer Instances
- Strongly typed methods and properties
- How to use DEVMODE
- Computer music on the radio
- The .Object member
- What printers are available to your program?
- How do I backup files that are still in use without shutting down the application?
- Puzzle: Why does backing up a data file require web application shut down?
- Inheritance levels
- Foxpro Language into a table
- The mechanics of Sudoku
- Sudoku puzzles screen capture
- Move your "My Documents" folder
- Have you used remote assistance ?
- Use Windows 2003 Server and remote desktops for debugging
- Why a large picture works, but a small one fails?
- Enable crop and zooming in on your digital photograph display form
- Print method parameters are undocumented
- Interesting form paint behavior
- Puzzle: Creating an INDEX requires EXCLUSIVE use of the table, doesn't it?
- Remove double spaces from pasted code samples in blog
- Generating VBScript to read a blog
- Watch the Autocomplete values change as you enter data
- Internet Explorer wordwrap doesn't break at commas
- Reacting to Windows Session events.
- Creating shortcuts for fast access to programs and favorites
- Call GDI+ JPG manipulation from Excel, Word, Powerpoint, VB.NET
- Draw text or graphics directly onto a JPG file
- GDI+ can't handle some malformed JPG files
- ActiveX Controls don't treat Focus the same
- Accessing embedded files can have problems
- Create thumbnails of all your digital photos in a single table
- Simple demo of Customer/Orders one to many form with conflict detection and resolution
- VFP handles some images differently with GDIPlus
- New MSN Search Toolbar allows Tabbed Browsing
- Is your Outlook mailbox overflowing? TreeMap it!
- Bigger than Google: formatting very big numbers in Grids/Browse
- Watch out when you use another computer for a demo
- What is taking up the space on your hard disk? TreeMap it!
- Running out of space ? What's on your disk?
- SQL Select data from a text file
- Randy's Devcon Demo
- Data Entry for dates: autoincrement tip
- Write your own Task Manager
- Application logging and Error methods
- Activation Key
- Binding to Internet Explorer events: bug in Typelibrary
- What's the difference between Internet Explorer and Explorer?
- Word to audible speech
- Your VFP runtime splash screen
- Put your registry into a table
- Third Party application does work as a COM+ application
- Floating Point calculations: comparing with zero
- April Fool's Pranks
- Calling the Windows APIs for Large Files
- Memory Handles
- Sharing Disneyland Digital pictures
- Relaxen und watchen das blinkenlights. What lights?
- Undocumented APIs and 16 bit DLLs
- Intercept power broadcast messages: How do you tell if Bindevent is really successful? SendMessage!
- How to use a COM interface when there is no COM object ?
- Decoding the timestamp in class libararies and forms
- Heartbeat: Garbage collection in VFP and .NET are similar
- User Interface design for numeric keypads
- Permutations
- Wite your own RSS News/Blog aggregator in <100 lines of code
- Do you like reading a blog author? Retrieve all blog entries locally for reading/searching using XML, XSLT, XPATH
- Use a simple XSLT to read the RSS feed from a blog
- Binding to Windows Events for Fox windows
2004 41
- Interactively experimenting with controls: the Slider
- Fox plays music
- Foxpro Performance tip: field name lookup for tables
- Creating a VFP application as a service:
- Sending Christmas cards: Creating mailng labels automatically
- Using non-Automation compatible types
- Intellisense: inspecting live objects
- Unbelievable performance gain by changing an Algorithm
- Another customer problem: a product doesn't work with VFP
- Programmatically add a watch expression to the debug watch window
- Screen Saver Tricks
- Run your code in response to a new drive being inserted
- Using Outlook to manage new documents
- Creating, parsing, graphing web hit logfiles or other temporal data
- Very Advanced Debugging tips
- Give the impression that you're an expert and earn palpable respect
- Is a process hijacking your machine?
- The Plane Man
- A Happy Customer
- Cold Solder Joint
- Reboot from remote desktop
- Make an interactive screen saver
- Start your Screen Saver NOW!
- Form design shortcut
- Spy on your programs
- Print a t-shirt
- How to protect your web site pictures from being saved
- Hear your web site being hit
- Put a web browser on your desktop
- Harvesting blood
- Why was the original IBM PC 4.77 Megahertz?
- Sharing Digital Pictures of your friend's
- Ancestors and population paradox: exponential growth
- What is a C0000005 crash?
- Dr. Watson: Please send in your error report
- Disappearing Window Contents while dragging the mouse
- Designing User Interface for car keys
- Start using XML and XSLT to create HTML
- Blogs get 300 hits per hour: Visual FoxPro can count.
- I want my own email! MSN Premium
- Independence Day for blogging