Thursday, April 28, 2005

Really stupid web site tricks?

What I refer to, is Julian Bucknall's post on Stupid Web Site Tricks - about how nutty it is when good links are usually orphaned during a site re-org.

Turns out Microsoft is one of 'em. I had, in my Optimizing Web Applications article, linked to the Microsoft Web Application Stress Tool which has been moved from here to here. Grrr.

Maybe they don't want us to find it, and buy some of their non free tools instead. Well, they should hide it where no one can find it, instead of playing hide-and-seek with the links.

Btw, I've reorg-ed my site a few times, and I'm guilty of not really maintaining any links either - but all of MY past has some excuse for it.

Optimizing web applications - white paper

After reading Dan Miser's post about the ISAPIThreadPool unit, I dug up an article I'd written long back...and managed to reformat it so I could make it public. Well, here it is at http://www.agnisoft.com/white_papers/optimizingwebapps/. Cheers, have fun, and let me know what you think!

Tuesday, April 26, 2005

Multiple windows in Delphi

From a recent thread in borland.public.delphi.nativeapi.win32:

There's a problem in the way Delphi handles multiple open forms. Delphi applications can have multiple forms, and you will notice that each form does not appear on the task bar. Delphi forms do not have the WS_EX_APPWINDOW style set - this style is required if a window needs to appear in the task bar. But there is one icon, isn't there? That's the icon of the Delphi "Application" - and clicking on it in the task bar simply focusses the main window (or any other modal window above it)

If you need your "other" windows to appear in the task bar, then you can do this: Override the CreateParams procedure in your other forms, and write this code in there:

procedure CreateParams(var Params: TCreateParams); override;
...
procedure TForm1.CreateParams(var Params: TCreateParams);
begin
inherited;
Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
Params.WndParent := GetDesktopWindow;
end;


Now, if you're doing this, you probably are writing applications where ndividual windows behave independently of the "main" form. You might notice that suddenly, the main form comes up in FRONT of the other top level form, like when showing hints or displaying dialog boxes from them. Reason: Delphi's Application variable is the culprit - it handles a lot of things including hint display, Dialog box messages etc. When it gets these messages, the main form gets activated, for some reason.

Fix: Don't just make your "other" forms with WS_EX_APPWINDOW. Make ALL your top level forms have that style, including your main form. (Use the same logic for the main form). Then, REMOVE the WS_EX_APPWINDOW style from the "Application" - using this code:



SetWindowLong(Application.Handle, GWL_EXSTYLE,
GetWindowLong(Application.Handle,GWL_EXSTYLE)
and not WS_EX_APPWINDOW
or WS_EX_TOOLWINDOW);


You'll have a lot less trouble then.

Friday, April 22, 2005

Jedi again - JvDesktopAlert

Yet another lesser known JVCL component - TJvDesktopAlert. You know those little popups that Outlook 2003 brings up from the System Tray? Well, here's how you can do it too. Just drop the TJvDesktopAlter component on your form and you're done. Here's the demo app:





And here's how it looks:


Pretty nifty, I thought. Another one of them hidden gems....

Thursday, April 21, 2005

Object Picker dialog in Delphi

I was going through thecodeproject.com, and came across an article: Using the Windows 2000/XP Object Selection Dialog. Basically, this is the dialog in Windows XP/2000 that allows you to choose users,groups and/or computers to grant (or deny) access to resources, such as files, folders, etc.

If you want to show this in your application, you can, using the IDsObjetPicker.InvokeDialog. If this looks like greek to you, simply download the JVCL and use the TJvObjectPickerDialog.

The JEDI online help for this function is sketchy. Actually it's near non-existant, but the CodeProject and MSDN references give you enough to work with.

But if you just want to see it in action, here are the steps:

  1. Drop a TJvObjectPickerDialog instance on your form.
  2. Double click the Scopes property and add a Scope.
  3. For this scope, set ScopeTypes.stTargetComputer to True, and DownLevelFiler.dlUsers to True.
  4. Right click on the TJvObjectPickerDialog and click Preview.




That should do it. JVCL is just AWESOME - there's so much in there that you can use but it's a little difficult to find. In my next few blog posts I hope to demonstrate the use of some of these components.

Wednesday, April 13, 2005

Search agnisoft.com!

I finally got down to doing this.

You can now Search agnisoft.com. Whoopee!

(Applause)

(Bow)

Google avatars and their platforms

Did you know you could actually go to http://www.google.com/microsoft and http://www.google.com/linux? What this does is searches for whatever keyword you type in, plus "microsoft" or "linux". Not that earth-shattering, but when I first saw it, what came my mind was a google search dedicated to....

Anyhow, I figured it out today after I found my company web page had been visited from the microsoft link. Right now, I'm researching google code, which looks interesting. Stay tuned....

Tuesday, April 12, 2005

An Online Share Trading Game?

ICICI Direct has an Online Share Trading Game which, in my humble opinion, sucks. That's not a share trading game, that's a bloody advertisement! I guess we're in the age of NOT providing value, and this is just part of the ball game. Jeez.

I have a friend who had created a web site that was entirely focussed on the blogging for the Indian cellphone user - and there are a few million of such users now. The idea wasn't all that unique - a "moblog" so to speak. But one of the biggest Indian Cellphone companies backed off the sponsorship because they wanted the site to be restricted to only their users - i.e. you couldn't post your "moblog" if you weren't their subscriber. And this, apart from the fact that they would get ad space everywhere for their money, and would be featured on the whole offline launch. What they wanted it to be was a massive ad-campaign for them.

I think that's a little short sighted, but when have big companies known to be visionaries in their field?

When they were small, that's when. Maybe becoming big gives you cataract. Or blurred vision, at least.