titlebar

Draw Custom Buttons on Windows Vista/7 Aero Titlebar

杀马特。学长 韩版系。学妹 提交于 2019-11-28 21:38:39
I found this question on StackOverflow . Basically, the user wanted to draw custom buttons on the titlebar. I tried the code and realised it works in vista/7 only when Aero is disabled. My question is, is there any way to draw custom buttons on the titlebar while aero is enabled? Also, is there any way of reading information from the current theme so I can style my buttons to match the already existing ones. Update Here is a screenshot from my computer demonstrating the above concept. I got the additional titlebar buttons after installing DisplayFusion. And I know DisplayFusion is a .NET

How to Change Color of NSWindow Title Bar in OSX

一曲冷凌霜 提交于 2019-11-28 17:05:41
After a Long search regarding the NSWindow title bar color and title color, i have found a easy drawing solution. I posting this to share my knowledge. Sub class a NSView with name MyTitleView and add the following code - (void)drawString:(NSString *)string inRect:(NSRect)rect { static NSDictionary *att = nil; if (!att) { NSMutableParagraphStyle *style = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; [style setLineBreakMode:NSLineBreakByTruncatingTail]; [style setAlignment:NSCenterTextAlignment]; att = [[NSDictionary alloc] initWithObjectsAndKeys: style, NSParagraphStyleAttributeName,

WinAPI: Create resizable window without title bar, but with minimize/maximize/close buttons (as Firefox/Chrome/Opera)

五迷三道 提交于 2019-11-28 17:05:33
If you look at the windows of the browsers Firefox, Chrome or Opera, you'll notice that their windows have minimize/maximize/close buttons are resizable but have no title bar I'm interested: how can I create such a window? What I have already tried: I looked around on StackOverflow (and googled, too), and found this: opening a window that has no title bar with win32 Unluckily, this didn't help completely: The first step was to extend the solution proposed on opening a window that has no title bar with win32 hWnd = CreateWindow(szWindowClass, szTitle, WS_BORDER, CW_USEDEFAULT, CW_USEDEFAULT, CW

Tabs in title bar: what's the secret?

本小妞迷上赌 提交于 2019-11-28 16:42:36
Chrome and Firefox 4, among other applications, now put some of their user interface in the title bar. In Windows, the OS normally controls the entire title bar. An application can create a custom title bar by removing the OS title bar and drawing a "fake" title bar instead (like WinAmp), but only the OS knows how to draw the non-customized elements of the title bar (e.g. Close/Minimize/Maximize), which vary by OS version. By what mechanism do apps like Chrome and Firefox "share" the title bar with the OS (put custom elements in the title bar while keeping the original OS visual theme)? In

How can I use NSVisualEffectView in window's title bar?

一世执手 提交于 2019-11-28 16:35:20
In OS X Yosemite, Apple introduced a new class NSVisualEffectView . Currently, this class is undocumented, but we can use it in Interface Builder. How can I use NSVisualEffectView in the window's title bar? Here's example: in Safari, when you scroll, the content appears under the toolbar and titlebar with a vibrance and blur effect. Nikolai Nagornyi @sgonzalez's answer forced me to explore NSWindow.h file where i found titlebarAppearsTransparent property. So we get: class BluredWindow: NSWindow { override func awakeFromNib() { let visualEffectView = NSVisualEffectView(frame: NSMakeRect(0, 0,

How to change the title icon of a Windows Forms application

人盡茶涼 提交于 2019-11-28 13:22:27
How do I change the title icon of a Windows Forms application? SLaks Set it in two places: The Icon: dropdown in Project properties -> Application The Icon property of the main form (startup form). 来源: https://stackoverflow.com/questions/17489497/how-to-change-the-title-icon-of-a-windows-forms-application

How to change the title of a browser page which a servlet streamed a PDF to?

走远了吗. 提交于 2019-11-28 08:32:10
My Java based webapp has a servlet which streams PDF content back to the browser based on request parameter. e.g. user clicks on an A tag with an href of "myApp/FetchPDFServlet?id=123". Servlet mapping picks up request, streams PDF data to response as mime-type application/pdf, closes flushes buffers. However the browser title bar for the page displaying the PDF reads "FetchPDFServlet?id=123" How can I change the title the browser displays for the page that displays the PDF? So the browser title is "Here is the amazing PDF" not "FetchPDFServlet?id=123". Is it possible at all? How best to do

How can I set a title that starts with comma, semicolon or equal sign?

心不动则不痛 提交于 2019-11-28 08:25:55
问题 Obviously it is possible to set title that contains cmd's standard delimiters but through TITLE command looks impossible to set a title that starts with a delimiter. It is possible to create a new instance of CMD with such title: start "==" cmd.exe but not possible for the same instance. It is possible also with .NET and Console.Title property but when it's called from batch file the tile lasts as long as the compiled exe runs: @if (@X)==(@Y) @end /* JScript comment @echo off setlocal for /f

Changing the color of the title bar in WinForm

谁都会走 提交于 2019-11-28 04:40:23
Is it possible to change the color of the title bar of a WinForm in C#? __________________________ [Form1_______________-|[]|X] <- I want to change the color of this | | | | | | |__________________________| Aravind I solved this problem. This is the code: [DllImport("User32.dll", CharSet = CharSet.Auto)] public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); [DllImport("User32.dll")] private static extern IntPtr GetWindowDC(IntPtr hWnd); protected override void WndProc(ref Message m) { base.WndProc(ref m); const int WM_NCPAINT = 0x85; if (m.Msg == WM_NCPAINT) { IntPtr hdc = GetWindowDC(m

Android: The progress bar in the window's title does not display

与世无争的帅哥 提交于 2019-11-28 03:28:39
I have a web view to override the built-in browser and I want to show a progress indicator on the title bar. This is the code: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().requestFeature(Window.FEATURE_PROGRESS); setContentView(R.layout.browser); currentURL = BrowserActivity.this.getIntent().getExtras().getString("currentURL"); try { mWebView = (WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.setWebViewClient(new browserActivityClient()); setProgressBarIndeterminateVisibility(true);