Calvin Hsia's WebLog

thoughts from a professional developer

Browse by Tags

Tagged Content List
  • Blog Post: Run your application forms on the web

    I received a customer question: I have looked all over the web and still searching, and found your blog. I have a very specific issue and I need to ask whether this is doable first of all and how to do it after. First of all, I need to make a foxPro app that wll also run as a web application...
  • Blog Post: Add an interactive map to your web page

    It’s pretty cool to play with the maps at http://Local.Live.com You can zoom in to various locations, add pushpins, save sets of pushpins as Collections. Aerial, Bird’s Eye and 3D view are fun too! When you sign in, your collections are visible from any browser on any computer. This...
  • Blog Post: 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 some text into a variable, then writes the variable to a file in the c:\Inetpub\WWWRoot folder. If you have Internet Information Server installed (on WinXP Pro choose Control Panel- Add/remove programs...
  • Blog Post: Analyzing Blog hit statistics

    It takes a lot of work to create the blog posts and code samples that I put in my blog, and I was curious about getting more detailed statistics about the posts. I already aggregate some statistics for Microsoft Bloggers (see What is a Microsoft MVP? Calvin's List updated for the new century )...
  • Blog Post: 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 of how to use the same steps to create...
  • Blog Post: Create a .Net UserControl that calls a web service that acts as an ActiveX control to use in Excel, VB6, Foxpro

    Here’s how you can use Visual Studio to create a .Net User Control that will act as an ActiveX control that can be used in Excel (or other Office application), VB6 or Foxpro. This will bring the power of the entire.Net Framework to your program. This sample uses a Web Service to look up zip codes. ...
  • Blog Post: Handling arbitrary strings in URLs: Escape, InternetCanonicalizeUrl, WinHttpCrackUrl and URI.EscapeUriString

    Sometimes a web application might want to put arbitrary strings into a URL, and make it a valid URL. The VBScript and JScript escape and unescape functions do just that. This sample shows how to use VBScript to escape and unescape a string. The escaped string looks like: http%3A//a.com/default...
  • Blog Post: Customizing the Blog Crawler for different formats

    I’ve had several requests that require customizing the Blog Crawler. The entire source code of the Blog Crawler is available , so it can be modified to crawl blogs other than http://blogs.msdn.com Currently, it saves the entire HTML retrieved from a blog’s URL. It converts relative links to...
  • Blog Post: How does EventHandler work? IConnectionPoint!

    The EventHandler function allows you to connect some code to an object’s event interface. For example, Word allows you to run code when the user changes the Selected text in a document . An ADODB Recordset will fire events, such as WillMove and MoveComplete when moving from record to record. The EventHandler...
  • Blog Post: The VB version of the Blog Crawler

    This is the VB.Net 2005 version of the Blog Crawler. It’s based on the Foxpro version , but.it uses SQL Server Everywhere so you can deploy it on your mobile device! It crawls a blog and stores all entries into a SQL Server Everywhere table. This includes blog comments and Cascading Style Sheets. ...
  • Blog Post: Use conditional build events to freshen zip files in Visual Studio

    I wanted to update a couple zip files of the VB version of my Blog Crawler (to be posted soon) with the latest and greatest when I built the Release version of a project. I used the XCOPY command with the /D option to update only if changed. Copying to a ZIP file extension actually puts the file into...
  • Blog Post: Webcrawl a blog to retrieve all entries locally: RSS on steroids

    Today’s sample shows how to create a web crawler in the background. This crawler starts with a web page, looks for all links on that page, and follows all those links. The links are filtered to my blog, but generalizing the code to search the entire web or some other site is trivial (if you have enough...
  • 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: Publishing blog statistics horror story

    I received an email from someone at Microsoft this morning about the availability of the Excel spreadsheet for internal Microsoft blogger December hit statistics. Last month I had written a program to show MS Bloggers hit statistics. So I ran the program including the new December XL file on my...
  • Blog Post: What is a Microsoft MVP? Calvin's List updated for the new century

    In this definition of Microsoft MVP on the Wikipedia is a description of a list that I maintained that helped me to earn the Microsoft Most Vocal Person award over a dozen years ago. I plugged in my modem and dialed up CompuServe daily to download foxforum messages (typically something like 800 per day...
  • Blog Post: Use Regular Expressions to get hyperlinks in blogs

    At Southwest Fox conference I presented a sample calling a VB.NET server to do regular expression matching . Here’s the sample I used. It gets some HTML from my blog and parses all the hyperlinks (looks for the HREF tags) and puts them into a VFP table: First create a VB server: A Visual Basic...
  • Blog Post: Why did I get an error while publishing Photos?

    I was publishing some photos/movies of my 27 month old son taking ski lessons (see Sharing Digital Pictures of your friend's ) and I received an unexpected error. I narrowed down the code to this fragment: CPATH= "c:\inetpub\wwwroot\" CREATE TABLE (CPATH+"temp") ( name c( 10 )) APPEND...
  • Blog Post: Generating VBScript to read a blog

    Sometimes I need to test something using VBScript . A user sends a code snippet and asks why it behaves a certain way. Examining the behavior in VB can help. Below is a VFP code sample which demonstrates VBScript code which uses several objects to read the RSS feed from my blog , do an XSLT transform...
  • 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...
  • Blog Post: Randy's Devcon Demo

    Randy is using my blog as part of a Demo at the Devcon keynote. He has some Fox code running from Outlook that allows the user to add RSS feeds that the user wants to subscribe to. Hopefully if his demo works, this message shows up in Randy’s Outlook folder in front of the live audience at the keynote...
  • Blog Post: Wite your own RSS News/Blog aggregator in <100 lines of code

    The internet is a great way for people/entities to publish information. An RSS reader is a tool to help funnel only the information that you think is important to you. You can subscribe to RSS sources (Blogs, news sites, businesses, authors) by choosing a button that says Syndication, RSS, or XML button...
  • Blog Post: Do you like reading a blog author? Retrieve all blog entries locally for reading/searching using XML, XSLT, XPATH

    If you like reading a particular blog and want to read more from the same author, you can subscribe to the blog using RSS and any number of blog readers, such as newsgator , intravnews . This will get a few current entries (RSS is limited to 15 entries ) and any subsequent ones, but how do you retrieve...
  • Blog Post: Use a simple XSLT to read the RSS feed from a blog

    On most Blogs, there is a link called “Syndication”,”RSS”, or “XML” that is the RSS feed. Click on that, and you see an XML document that contains some recent blog posts. This simple code reads the RSS feed for my blog, does an XSLT transform of the XML to a simple HTML file, and opens the HTML in IE...
  • Blog Post: How to protect your web site pictures from being saved

    A customer emailed me: As you are an expert I have the following question that maybe you know to answer. My wife is an artist making cards for every occasion. We have now the idea of selling these cards through internet. Showing these cards on a gallery page is one thing. This brings the risk that people...
Page 1 of 2 (28 items) 12