Skip to content

Instantly share code, notes, and snippets.

View qianlifeng's full-sized avatar
🎯
Focusing

qianlifeng qianlifeng

🎯
Focusing
View GitHub Profile
@yougg
yougg / awesome_launchers.md
Last active January 8, 2026 11:44
Awesome Desktop Quick Launchers (order by github stars)
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use tauri::{Manager, Window};
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust!", name)
}
@Aetopia
Aetopia / Bypassing SetForegroundWindow(HWND hWnd) Restrictions.md
Last active January 3, 2026 16:22
Bypassing SetForegroundWindow(HWND hWnd) Restrictions

Bypassing SetForegroundWindow(HWND hWnd) Restrictions

Aim

I wanted to list/document the various methods use by people to bypass restrictions within Windows for the function SetForegroundWindow(HWND hWnd).

What does SetForegroundWindow(HWND hWnd) do and what restrictions are set it in place for it?

SetForegroundWindow(HWND hWnd) brings the specified window into the foreground, activates it and keyboard input is direct towards that window.

SetForegroundWindow(HWND hWnd) also has the following criteria either of which must be fulfilled to call the function.

Bypassing The Restrictions