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

Change pinned taskbar icon (windows 7)

EDIT The info below is a bit obsolete; all new Windows 7 bits are now available as a managed API, available here: http://code.msdn.microsoft.com/WindowsAPICodePack There is a series of articles on the new Taskbar API by the debugging guru Sasha Goldshtein. You should have a look at the Overlay Icons and Progress Bars API. You can … 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