For Cocoa, you can set the window level using:
[window setLevel:NSFloatingWindowLevel];
A floating window will display above all other regular windows, even if your app isn't active.
If you want to make your app active, you can use:
[NSApp activateIgnoringOtherApps:YES];
and
[window makeKeyAndOrderFront:nil];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…