Monthly Archives: January 2006

FAQ: what to do if you meet “invalid code” when doing registration

Some people may meet “invalid code” when doing registration. When this happens,  don’t worry immediately. Take a breath and have a look at the vista outside window.

 

plants

 

There may be several things you can consider:

a. If you are an old customer, and your code doesn’t work on new version, then the code may be out of date. You can send email to our support for help. We will give you a new code.

b. If you are new customer, then maybe the software version you used is out of date. You can always download the latest version from our web site and try again.

c. Make sure when you input the exact registration code. Don’t input any addtional characters besides the code.

d. If still failing to get registered, feel free to ask us for help.

Hope this can helps. :)

How to put a child window on Overlay window

From windows 2000 above, Windows supports a new kind of window style: WS_EX_LAYERED. This window style can draw window in semi-transparency or use to make irregular window.

SetLayeredWindowAttributes and UpdateLayeredWindow are two Windows APIs that relate to overlay window.

Layered window can have two drawing modes. One is the tranditional WM_PAINT message handling by the window itself. The other one is by setting a bitmap to the window by calling UpdateLayeredWindow, then windows will handle the drawing or updating of the window. The application itself will not even recieve the WM_PAINT message.

Now there is a problem. What if I put a child window on such a bitmap based layered window? I have tried to add a simple edit window as the child window of the layered window. The edit window can be created, but it cannot draw itself on the layed window.

After doing such research, I found a post on faking child window for a layered window. The basic idea is to create another popup window that will hold the edit control. When the layered window moves, move the popup window with it. So it looks just like child window.

 

On Vacation

Hi, Dear customers:

We will be on vacation for about two weeks from Jan. 21.

I will try to respond any email ASAP. Please be patient.

But I have blogging entries scheduled. Don’t forget to continue reading.

Cheers!

 

 

Audio Recording in web browser

Some customers ask how to do recording in web browser (IE) with Active Audio Record component.  It is quite doable since Active Audio Record is implemented as an ActiveX object and supports scripting. IE has well support for ActiveX via java script or VB script.

We have provided html demo that shows how to create the record object and start/stop recording in IE. See details in the demo version. (DemoVBScripttest.htm)

Some people asked if it is possible to record audio on client computer in ASP.Net. Well, this may be a misunderstood concept. ASP.Net is server script, which means the script is running on server. To record the audio on client side, the audio recording component has to run on the client side. This is the way our demo shows.

When recording is finished, the audio file can be uploaded to server by HTTP PUT.

Html To Image Command Line version

Some customers are interested in a command line version of Html To Image.

We do have such version. Currently it is provided with our ActiveX component product html snapshot. You can download the trial package here. There is a batch program with Delphi source code in DemoDelphiBatch. 

Batch is a command line example of Html Snapshot.
Usage:
BatchGet.exe urllist ouputfolder

urllist is a text file with url list. One url per line
outputfolder is the output directory of images.
strings.ini is the configuration file of the tools. You can control some parameters for snapping.

The ActiveX version of Html To Image allows the customer to have most flexible control on “convert html to image”.

 

WordPress plugin

One good thing of word press is that it has support for plugins. Plugins are script written by others that can enhance the functionality of word press.

Here are some useful plugins:

Keyword plugin: this plugin inserts meta keyword tag for every post.

Adsense plugin: this plugin helps do adsense easily.

Originally I was looking for a spell checker plugin for word press 2.0. Seems no such plugin yet.

Then I tried the spell checking feature in the google toolbar. Seems it can meet my requirement too.

Following is the snapshot of spell checking by google toolbar. It is interesting to see Google doesn’t add “google” as a word in their spell checker. :)

spellchecker.JPG

short note on GetBitmapHandle

grass In our Html Snapshot, there is a method GetBitmapHandle, which is to return an in-memory bitmap after a successful SnapUrl call. This method is useful when user wants to add some post processing to the image converted from html. For example, you may want to add your customer watermark text or image onto the html image or you want to clip out selected region of the image.

Here is the definition of the method.

HBITMAP GetBitmapHandle().

You can see the return value of it is a windows bitmap handle. Experienced programmers would ask a question: who will release the handle? Yes, the design here is that the caller MUST release the handle with a Win32 API call DeleteObject. If not, the handle will be leaked,whichwill lead to out of memory problem if there are lots of repeated call.

If you are using .Net programming languages such as C# or VB.Net, you have to use the interop service provided by .Net platform. The DeleteObject API can be imported into C# as follows.

        [DllImport("gdi32.dll")]
        public static extern bool DeleteObject(
            IntPtr handle
            );

Then it can be used just like a normal C# static method. There is a working demo in DemoC#GetAPage in the trial package of html snapshot.

 

Html Snapshot 2.1.2006.111 released

Dear customers:  

This is the first release of the 2006. We are still committed to improve Html snapshot in this year to provide you the best “html to image” converter component.

Here are some changes:

1. Update the C# demo showing how to use the GetBitmapHandle and DeleteObject.

 

2. Provide a signed .Net assembly Htmlsnap2Net.dll, which can be added into to global assembly cache.

3. Add support to meta refresh tag.

Following is the VB Demo. It shows converting MSN.com into jpg files.

get a page