Archive for September 2004

 
 

Skype

When Skype was rolled out and hyped by the media as a great Internet telephony app written by the guys that wrote KaZaA, I didn’t even want to give it a try. KaZaA is, after all, a piece of crap (from the software standpoint; I know it’s successful) that had a horrible UI and installed spyware on your machine.

However, a friend that has good taste in software has recommended that I give it a whirl, and I’m more than impressed:

1. It initiates phone calls very quickly. None of that MSN Messenger crap where if freezes for 5-10 seconds when you want to give somebody a call.

2. Sound quality is excellent and I haven’t experienced any breakups.

3. It works through firewalls and NATs without any problems.

The last part is nothing short of incredible. I was sitting at a client’s company behind a firewall and talking to a colleague that was in another company behind two NATs and a firewall, and the damn thing just worked.

The only drawback Skype has is that it taxes the CPU hard. So forget about compiling while you talk.

DataGrid Repaint/Layout Bug

Denver Hall wrote up the details on a DataGrid layout problem he’s seeing:

1. I have a form with a tab control. It has four tabs. It has a datagrid on one of the tabs with column headers. I have it docked to full (anchor still does this) in the tab. The default size of the form is less width than all of the columns. So, a horizontal scroll bar is showing. If I am on another tab and maximize the form, then click back on the tab with the datagrid, the horizontal scroll bar is still there. In the middle of the datagrid!

2. Form – 2 tabs, 1 datagrid set to dock fill on first tab. Add a datatable definition to get column headers. Make sure you form is less wide than the datagrid columns so the horizontal scrollbar shows. Also, make sure that when maximized the datagrid columns are less wide than the form. So, the horizontal scrollbar would not show. Then, go to the other tab and maximize the form. Then go back to tab 1.

3. Horizontal Scrollbar is in middle of datagrid

4. Horizontal Scrollbar should disappear

5. Still looking for a work around. That how’s I found your site.

I don’t use the DataGrid, so I’d appreciate it if somebody that lives in the database world confirm this and email me. Thanks.

Repaint Bug when Parent Panel is Disabled

Alexander Groß wrote some time ago about a bug with a Panel not repainting after its parent Panel’s Enabled property is set to false. He even included a nice sample app that demonstrates the problem.

Here’s Alexander’s message verbatim:

Hi Dejan,I am not sure if the behaviour I encounter is a bug or if it’s by design.

Maybe you can have a look at the demo and tell me if I understood something wrong or the framwork does not work correctly. My post to Microsoft’s newsgroup microsoft.public.dotnet.framework.windowsforms follows. It is not answered until today.

Hello everybody,

I encounter problems with the Enabled-property of panels and the propagation to subitems of the container.

Overview:

On a form there is one panel (named “A”), which surrounds all other controls on the form (except two buttons). Inside panel A lies a checkbox. Below this checkbox (and also inside A) panel B is located. The contents of panel B should only be enabled if the checkbox is checked and enabled.

To implement this behaviour I attached an event handler to the CheckedChanged-event of the checkbox. This handler enables panel B if the checkbox is checked. A handler for the EnabledChanged-event sets panel B enabled if the checkbox is checked and also enabled.

Below panel A there are two buttons:

- Button A toggles the Enabled-property of panel A. Panel A also changes the Enabled-property of its contained controls (checkbox and panel B). This propagation should be possible due to the fact that it is documented on MSDN.

- Button B toggles the Enabled-property of the checkbox. The EnabledChanged-event of the checkbox is fired and Panel B’s Enabled-property is also toggled.

So far so good. The problem is, that it is not working as expected.

- Initially all controls are enabled and the checkbox is checked.

- If you click button B, the checkbox and panel B are disabled. A repeated click on button B enables them again. Correct.

- If button A is clicked, panel A is disabled. This deactivation is propagated to the checkbox, which is disabled and then fires EnabledChanged.

The handler disables panel B as well. But panel B’s contents are not redrawn (i.e. the controls remain visually enabled). If you force to redraw panel B’s contents (by dragging the window out of the screen area) the correct state is displayed.

Did I misunderstand the meaning of the Enabled-property or is this behaviour by design?

For illustration purposes I wrote a little demo. Feel free to download the sourcecode at http://it99.dyndns.org/axl/forms.zip

Best regards,

Alex

PS: Your site is great. I enjoyed reading the blog very much :)

Alexander Groß

Dipl.-Ing. (BA) für Informationstechnik

AlexanderGross@gmx.de

http://www.it99.org/axl

Wired: +49 (0) 3 41 / 47 84 97 70

Cellular: +49 (0) 1 75 / 410 72 68

ICQ# 36765668

I’ve added this as bug #23 in the bug registry.

Thanks Alexander!

Life in suburbs linked to obesity

The company I do most of my business with has its headquarters in Lombard, one of Chicago’s suburbs. Every time I visit them I get the notion that if I lived there I’d be fatter than a polar bear. The place is so spread out that it’s impossible to go anywhere on foot, so I end up driving everywhere. You don’t see pedestrians anywhere.

Now this article confirms my suspicion.