Catatan
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba masuk atau mengubah direktori.
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba mengubah direktori.
Banyak browser web mendukung konsep penjelajahan "InPrivate", di mana riwayat pengguna tidak disimpan.
Untuk memastikan bahwa Recall tidak menyimpan riwayat penjelajahan pengguna Saat dalam mode seperti ini, aplikasi Anda dapat menggunakan SetInputScope fungsi , mengatur cakupan input ke IS_PRIVATE.
Penting
Aplikasi Anda juga harus memiliki handler protokol http atau https yang sudah terdaftar sebelum SetInputScope mendukung perilaku yang dijelaskan dalam artikel ini.
[DllImport("msctf.dll", SetLastError = true)]
private static extern int SetInputScope(IntPtr hwnd, InputScope inputScope);
private new enum InputScope : int
{
IS_DEFAULT = 0,
IS_URL = 1,
IS_FILE_FULLFILEPATH = 2,
IS_PRIVATE = 61 // Input is treated as private data.
}
private void EnterInPrivateMode()
{
// Get your HWND. This will vary based on your UI Framework. WPF can use WindowInteropHelper, passing in your current Window.
IntPtr hwnd = new WindowInteropHelper(this).Handle;
// Then, set the input scope on the HWND to private
SetInputScope(hwnd, InputScope.IS_PRIVATE);
}
private void ExitInPrivateMode()
{
// Get your HWND. This will vary based on your UI Framework. WPF can use WindowInteropHelper, passing in your current Window.
IntPtr hwnd = new WindowInteropHelper(this).Handle;
// Then, set the input scope on the HWND to default
SetInputScope(hwnd, InputScope.IS_DEFAULT);
}
Aplikasi Anda harus menangguhkan penyediaan aktivitas pengguna saat pengguna berada dalam mode penjelajahan "privat".
Windows developer