The Curious Engineer

All blogs / C# / .NET

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

’05’10’15’20’25
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

  1. Create a simple File Watcher to monitor folder changes: Windows Prefetcher

2018 10

  1. Export your data to Excel using CSV and all data appears in one column
  2. Create managed Tests for native code
  3. Debugger features help to find memory leaks
  4. Heap Corruption Exception 0xC0000374
  5. Call C# code from your legacy C++ code
  6. Write native to managed interop code: reg free COM
  7. Lasers bouncing off elliptical mirrors in C#
  8. Wireless HeadPhone Adventures
  9. Reflect laser beams off multiple mirrors
  10. Create your own Process Explorer

2017 7

  1. Execute tasks in parallel using async and await to speed up computation
  2. Blinking Lights are useful
  3. Create your own crash dumps
  4. Examining a crash dump
  5. Big numbers
  6. Use the power of Reflection to create and manipulate managed objects
  7. Use C++ and no managed code to create a WPF form

2016 10

  1. Create a Concordance for a Word Document from C# using Automation
  2. Use C++ to show memory use in an Excel Pivot table
  3. Visual Sorting Part 1
  4. Visual Sorting Algorithms part II
  5. Mapped Files give very fast access to huge amounts of data
  6. What's in a PDB file? Use the Debug Interface Access SDK
  7. Use gravity to generate Cartoon animation frames
  8. Memory use of Dynamically expanding TreeView
  9. Automatically open Visual Studio Projects and Solutions using IMessageFilter
  10. Cannot open include file: 'metahost.h': No such file or directory

2015 11

  1. Getting started with Windows Internet of Things (Windows IoT)
  2. Create a security system with cameras on your Windows IOT Raspberry Pi
  3. Create a Visual Studio Extension with minimal impact on VS startup performance
  4. The Central Limit theorem, Normal Distribution and Poker hand distributions
  5. Manipulate Visual Studio from Excel or Word
  6. Calculate Pi to measure processor performance
  7. Store different derived classes in collections in C++ and C#: CoVariance, shared_ptr, unique_ptr
  8. Lasers reflecting off an ellipse
  9. Getting more disk space, Symbolic Links and Azure Virtual Machines
  10. Visual Studio slowdown because Virus & Threat protection Windows Defender Antivirus is scanning this file
  11. Detouring code

2014 10

  1. Use reflection to get assembly type and method sizes for comparison
  2. Using Async with ManualResetEventSlim
  3. How to stress and measure the Garbage Collector
  4. Fish vs Sharks: Predator Prey simulation
  5. Logo Turtle Graphics in WPF
  6. How to monitor and respond to memory use
  7. Async methods failures can be hard to diagnose
  8. The Enum changed to int: How do you convert the int back to a name?
  9. See how often your code runs and how much time it takes
  10. Create your own CLR Profiler

2013 10

  1. Use reflection from native C++ code to run managed code
  2. Manipulate managed and native objects in C++ to show the registry in a WPF TreeView
  3. Call managed code from your C++ code
  4. Use Custom Attributes to initialize test environments
  5. Use status events to log and analyze an application
  6. Does the CLR release memory when no longer needed?
  7. Cartoon animation works great on Surface Pro
  8. The Visual Studio Feedback tool
  9. Compiling code at runtime and MVP program is 20
  10. Windows Error Reporting and the Appdomain.UnhandledException Event

2012 12

  1. Create a logger for watching your test progress as it runs.
  2. Turn your tests into stress tests easily
  3. Its easy to Create your own FrameWorkElement in WPF
  4. The number of Garbage Collections indicate how much memory is used
  5. Performance of Memory vs Disk
  6. Examine the layout of managed strings in memory
  7. Increase the memory available to your tests
  8. Create multiple threads to see if work is done simultaneously
  9. Tetris
  10. Examine your program's available memory: is it leaking?
  11. Process Windows Messages in your WPF application
  12. Be careful about nothing in managed code

2011 12

  1. Advanced debugging: change your program execution without Edit and Continue
  2. Improve your managed debugging skills: examining registers and memory
  3. More fun with the Fast Fourier Transform
  4. Using and styling a treeview in WPF
  5. Automatic tests protect your code
  6. Dynamically create huge tooltips in WPF TreeView and ListView
  7. Returning data from a recursive method
  8. Embed a ListView inside another ListView for one to many relationships
  9. Use colors in WPF to show virtual memory fragmentation
  10. The cost of using nothing
  11. See and hear the effects of Garbage Collection
  12. Are you running out of disk space? Treemap your files to see what's eating the most

2010 14

  1. Write your own Linq query viewer
  2. Adding a new ADO.NET Entity Data Model "Error HRESULT E_FAIL has been returned from a call to a COM component"
  3. Why does your code take so long? Profile it!
  4. Collect system info for your application's runtime environment
  5. Out of memory? Easy ways to increase the memory available to your program
  6. Use Perfmon to analyze your managed memory
  7. Use inline XAML with clr-namespace to create a Styled Treeview
  8. Using multiple heaps efficiently
  9. Managed code using unmanaged memory: HeapCreate, Peek and Poke
  10. Sometimes you want 2 returned values: playing around with Tuples
  11. Use Named Pipes and Shared Memory for inter process communication with a child process or two
  12. Use a Custom Allocator for your STL container
  13. Play around with .Net Dictionaries and STL maps
  14. Adventures in interop code: explore string interop memory

2009 13

  1. You can develop code faster
  2. Look at some hdden code in your VB project
  3. What is your computer doing with all that memory? Write your own memory browser
  4. Its easy to create a graph of memory use in Excel
  5. Make your Task Switcher Window bigger
  6. Process Explorer and Process Monitor can help you understand a program
  7. You can use Visual Studio to debug itself!
  8. Stack overflow, expand your stack? Change your algorithm!
  9. Area fill algorithm: crayons and coloring book
  10. Which pixels do you turn on when you draw a line?
  11. Comment/Uncomment code to switch versions quickly without using macros
  12. Cartoon animation program
  13. Overload Operator new to detect memory leaks

2008 20

  1. Write simple Debug helpers to help you debug and maintain your code
  2. You can use HWndHost to host a Win32 HWnd window inside a WPF element
  3. Dynamically load a DLL from a runtime specified path
  4. Synchronize your files across machines with Mesh
  5. Magnify your pictures using a PictureBox so that you can zoom with the Mouse Wheel
  6. Make your code more maintainable: The evils of the Return statement
  7. Cellular Automata: The Game of Life
  8. A WPF version of the Typing Tutor game
  9. The VB WinForm version of the typing tutor game
  10. Use a dictionary to help create a mnemonic
  11. How fast is interop code?
  12. How to interrupt your code
  13. Examine .Net Memory Leaks
  14. Persist user form size and location settings per session
  15. Create your own Test Host using XAML to run your unit tests
  16. Compress and timestamp your pictures to gain disk space
  17. Find the Executing function's name
  18. Use Visual Studio Test framework to create tests for your code
  19. Use XLINQ to query the references in your project
  20. Uninstall VB6 causes error message: You do not have a license to use this control

2007 52

  1. Use WPF and inline XAML in your Fox, Excel or VB6 applications
  2. Use ElementHost to Add WPF to your Wndows Forms or put your WinForm controls in your WPF app using WindowsFormsHost
  3. How to Create dynamic XAML to display arbitrary XML
  4. Use LINQ to Foxpro or any SQL data and display it in a WPF form using DataSetExtensions and DataRowExtensions
  5. Create your own media browser: Display your pictures, music, movies in a XAML tooltip
  6. Use the DispatcherTimer, Popup and even a movie to enhance your data presentation
  7. Use DataTemplates and WPF in code to create a general purpose LINQ Query results display
  8. Use LINQ with WPF : Styles and DataTemplates in code
  9. Customer site visit: 3-D printer company
  10. Extract TreeView or ListView ImageList icons from a DLL
  11. Create a WPF Form to choose a text color
  12. Resize your pictures for your phone or pocket pc
  13. Generate and run PowerShell scripts dynamically
  14. Use new XML Features of VB to generate dynamic scripts and text files
  15. Customize the display of types in the Debugger using Extension Methods and DebuggerDisplay Attribute
  16. Create your own web browser on your SmartPhone
  17. Customize your Windows Mobile SmartPhone home screen and Start Menu
  18. How to generate dynamic images for your web application
  19. Querying Northwind with Group By bug fixed
  20. Use Stored Procedures when you can for efficiency
  21. Install Northwind for SQL Express and use Visual Studio and DLINQ to query it
  22. Linq Queries for .Net Framework members
  23. C# and Fox versions of Cool Linq Query
  24. Cool Linq Query
  25. It's easy to resize your disk volumes on Vista
  26. Add an interactive map to your web page
  27. Why the order of shutdown events is important
  28. Find which DLLs in your system are rebased
  29. DLL Image base addresses are the same in XP, different on Vista
  30. SQL Select for most recent record
  31. Enable people to run your programs without installing anything
  32. Help->About->System Info doesn't work on Vista
  33. SQL Select puzzle to count failures and totals for each item
  34. The VB version of the Flip Task Bar for Vista Desktop Window Manager
  35. Write Fox code in Visual Studio that interacts with your VB.Net code
  36. Allowing Optional parameters in your COM objects
  37. How to schedule your computer to run tasks automatically
  38. What is Vista Aero?
  39. Create your own Flip Task Bar with live thumbnails using Vista Desktop Window Manager DWM
  40. Vista Aero DWM seems to optimize out GDI paint calls
  41. Fun with Vista Aero using the DwmExtendFrameIntoClientArea
  42. Windows Vista Aero BorderStyle Paint problem as non Administrator
  43. Fix your forms to paint borders correctly under Vista Aero
  44. Foxpro Menu items, combo boxes not refreshing selected item under Aero in Vista
  45. Why does the component gallery give an error "Error building key for index"?
  46. Add a manifest to control your application Vista UAC behavior
  47. Why doesn't Microsoft Excel Spreadsheet control work?
  48. The MVPs are coming!
  49. New printers are far more capable: Canon iP4300
  50. How to log application API calls using import module addresses
  51. Another way to get data into a web page: using OleDB or ODBC
  52. Word did not seem to be working

2006 92

  1. Customer question: what does the crash call stack mean
  2. Timestamp digital pictures
  3. The preservation of numerical precision
  4. The return value of a method can be intercepted using BindEvent
  5. Is this a Vista bug?
  6. Write your own hangman game
  7. Play movies with an ActiveX control
  8. Strange collection class behavior with objects
  9. Playing with NTFS File Streams
  10. Visual Sorting Algorithm comparison
  11. The Nametag Game
  12. Does the VFP ODBC driver support subdirectories?
  13. Create an ActiveX control using ATL that you can use from Fox, Excel, VB6, VB.Net
  14. Dynamically attaching a debugger
  15. Various ways to display multiple photographs: on a Fox form
  16. Various ways to display multiple photographs: Using Rects and thumbs
  17. Various ways to display multiple photographs
  18. Bug: a readonly left-aligned textbox has a floating point number whose value changes
  19. Host the CLR and Generate IL to call a MessageBox
  20. How to display a list of files in a grid
  21. Playing around with custom mouse cursors
  22. What was that strange character? The mystery deepens
  23. What's that funny character?
  24. National Public Radio Car Talk
  25. Off to the races!
  26. Analyzing Blog hit statistics
  27. Add a slider control to your TreeMap to vary how much detail is shown
  28. Use a different kind of grid in your applications
  29. Create a .Net UserControl that calls a web service that acts as an ActiveX control to use in Excel, VB6, Foxpro
  30. SmartPhone running low on memory due to Storage Card recognition
  31. Handling arbitrary strings in URLs: Escape, InternetCanonicalizeUrl, WinHttpCrackUrl and URI.EscapeUriString
  32. Check for a valid datasource from within the correct datasession
  33. Can you read or seek from an embedded file?
  34. Why doesn't my form close?
  35. Use temporary projects in Visual Studio
  36. Specifying the size of the program cache
  37. Customizing the Blog Crawler for different formats
  38. How does EventHandler work? IConnectionPoint!
  39. The VB version of the Blog Crawler
  40. If your machine freezes, maybe you can reboot it gracefully from another machine
  41. Use conditional build events to freshen zip files in Visual Studio
  42. Error Reading File infinite loop if drive disabled while file open and Data Session window open
  43. Webcrawl a blog to retrieve all entries locally: RSS on steroids
  44. More Multithread capabilities: interthread synchronization, error checking
  45. Meeting with some customers, manipulating SQL Server with Stored Procs
  46. Create multiple threads from within your application
  47. Sample program to create multiple threads
  48. What API calls reset GetLastError between Declare DLL calls in VFP8?
  49. Edit and Continue in VFP can save you time
  50. More DECLARE DLL performance discussion
  51. DECLARE DLL performance questions
  52. Using Foxpro to query line lengths
  53. SQL Server interpreter sample
  54. Today's Quiz. How many times is a user function called?
  55. Can you keep a server around after it's been released?
  56. Microsoft Sudoku article
  57. Modify resource file entries
  58. More Resource file data mining
  59. This code queries the foxuser resource file. What does it do?
  60. My daughter's soccer schedule
  61. How do large programs work?
  62. Creating your own web browser for your SmartPhone
  63. Collecting garbage at the wrong time
  64. Using Very large programs
  65. Will GetLastError ever work properly in VFP8.0?
  66. Why does BINDEVENT not work with StatusBar_Change?
  67. Why doesn't drag/drop work with BindEvents?
  68. Windows SmartPhone can run my Web Apps
  69. Is this a bug in BindEvents?
  70. Use an IStream object to avoid disk access
  71. Is there a 1 Megabyte limit on memo fields using the OleDB provider?
  72. Customize the VS debugger display of your data
  73. What about index key distribution?
  74. Index creation performance issues
  75. Find all statically linked libraries required before your process can start
  76. Index creation performance question
  77. Why did we limit the command window history length?
  78. What external code does your EXE depend on?
  79. Is there a way in VFP to pass a DWORD to an API function from VFP?
  80. Create your own typing tutor!
  81. Change the default screen saver
  82. Carburetor is a car part, but prosecutable is not
  83. Digging through old code: Chess program
  84. Phone number and wife haven't changed in 11 years
  85. You can hit enter anywhere on the line in the command window
  86. Remote Desktop and Offscreen Bitmaps
  87. Detecting Workstation state changes
  88. Grid Cell Alignment response
  89. Is this a bug in the Grid Cell alignment?
  90. Publishing blog statistics horror story
  91. Do you know this feature of the Document View Window?
  92. What's the difference between Vartype and Type

2005 125

  1. Open a file that's already opened in the editor
  2. Collection as Rowsource in Listbox
  3. Inspect your memory image and see fragmentation
  4. GetEnv Environment Variable question
  5. What's the greatest invention of all time?
  6. Use Named Pipes to communicate between processes or machines
  7. What is a Microsoft MVP? Calvin's List updated for the new century
  8. Using the Databar feature with real data
  9. SQL Select helps tune a car engine
  10. Recompress your digital pictures to save space
  11. DECLARE DLL allows OBJECT type
  12. Are water and salt the only inorganics we consume?
  13. Use Regular Expressions to get hyperlinks in blogs
  14. Eliminating Fire Alarm sound at Chess Tournament Awards Ceremony
  15. Excel's new gradient Data Bar feature is cool: you can do it too!
  16. Fox helps drag racer win Microsoft Start Something Amazing Award
  17. What happens if external code throws an exception?
  18. Intentionally crash your program
  19. Is this a bug in the View Parent Code button?
  20. Collecting pictures for yearbook, Ektaflex
  21. How old is your computer?
  22. Windows Security and how it affects running generated code
  23. Load, Call, Character Generators, and "Letter Quality" printers
  24. The vTable name is __vfptr in the debugger
  25. What to do with the Bindevent return value?
  26. Quiz: Infinite Continued fractions
  27. How does Task Manager determine if an Application is Not Responding?
  28. Local vs Private variables
  29. My toys over the years
  30. Customer question: detectan F10 keypress
  31. Tools->Options->Dump out settings changed
  32. Why did I get an error while publishing Photos?
  33. Database Events in Stored Procedures can have default code
  34. Do you know everything about Factorials?
  35. Optimization question from a reader
  36. How to hook command window keystrokes
  37. A Visual Basic COM object is simple to create, call and debug from Excel
  38. Replace VFP Native dialogs with your own
  39. Ctrl-C to capture MessageBox and dialogs
  40. Run the wizards modelessly
  41. Why can't I browse my table?
  42. That was the worst natural disaster to hit the US
  43. Find out when your password expires
  44. What is the workarea alias when a trigger is executed?
  45. DynamicBackColor
  46. String Optimization: More detail
  47. String Optimization. How does it work?
  48. Quiz: String performance optimization
  49. Get the available paper bins from a printer
  50. GetLastError: how does it work with DECLARE DLL ?
  51. GetLastError is a number. What does it mean?
  52. How to filter out unwanted sounds via Fourier Transform
  53. The Fast Fourier Transform
  54. A difficult debugging scenario
  55. Getting parameters from inherited classes
  56. Creating a quick report from any cursor
  57. Binding to Internet Explorer Instances
  58. Strongly typed methods and properties
  59. How to use DEVMODE
  60. Computer music on the radio
  61. The .Object member
  62. What printers are available to your program?
  63. How do I backup files that are still in use without shutting down the application?
  64. Puzzle: Why does backing up a data file require web application shut down?
  65. Inheritance levels
  66. Foxpro Language into a table
  67. The mechanics of Sudoku
  68. Sudoku puzzles screen capture
  69. Move your "My Documents" folder
  70. Have you used remote assistance ?
  71. Use Windows 2003 Server and remote desktops for debugging
  72. Why a large picture works, but a small one fails?
  73. Enable crop and zooming in on your digital photograph display form
  74. Print method parameters are undocumented
  75. Interesting form paint behavior
  76. Puzzle: Creating an INDEX requires EXCLUSIVE use of the table, doesn't it?
  77. Remove double spaces from pasted code samples in blog
  78. Generating VBScript to read a blog
  79. Watch the Autocomplete values change as you enter data
  80. Internet Explorer wordwrap doesn't break at commas
  81. Reacting to Windows Session events.
  82. Creating shortcuts for fast access to programs and favorites
  83. Call GDI+ JPG manipulation from Excel, Word, Powerpoint, VB.NET
  84. Draw text or graphics directly onto a JPG file
  85. GDI+ can't handle some malformed JPG files
  86. ActiveX Controls don't treat Focus the same
  87. Accessing embedded files can have problems
  88. Create thumbnails of all your digital photos in a single table
  89. Simple demo of Customer/Orders one to many form with conflict detection and resolution
  90. VFP handles some images differently with GDIPlus
  91. New MSN Search Toolbar allows Tabbed Browsing
  92. Is your Outlook mailbox overflowing? TreeMap it!
  93. Bigger than Google: formatting very big numbers in Grids/Browse
  94. Watch out when you use another computer for a demo
  95. What is taking up the space on your hard disk? TreeMap it!
  96. Running out of space ? What's on your disk?
  97. SQL Select data from a text file
  98. Randy's Devcon Demo
  99. Data Entry for dates: autoincrement tip
  100. Write your own Task Manager
  101. Application logging and Error methods
  102. Activation Key
  103. Binding to Internet Explorer events: bug in Typelibrary
  104. What's the difference between Internet Explorer and Explorer?
  105. Word to audible speech
  106. Your VFP runtime splash screen
  107. Put your registry into a table
  108. Third Party application does work as a COM+ application
  109. Floating Point calculations: comparing with zero
  110. April Fool's Pranks
  111. Calling the Windows APIs for Large Files
  112. Memory Handles
  113. Sharing Disneyland Digital pictures
  114. Relaxen und watchen das blinkenlights. What lights?
  115. Undocumented APIs and 16 bit DLLs
  116. Intercept power broadcast messages: How do you tell if Bindevent is really successful? SendMessage!
  117. How to use a COM interface when there is no COM object ?
  118. Decoding the timestamp in class libararies and forms
  119. Heartbeat: Garbage collection in VFP and .NET are similar
  120. User Interface design for numeric keypads
  121. Permutations
  122. Wite your own RSS News/Blog aggregator in <100 lines of code
  123. Do you like reading a blog author? Retrieve all blog entries locally for reading/searching using XML, XSLT, XPATH
  124. Use a simple XSLT to read the RSS feed from a blog
  125. Binding to Windows Events for Fox windows

2004 41

  1. Interactively experimenting with controls: the Slider
  2. Fox plays music
  3. Foxpro Performance tip: field name lookup for tables
  4. Creating a VFP application as a service:
  5. Sending Christmas cards: Creating mailng labels automatically
  6. Using non-Automation compatible types
  7. Intellisense: inspecting live objects
  8. Unbelievable performance gain by changing an Algorithm
  9. Another customer problem: a product doesn't work with VFP
  10. Programmatically add a watch expression to the debug watch window
  11. Screen Saver Tricks
  12. Run your code in response to a new drive being inserted
  13. Using Outlook to manage new documents
  14. Creating, parsing, graphing web hit logfiles or other temporal data
  15. Very Advanced Debugging tips
  16. Give the impression that you're an expert and earn palpable respect
  17. Is a process hijacking your machine?
  18. The Plane Man
  19. A Happy Customer
  20. Cold Solder Joint
  21. Reboot from remote desktop
  22. Make an interactive screen saver
  23. Start your Screen Saver NOW!
  24. Form design shortcut
  25. Spy on your programs
  26. Print a t-shirt
  27. How to protect your web site pictures from being saved
  28. Hear your web site being hit
  29. Put a web browser on your desktop
  30. Harvesting blood
  31. Why was the original IBM PC 4.77 Megahertz?
  32. Sharing Digital Pictures of your friend's
  33. Ancestors and population paradox: exponential growth
  34. What is a C0000005 crash?
  35. Dr. Watson: Please send in your error report
  36. Disappearing Window Contents while dragging the mouse
  37. Designing User Interface for car keys
  38. Start using XML and XSLT to create HTML
  39. Blogs get 300 hits per hour: Visual FoxPro can count.
  40. I want my own email! MSN Premium
  41. Independence Day for blogging