如何在Windows 10中始终显示滚动条

By default, Windows 10 hides scrollbars in Windows Store apps when they’re inactive. When you move your mouse, the scrollbars reappear. If you find this behavior annoying, you can turn it off and have Windows 10 always show scrollbars in Store apps.

默认情况下,当Windows 10应用程序处于非活动状态时,它们会隐藏它们。 当您移动鼠标时,滚动条会重新出现。 如果您发现此行为很烦人,可以将其关闭,并使Windows 10始终在“商店”应用中显示滚动条。

Microsoft added the ability to disable hiding scrollbars in Windows Store apps in the April 2018 Update. If your PC is updated with the latest build, preventing Windows from automatically hiding scrollbars is easy.

Microsoft在2018年4月更新中添加了禁用Windows Store应用程序中隐藏滚动条的功能。 如果您的PC已更新为最新版本,则很容易防止Windows自动隐藏滚动条。

Hit Windows+I to open Settings. If you prefer the scenic route, click Start and then click the setting cog.

点击Windows + I打开设置。 如果您喜欢风景优美的路线,请单击开始,然后单击设置齿轮。

In the Settings window, click the “Ease of Access” category.

在“设置”窗口中,单击“轻松访问”类别。

On the left side of the Ease of Access screen, click the “Display” option. On the right, turn off the “Automatically Hide Scroll Bars In Windows” toggle to make sure your scrollbars don’t disappear anymore.

在“轻松访问”屏幕的左侧,单击“显示”选项。 在右侧,关闭“在Windows中自动隐藏滚动条”开关,以确保您的滚动条不再消失。

Now that you’ve disabled the scrollbar from hiding when inactive, it will always be visible for any Windows Store app, as well as some built-in apps like Edge, Settings, and even the Start menu.

现在,您已经禁用了滚动条,使其在不活动时隐藏起来,它对于任何Windows Store应用程序以及某些内置应用程序(如Edge,Settings甚至“开始”菜单)始终都是可见的。

If you decide that you do like this feature after all, follow these steps again to re-enable it.

如果您确定自己确实喜欢此功能,请再次执行以下步骤以重新启用它。

翻译自: https://www.howtogeek.com/365325/how-to-always-show-scroll-bars-in-windows-10/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是一个 Windows 滚动条的示例代码: ```c++ #include <windows.h> LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { // 注册窗口类 WNDCLASS wc = {0}; wc.lpfnWndProc = WndProc; wc.hInstance = hInstance; wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wc.lpszClassName = TEXT("ScrollDemo"); RegisterClass(&wc); // 创建窗口 HWND hwnd = CreateWindow(TEXT("ScrollDemo"), TEXT("Scroll Demo"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 400, 300, NULL, NULL, hInstance, NULL); // 显示窗口 ShowWindow(hwnd, nCmdShow); UpdateWindow(hwnd); // 消息循环 MSG msg; while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return (int)msg.wParam; } LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { static int yPos; static SCROLLINFO si = {0}; si.cbSize = sizeof(si); si.fMask = SIF_RANGE | SIF_POS | SIF_PAGE | SIF_TRACKPOS; si.nMin = 0; si.nMax = 1000; si.nPos = 0; si.nPage = 100; switch (msg) { case WM_CREATE: SetScrollInfo(hwnd, SB_VERT, &si, TRUE); break; case WM_VSCROLL: switch (LOWORD(wParam)) { case SB_LINEUP: yPos = si.nPos - 10; break; case SB_LINEDOWN: yPos = si.nPos + 10; break; case SB_PAGEUP: yPos = si.nPos - si.nPage; break; case SB_PAGEDOWN: yPos = si.nPos + si.nPage; break; case SB_THUMBTRACK: yPos = HIWORD(wParam); break; default: break; } yPos = max(0, yPos); yPos = min(si.nMax - (int)si.nPage + 1, yPos); if (yPos != si.nPos) { si.nPos = yPos; SetScrollInfo(hwnd, SB_VERT, &si, TRUE); ScrollWindow(hwnd, 0, -(si.nPos - yPos), NULL, NULL); } break; case WM_PAINT: { PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); RECT rc; GetClientRect(hwnd, &rc); for (int i = 0; i < 100; i++) { TCHAR buf[16]; wsprintf(buf, TEXT("%d"), i); TextOut(hdc, rc.left + 10, rc.top + i * 20 - si.nPos, buf, lstrlen(buf)); } EndPaint(hwnd, &ps); } break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hwnd, msg, wParam, lParam); } return 0; }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值