Calvin Hsia's WebLog

thoughts from a professional developer

Browse by Tags

Tagged Content List
  • Blog Post: Automatic tests protect your code

      Last month   in   Dynamically create huge tooltips in WPF TreeView and ListView I showed some code that creates large tooltips to present lots of data.   Today, we’ll talk about creating automatic tests for this feature.   Testing User Interface features has been difficult...
  • Blog Post: Dynamically create huge tooltips in WPF TreeView and ListView

      Tooltips are useful. When the mouse hovers over a button a tip can indicate what happens when it’s clicked. The mouse move does not actually invoke the button, but can give information in a passive way.   Sometimes I want to make huge tooltips. This essentially gives more screen real estate...
  • Blog Post: Synchronize your files across machines with Mesh

    I have a collection of almost 30,000 pictures and videos. When I add new pictures to the collection, I had been running a script file to synchronize the collection across various machines. for %%s in (\\calvinh6\e$ \\calvinh3\e$ \\calvinh4\e$) do ( robocopy /s /fp %2 %1 %%s\pictures\%1 ...
  • Blog Post: Magnify your pictures using a PictureBox so that you can zoom with the Mouse Wheel

    Today’s digital cameras take pictures with much higher resolution than many computer screens. My Canon PowerShot SD800 IS camera takes pictures at 3072 x 2204 resolution. One of my laptops died recently, and I noticed that local laptop retailers have machines with 1280 X 1024 resolution. I much...
  • Blog Post: Compress and timestamp your pictures to gain disk space

    I was running out of space again on my notebook. As years go by, digital cameras can take pictures with more megapixels, but that means they take up more space. Thus my pictures from 10 years ago are much smaller than this year’s. Since I have multiple copies of my picture collection (28...
  • Blog Post: Uninstall VB6 causes error message: You do not have a license to use this control

    I was running out of disk space on one of my machines, so I used my TreeMap program to see where I could delete files to save space. I saw that I still had VB6 on the machine, and I didn’t need it on that machine any more, so I uninstalled it. It's amazing how little disk space VB6 occupied...
  • Blog Post: Use WPF and inline XAML in your Fox, Excel or VB6 applications

    My prior post showed how to create XAML WPF and put it on your Winform App. We can go one step further: add XAML to a UserControl, which could then be made into an ActiveX control, which could be hosted by Fox, VB6, or Excel. Start Visual Studio 2008 ( as admin on Vista !! : (to register for...
  • Blog Post: Use LINQ to Foxpro or any SQL data and display it in a WPF form using DataSetExtensions and DataRowExtensions

    In the last post Create your own media browser: Display your pictures, music, movies in a XAML tooltip , we created a query of your local media and displayed it. Today, we'll make a query to my Foxpro picture database of 28,000 pictures/movies. We'll make the query result structure to be similar...
  • Blog Post: Create your own media browser: Display your pictures, music, movies in a XAML tooltip

    In my prior post , I showed how to use XAML and XAMLReader to create inline XAML to display the results of a query. Today, let's take it a step further: let's create a query of all the media (pictures, movies, music) in your "My Documents" folder and display the names and sizes in a ListView. As...
  • Blog Post: 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 files are much higher resolution than the device's display. This means the files take a lot more memory on the phone, and they take longer to process. I wrote some code to resize the images automatically...
  • Blog Post: 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 catalog, personal photos, etc. Usually, the web author places these pictures as files in a directory on the web server, and just puts links to them in the authored web pages. This scheme doesn’t easily...
  • Blog Post: 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 DWM , I showed Fox code on creating your own Flip Task bar Here is the VB.Net version that does the same thing… File->New->Project->Visual Basic->Windows->Windows Forms Application...
  • Blog Post: 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 was on its way out, so I had been researching printers a little recently. I knew that printer quality and features had been growing substantially in recent years. I found a review by M. David Stone...
  • Blog Post: Timestamp digital pictures

    I was given several dozen digital photos that I wanted to add to my collection. However, the camera used did not have the date/time set. Worst still, each time the camera was turned on, the camera clock started ticking from the same time (1/1/2004 midnight). With certain display modes of my picture...
  • Blog Post: Play movies with an ActiveX control

    I’ve been using Canon Powershot cameras for years, and they take movies in AVI format as well as being a good camera. I store my photos and movies in the same folders, and use the same database to store them. To display the movies, I add a Windows Media Player ActiveX control. There have been...
  • Blog Post: Various ways to display multiple photographs: on a Fox form

    My prior 2 posts show how to display multiple photos on a VB.Net form, first using the PictureBox control, the second drawing to the form directly. Below is some code to display multiple photos on a Fox form using an array of Fox Image controls . These controls are windowless: you can use Spy++ to verify...
  • Blog Post: Various ways to display multiple photographs: Using Rects and thumbs

    My prior post showed how to use an array of PictureBox controls to display multiple photographs on a form. Now we’ll do something similar, but instead of using the PictureBox control, which is a little bit heavyweight, we can just draw directly onto the form. This code uses a foxpro table of already...
  • Blog Post: Various ways to display multiple photographs

    You can use an array of PictureBox controls to display multiple photographs or other images. The sample below subclasses the PictureBox control and puts an array of them on a form. You need to change the PixPath to point to a directory with your digital photos. (For an easy way to run the sample...
  • Blog Post: Creating your own web browser for your SmartPhone

    I like my Cingular 2125 SmartPhone (see Windows SmartPhone can run my Web Apps ). I went to Microsoft TechFest a couple weeks ago, which is put on by Microsoft Research to show off the latest and greatest. Several people had the same phone, and more than a couple indicated that this phone was a...
  • Blog Post: Windows SmartPhone can run my Web Apps

    I took my family to Whistler for some great skiing. Because our cell phones didn’t work too reliably when we were there before Christmas, we decided to get new cell phones to replace our 2 year old analog cell phones. Communications was quite simple and reliable with the new phones. My Cingular...
  • Blog Post: Recompress your digital pictures to save space

    I have 23,000 digital pictures and movies taking many gigabytes of storage from the past decade or so. The more recent ones are larger, because higher resolution cameras were more readily available. I have a few copies of the entire collection on various computers for backup. I would like to save some...
  • Blog Post: Collecting pictures for yearbook, Ektaflex

    Not even three months of school have passed, and I’ve already received a request for school photos for the yearbook. Simple: bring up my VFP Picture Query program , type in “School”, date range since September 2005, and presto: a SQL Select query of my 23,000 picture database resulting in the photos...
  • Blog Post: Why a large picture works, but a small one fails?

    In my last post Enable crop and zooming in on your digital photograph display form there is code that seemed to work just fine for me, but failed for others. I subsequently fixd the code in that post to call ValidateRect , which works around the problem. It turns out that the size of the JPG mattered...
  • Blog Post: Enable crop and zooming in on your digital photograph display form

    I wanted to add the ability to zoom into a portion of a photograph on my photo viewer. Below is some code that processes the MouseUp, MouseDown and MouseMove events to add a yellow dotted-dash selection rectangle using a Shape control that the mouse can resize over the desired portion of a picture to...
  • Blog Post: Internet Explorer wordwrap doesn't break at commas

    I was modifying my web based thumbnail image viewer. Under each thumb I wanted the description of the photo. I wanted the photos to have captions below, and the unit to be rendered horizontally so they will fill the IE width. However, Internet Explorer will not break a line to wordwrap text after a comma...
Page 1 of 2 (34 items) 12