Partager via


Calvin Hsia's WebLog

thoughts from a professional developer

Use the DispatcherTimer, Popup and even a movie to enhance your data presentation

We can subclass the prior Windows Presentation Foundation (WPF) class called Browse that displays...

Author: CalvinH Date: 11/21/2007

Use DataTemplates and WPF in code to create a general purpose LINQ Query results display

In my last post, Use LINQ with WPF : Styles and DataTemplates in code, I showed how to use...

Author: CalvinH Date: 11/15/2007

Use LINQ with WPF : Styles and DataTemplates in code

Using Windows Presentation Foundation (WPF) and LINQ is easy in code. We'll create a query and...

Author: CalvinH Date: 11/12/2007

Customer site visit: 3-D printer company

I spent a few hours at a local company called 2Bot (https://www.2bot.com/) which makes a 3-D printer...

Author: CalvinH Date: 11/11/2007

Extract TreeView or ListView ImageList icons from a DLL

An ImageList can be used for a ListView or TreeView control to contain many images in a single file,...

Author: CalvinH Date: 11/06/2007

Create a WPF Form to choose a text color

I wanted to choose some nice colors for various kinds of text, so I wrote a simple text color picker...

Author: CalvinH Date: 10/26/2007

Resize your pictures for your phone or pocket pc

I have many digital pictures, and I'd like to put some of my favorites on my SmartPhone. However the...

Author: CalvinH Date: 10/12/2007

Generate and run PowerShell scripts dynamically

In my prior post Use new XML Features of VB to generate dynamic scripts and text files , we...

Author: CalvinH Date: 10/08/2007

Use new XML Features of VB to generate dynamic scripts and text files

There's a very useful feature that FoxPro users have had for over 2 decades: being able to output...

Author: CalvinH Date: 10/04/2007

Customize the display of types in the Debugger using Extension Methods and DebuggerDisplay Attribute

I was writing some code using System.Text.StringBuilder. : Dim sb As New StringBuilder("Init SB...

Author: CalvinH Date: 10/03/2007

Create your own web browser on your SmartPhone

Windows Mobile 5.0 comes with a Web Browser (v6 is due out any day now). It runs on Pocket PCs and...

Author: CalvinH Date: 10/01/2007

Customize your Windows Mobile SmartPhone home screen and Start Menu

My Smartphone (Cingular 2125) died the other day: actually the phone was fine: the SIM card needed...

Author: CalvinH Date: 09/28/2007

How to generate dynamic images for your web application

Typically, a web site might show some pictures. These could be pictures of items for sale from a...

Author: CalvinH Date: 09/11/2007

Querying Northwind with Group By bug fixed

In this post:...

Author: CalvinH Date: 09/05/2007

Use Stored Procedures when you can for efficiency

In this post (Install Northwind for SQL Express and use Visual Studio and DLINQ to query it ) I...

Author: CalvinH Date: 08/21/2007

Install Northwind for SQL Express and use Visual Studio and DLINQ to query it

SQLExpress is free and comes with Visual Studio, but the sample Northwind database isn’t included....

Author: CalvinH Date: 08/17/2007

Linq Queries for .Net Framework members

How many members in the .Net framework contain the string ‘file” ? Make a query like this: Dim q As...

Author: CalvinH Date: 08/16/2007

C# and Fox versions of Cool Linq Query

In my prior post (Cool Linq Query) I promised a C# and Fox versions of a query to sort all the...

Author: CalvinH Date: 08/13/2007

Cool Linq Query

Now that Visual Studio 2008 Beta 2 is out the door, I can write about some cool Linq Queries, and...

Author: CalvinH Date: 08/12/2007

It's easy to resize your disk volumes on Vista

On one of my Vista machines, I have a 140G hard drive partitioned into C (20g), D (80G) and E (40g)....

Author: CalvinH Date: 08/10/2007

Add an interactive map to your web page

It’s pretty cool to play with the maps at https://Local.Live.com You can zoom in to various...

Author: CalvinH Date: 08/08/2007

Why the order of shutdown events is important

Try running this code: PUBLIC xx xx=CREATEOBJECT("MyClass") quit && quit Foxpro DEFINE CLASS...

Author: CalvinH Date: 08/07/2007

Find which DLLs in your system are rebased

You can use CreateToolhelp32Snapshot and its family of functions to enumerate the running processes...

Author: CalvinH Date: 08/06/2007

DLL Image base addresses are the same in XP, different on Vista

When you start a program on your Windows XP computer, a process is created and several DLLs (Dynamic...

Author: CalvinH Date: 07/27/2007

SQL Select for most recent record

Suppose I have a table of test results with at least 4 columns: ID (unique integer) SuiteName (name...

Author: CalvinH Date: 07/16/2007

Enable people to run your programs without installing anything

Sometimes friends or relatives might hear that you’re an expert with using computers, and might ask...

Author: CalvinH Date: 06/19/2007

Help->About->System Info doesn't work on Vista

A customer (thanks Grady!) reported that choosing Help->About->System Info on Vista causes a...

Author: CalvinH Date: 05/29/2007

SQL Select puzzle to count failures and totals for each item

Suppose I have a table of 2 columns. One is the name of an item, the other a value indicating...

Author: CalvinH Date: 05/25/2007

The VB version of the Flip Task Bar for Vista Desktop Window Manager

In this post: Create your own Flip Task Bar with live thumbnails using Vista Desktop Window Manager...

Author: CalvinH Date: 05/22/2007

Write Fox code in Visual Studio that interacts with your VB.Net code

Run the Fox code in Allowing Optional parameters in your COM objects (or the one in Blogs get 300...

Author: CalvinH Date: 05/21/2007

Allowing Optional parameters in your COM objects

It’s simple to create a VFP object that can be used within other applications. I show how useful it...

Author: CalvinH Date: 05/16/2007

How to schedule your computer to run tasks automatically

Our building will have a power failure at a particular time. You may want your computer to stay on...

Author: CalvinH Date: 05/11/2007

What is Vista Aero?

I received a question regarding some of my recent posts on Vista: Forgive my ignorance, but where is...

Author: CalvinH Date: 05/09/2007

Create your own Flip Task Bar with live thumbnails using Vista Desktop Window Manager DWM

The sample below uses Desktop Window Manager under Windows Vista with Aero to get dynamic live...

Author: CalvinH Date: 05/06/2007

Vista Aero DWM seems to optimize out GDI paint calls

In this post: Foxpro Menu items, combo boxes not refreshing selected item under Aero in Vista I...

Author: CalvinH Date: 05/03/2007

Fun with Vista Aero using the DwmExtendFrameIntoClientArea

You can have a little fun with Vista Aero using the DwmExtendFrameIntoClientArea function. This will...

Author: CalvinH Date: 05/02/2007

Windows Vista Aero BorderStyle Paint problem as non Administrator

Above is an image of an inner form (from the C++ project below) before and after I dragged it a...

Author: CalvinH Date: 05/01/2007

Fix your forms to paint borders correctly under Vista Aero

Apparently, the borders of some forms don’t get painted correctly on Windows Vista. When executing a...

Author: CalvinH Date: 04/27/2007

Foxpro Menu items, combo boxes not refreshing selected item under Aero in Vista

If you’re running a Foxpro application under Vista when using Aero , you might encounter a problem...

Author: CalvinH Date: 04/26/2007

We received a bug report: STEPS TO REPRODUCE: 1) At the command window, issue the following: Choose...

Author: CalvinH Date: 04/18/2007

Add a manifest to control your application Vista UAC behavior

Try this on Windows XP or Vista (I don’t remember if manifests are allowed on Win2000: can someone...

Author: CalvinH Date: 04/13/2007

Why doesn't Microsoft Excel Spreadsheet control work?

We received a bug report: Steps to Reproduce : Open the form designer by creating a new form. Insert...

Author: CalvinH Date: 04/05/2007

The MVPs are coming!

I was quoted in this Computerworld article about the MVP summit, which is happening this week in...

Author: CalvinH Date: 03/12/2007

New printers are far more capable: Canon iP4300

Our several year old ink jet printer died the other day. It was an Epson Stylus Pro 5000. I knew it...

Author: CalvinH Date: 03/06/2007

How to log application API calls using import module addresses

Let’s log all the calls that Excel makes to open or create a file. Start Visual Studio (any...

Author: CalvinH Date: 02/26/2007

Another way to get data into a web page: using OleDB or ODBC

Here’s a way to get data into a web page to be viewed by a web browser. The code first spits out...

Author: CalvinH Date: 02/21/2007

Word did not seem to be working

I wanted to create a document, so I went to Outlook, which I always have running, and type Ctrl-N to...

Author: CalvinH Date: 01/12/2007

<Previous Next>