Welcome to MSDN Blogs Sign in | Join | Help

August 2006 - Posts

Does the VFP ODBC driver support subdirectories?

I received a question from a customer: I don't know how to search for this but does ODBC, specfically Visual FoxPro support opening tables in a subdirectory? ODBC is very old.. OLEDb is much more recent. In any case, the answer is yes, the ODBC driver
Posted by Calvin_Hsia | 6 Comments
Filed under:

Create an ActiveX control using ATL that you can use from Fox, Excel, VB6, VB.Net

Creating an ActiveX control is a good exercise in understanding how one works. It also helps to have full control over its source code for learning and testing purposes. A customer asked about migrating legacy ActiveX controls over to .Net. Many controls

Dynamically attaching a debugger

Sometimes something goes wrong with your program and you want to investigate why. You can start Visual Studio, choose Debug->Attach to Process and choose the process you want to debug. (The dialog also allows remote debugging and choosing Native, Managed,
Posted by Calvin_Hsia | 4 Comments
Filed under: , ,

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
Posted by Calvin_Hsia | 3 Comments
Filed under: ,

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
Posted by Calvin_Hsia | 0 Comments
Filed under: ,

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
Posted by Calvin_Hsia | 8 Comments
Filed under: ,

Bug: a readonly left-aligned textbox has a floating point number whose value changes

Here’s an interesting bug report. The code below shows two readonly textboxes on a form, both containing floating point values. The first is left-aligned. When you hit tab from the first textbox, the value changes from 4.011 to 4.000 If you change the
Posted by Calvin_Hsia | 2 Comments
Filed under:

Problems reading and writing to the same file stream

I was helping a friend fix a problem that occurred in a VB.Net application. Upon inspection, an XML file was somehow invalid. The last few bytes were wrong. We found the code that modifies the file. It takes the original file, replaces a string with another
Posted by Calvin_Hsia | 1 Comments
Filed under: , ,

Why Do ToolTips Appear in Task Manager?

I was asked why Tooltips appear in Task Manager . I happened to be out of the country when the question was asked, so I had to wait til I got back to the office to investigate. Sure enough, tooltips show up in Task Manager, under the Applications tab.
Posted by Calvin_Hsia | 1 Comments

Host the CLR and Generate IL to call a MessageBox

Here’s some C++ code to host the CLR. It’s an alternative to using COM Interop (s ee A Visual Basic COM object is simple to create, call and debug from Excel ), or using a User Control (see Create a .Net UserControl that calls a web service that acts
Posted by Calvin_Hsia | 6 Comments
Filed under: ,
 
Page view tracker