Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Visual Studio   (RSS)

How fast is interop code?

How fast is interop code? If you’re in one kind of code and your calling another, what is the cost of the interop? For example, .Net code can call native C++ code (like Windows APIs) and vice versa. Similarly with Foxpro and C++ code. .Net code is often

Examine .Net Memory Leaks

Writing programs using .Net is very productive. One reason is because much of memory management is “managed” for you. In C, C++ and other “native” languages, if you allocate memory, you’re responsible for freeing it. There were stopgap measures, like

Persist user form size and location settings per session

My prior post ( Create your own Test Host using XAML to run your unit tests ) shows how to create a form and present it to the user. The user can resize and reposition the form, even on a 2 nd monitor. When the user exits the form, we can persist or remember

Create your own Test Host using XAML to run your unit tests

A few days ago, somebody came into my office and plopped down a box. It seemed very light. He said that it was a new PC. I thought hmmm…. The box seems empty…Why am I getting a new PC?. Apparently an inventory was made and my current hardware was at the

Use Visual Studio Test framework to create tests for your code

While writing software over a period of weeks or months, various components of the software get completed at various times. You’ve tested and you’re satisfied they work, and you move on to develop another feature. Or you might check in the source code

Use XLINQ to query the references in your project

Visual studio creates project files for you for the various languages, such as C++, C#, VB. These files are XML format, and can thus be queried. Try this: open any non-temporary Visual Studio project (see Use temporary projects in Visual Studio ) , right
Posted by Calvin_Hsia | 2 Comments
Filed under: , ,

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 String" ) At a breakpoint the debugger Locals Window shows + sb {System.Text.StringBuilder} System.Text.StringBuilder If I expand by clicking on the "+",
Posted by Calvin_Hsia | 5 Comments
Filed under: , ,

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 SmartPhones. That browser only allows one web page to show at a time: to show another page, you have to navigate away from the current page. I created a
Posted by Calvin_Hsia | 1 Comments
Filed under: , ,

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

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 posted a fairly complex SQL command. Of course, it’s important to keep in mind that a more efficient way of executing this query may be by keeping all the

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. You can download sample databases Northwind and Pubs from http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46a0-8da2-eebc53a68034&displaylang=en
Posted by Calvin_Hsia | 6 Comments
Filed under: , ,

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 hits per hour: Visual FoxPro can count. ) to create a versatile Fox server called T1.DLL. You can use that server in VS to execute Fox code. The VB.Net sample
Posted by Calvin_Hsia | 1 Comments

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

Use a different kind of grid in your applications

My prior post ( Create a .Net UserControl that calls a web service that acts as an ActiveX control to use in Excel, VB6, Foxpro ) shows how to create a .Net control that you can use in VFP or VB6 that takes advantage of the .Net framework. Here’s an example
More Posts Next page »
 
Page view tracker