Erik Porter (gravatar)

WindowsForms Rant

I don't rant very often, but there are a couple things really getting on my nerves so I figured I'd blog about them and see if anybody knows of any workarounds or maybe feels my pain.

<rant>

  • When setting the Focus of a Control in the Form's Load Event, it DOESN'T WORK!  Instead I have to go put it in the Activated Event with a Boolean around it to make sure it only calls it once.
  • Why is it that if I set the ControlBox Property of a Form to False AND set the FormBorderStyle Property to FixedDialog, I can still double click on the title bar of the form and it maximizes it?
  • Why is it that if I change the Font of the Form to say....Verdana, the Title Bar's Font doesn't change?  BTW, is there some Win32 API I can call to fix that?
  • Why are there no good and easy to use Wizard Controls out there?  ;)

</rant>

*Back to work in WindowsForms I go*

7 Comments

  • http&#58;&#47;&#47; (gravatar)

    http:// said
    December 11, 2003

    Hey Erik- 1- Some quick and easy tests (with textboxes) show that you can call select in the load event rather than focus and you should get what you are looking for. 2- This is a bug, I reckon. You could use the API to prevent it if you want. 3- This is a system wide setting in the Appearance section of the display properties. You probably don't want to change that, though I can see how it's annoying. 4- Because you haven't written one yet. ;-) Jacob

  • Thanks Jacob, I totally forgot about using the Select Method as a workaround! Matt...man, how did I miss that? :'( I'll definitely give that a go...thanks! :)

  • IIRR Ghengis has stuff for doing wizards too.

  • Hi, Your blog contains good info. Keep it up.

  • 3. Title Bar and other non-client area is with the windows OS and so are system wide settings. This is set in the display settings.

  • #3... yes, there is a way to change this. Remember the days (Office 98, I think) of adding a gradient brush to the title bar, same technique. The problem is that this is a system wide setting and therefore you aren't allowed to modify the 'standard' windows border. You can of course depart from the standard border and draw your own from scratch. ;-) Of course, in my oppinion, the result isn't worth the effort involved unless you are really changing the total look of your window.

Your Information
Mrs. Gravatar (gravatar)

<-- It's a gravatar

your comment