0

In Windows XP's CMD, the Luna border isn't applied to it. alt text http://wedowebstuff.info/uploads/1272861285CMDNotThemed%5D.png

Is it possible to do it in a similar way in Visual C# Winforms, for an application? I just wonder how it's done, of course I am not going to force any of my applications to not use the beautiful XP/Aero theme :P

Thanks.

edit: Adding a note to this after many months. The Luna border isn't applied to CMD due to the fact that it is technically a 16-bit (old) application, so it does not use the standard Windows theming system (nor windowing, as demonstrated by the fact that it cannot be maximized). Applications like this are common in 32-bit windows (16-bit apps were removed in x64 Windows builds), for example, sysedit. The fact that it has a properly themed window border (but note, not the inside controls) in Vista/7, is due to the fact that Aero/Desktop Window Manager (DWM) overrides all window borders and renders them. If we switch to the Basic/Classic theme, that inconsistency continues.

The x64 cmd.exe doesn't have this problem. :)

Jimmie Lin
  • 2,205
  • 2
  • 23
  • 35
  • I know this is an extremely old question, but if anyone comes here by accident, the 16 bit explanation is not really correct. Raymond Chen writes here https://devblogs.microsoft.com/oldnewthing/20071231-00/?p=23983 that the cmd is run under the ClientServer Runtime System (CSRSS), and CSRSS cannot be themed, due to security decisions. Have a good day! – Andy Apr 06 '22 at 23:29

1 Answers1

1

I don't know how to modify the border, but on a side note, I do know how you can control the appearance of controls. As far as I know (I am a Linux programmer so I have limited knowledge in this field), without XPCommonControls enabled, you will have "old-style" controls, but with it, you will have "nice" buttons that are styled with the system style settings.

Delan Azabani
  • 79,602
  • 28
  • 170
  • 210