How to make a WPF Window to blink on the taskbar?

Here’s one possible solution: http://www.jarloo.com/flashing-a-wpf-window/ In the code sample, two extensions methods are created for the Window class: FlashWindow and StopFlashingWindow: private const UInt32 FLASHW_STOP = 0; //Stop flashing. The system restores the window to its original state. private const UInt32 FLASHW_CAPTION = 1; //Flash the window caption. private const UInt32 FLASHW_TRAY = 2; //Flash … Read more

Pinning a Java application to the Windows 7 taskbar

I don’t have Windows 7 but here is something that might get you started: On the Java side: package com.stackoverflow.homework; public class MyApplication { static native boolean setAppUserModelID(); static { System.loadLibrary(“MyApplicationJNI”); setAppUserModelID(); } } And on the native side, in the source code of the `MyApplicationJNI.dll library: JNIEXPORT jboolean JNICALL Java_com_stackoverflow_homework_MyApplication_setAppUserModelID(JNIEnv* env) { LPCWSTR id … Read more

How to hide a JFrame in system tray of taskbar

import java.awt.*; import java.awt.event.*; import javax.swing.JFrame; import javax.swing.UIManager; /** * * @author Mohammad Faisal * ermohammadfaisal.blogspot.com * facebook.com/m.faisal6621 * */ public class HideToSystemTray extends JFrame{ TrayIcon trayIcon; SystemTray tray; HideToSystemTray(){ super(“SystemTray test”); System.out.println(“creating instance”); try{ System.out.println(“setting look and feel”); UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); }catch(Exception e){ System.out.println(“Unable to set LookAndFeel”); } if(SystemTray.isSupported()){ System.out.println(“system tray supported”); tray=SystemTray.getSystemTray(); Image image=Toolkit.getDefaultToolkit().getImage(“/media/faisal/DukeImg/Duke256.png”); ActionListener … Read more

Win32: full-screen and hiding taskbar

Edit 2. There is even a better way for doing fullscreen, the chromium way, source taken from here: http://src.chromium.org/viewvc/chrome/trunk/src/ui/views/win/fullscreen_handler.cc?revision=HEAD&view=markup void FullscreenHandler::SetFullscreenImpl(bool fullscreen, bool for_metro) { ScopedFullscreenVisibility visibility(hwnd_); // Save current window state if not already fullscreen. if (!fullscreen_) { // Save current window information. We force the window into restored mode // before going fullscreen … Read more

How to make Eclipse behave well in the Windows 7 taskbar?

Specify the latest available Java VM in your eclipse.ini. I.e.: -vm jdk1.6.0_10\jre\bin\client\jvm.dll Make sure they are on separate lines Anything after the “vmargs” is taken to be vm arguments (More info) Or alternatively add the java bin folder to your Windows PATH before the “windows32” folder, because otherwise eclipse uses “javaw.exe” in the win32 folder … Read more