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. :)
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.
Related
This is only an issue if you have Drop Shadows turned off in appearance settings.
I noticed some of our applications form windows had no borders. Specifically they have been missing the 1 pixel thick border for the left part, right part and bottom part of the form window. All of the forms had in common that they were using FormBorderStyle FixedToolWindow or SizableToolWindow. When it is like this it is hard to distinguish where one dialog stop and another one begins.
We find it plausible that some of our users will have their computers set up like this without the ability to change it.
Is there a way to get the dialog windows looking better without doing anything crazy like manually drawing all borders?
Quoting part of a comment by Hans Passant:
By design for Win10, the left/bottom/right borders are transparent. Still quite visible against the large drop-shadow, so visible that is hard to tell that the border is transparent...
Our application has its own grahpical style that made it especially hard to distinguish where one dialog stops and the other one begins.
The quick solution for us was to stop using FormBorderStyle FixedToolWindow or SizableToolWindow.
Long term we are going trough all our dialogs and the graphical style of our application to make the dialogs more easily distinguishable from each other with or without borders.
For a while now I have attempted to get into UI design with WPF. My main goal is to create a good-looking application in a borderless window, like for example:
I made this example using the MetroUI framework. While this framework does the trick on borderless window functionality, it also does way too much for my tastes, custom controls, skins, animations, etc. I just want a borderless window and decide everything else myself.
I've searched stackoverflow a lot, and tried a fair amount of frameworks, but nothing seems to suit my needs.
Basically, I would like to have a borderless window with FULL windows functionality (drag to sides to pin, only show shadow if operating system settings has it on, etc etc).
Putting WindowStyle to None but keeping AllowsTransparency at False in order to preserve the original window chrome makes most if not all of the functionality I am seeking for work. However, the obvious problem here is: the window chrome is still there.
This looks like this:
To finally ask my question:
Can we keep all the current functionality that this window chrome provides, but somehow make it invisible (yet keep the dropshadow it provides) ? I can live without the dropshadow but it would be a nice bonus.
Or to ask a more broad question: is there any framework / pre-made project, that simply ONLY handles making a borderless window work properly and no other additional controls, skinning, ... ?
The more time I put into this the more it seems making borderless windows with WPF is simply incredibly clunky and I am getting rather unmotivated on my entire project because of this.
Thank you
See my answer on the following thread, it pretty much sums up all the window issues at once. Hope it helps!
WPF Borderless Window issues: Aero Snap & Maximizing
I'm trying to find some way to draw large-DPI UI glyphs in WinForms with visual styles. For example, if I have the DPI set to 100% in windows, no matter how I try to draw a styled radio button, it ends up looking like this: If I increase the DPI to 150% in windows, the radio buttons look nice and big:
I can't find any way to draw the large-DPI radio button above, without changing the windows user-profile-wide DPI setting. I do not want large UI elements in any other apps. Here are the things I tried (unsuccessfully) so far:
Forms' AutoScale* properties - do not affect UI glyph size
Graphics.ScaleTransform() before calling UI glyph drawing routines - does not affect UI glyph size if visual styles are enabled
ControlPaint methods - allows me to draw scaled UI glyphs but only without visual styles ()
Using VisualStyleRenderer directly - no way (that I know of) to change the drawn UI glyph sizes
Solutions I'm avoiding:
Embedding pre-rendered UI glyphs in executable - I need my app to follow the selected windows user-profile-wide visual style, so this approach would quickly get very complex and hard to maintain, as future windows versions will add different visual styles.
Switching to WPF - client requires WinForms and the amount of refactoring that would be involved will be ridiculous (this is a fairly large app)
So is there any way to do this given the above two constraints? Maybe somehow tricking the VisualStyleRenderer or somehow forcing DPI for a single process? Any ideas, tips, and WinAPI hacks welcome.
I am interested in implementing Custom Chrome into one of my C# Applications. As i kept searching the internet for libraries that already took care of the main code, i found this: http://wpfwindow.codeplex.com/ . However, this is from 2009 and we are now in year 2014. I am also using Visual Studio 2013 Express for Windows Desktop.
I wanted to know if this resource is outdated, or can it still be implemented today? I am trying to achieve an effect like this:
but, i would like the windows close, minimize, etc. buttons as well as the titlebar in place. Is there any way i can achieve this effect without having to completely rewrite the form?
Something like below, but with custom colors for the header, and the form buttons. I would also like to have the option to remove certain buttons (and keep only the close button)
I also noticed this "Warning" for the essential window: Complete customization of WPF window can be done only when AllowsTransparency is set to "True", which causes that the window is software rendered which might be not as fast GPU rendering. This also made me skeptical on if i should use it or not.
Recap
1) I wanted to know if this resource is outdated, or can it still be implemented today?
2) Is there any way i can achieve this effect without having to completely rewrite the form?
3) Would customizing the entire form make the rendering slower?
I've got a question but not sure if its possible. Is it possible to change the Windows 7 Window colour from .Net.
So this isn't the content of the window as that is easy i'm talking about the header title itself and allow the .Net app make the header transaperant like you can have in Window 7 and change the colour too etc.. Is there some sort of Window api that i can hook into to do this that anyone knows of.
The reason i want to do this is in Window you can obviously set your theme and window colours but i want my app to have all dialogs with the same sort of styling so i can change the window content but the window header i can't and if the user has set their window colour to a strange colour then it looks strange against my themed app.
Thanks for any help in advance.
Iffy.
i can't and if the user has set their window colour to a strange colour then it looks strange against my themed app.
That should be left up to the user, and you should not change settings that are explicitly set by the user for their operating system installation. This will drive more users away. If this is for your own personal use then it would be okay, but don't change a users Windows settings (of any kind).
If it really looks that bad, you should consider a custom skinned Window for your application only.
Yes, it's possible. This is a MSDN article describing it:
http://msdn.microsoft.com/en-us/library/bb688195%28VS.85%29.aspx
The code is in C++ but it should be easy to get it working in C#