Windows desktops move window

Windows desktops move window

Функция MoveWindow изменяет позицию и габариты определяемого окна. Для окна верх-него уровня, позиция и габариты — относительно левого верхнего угла экрана. Для дочернего окна, они — относительно левого верхнего угла рабочей области родительского окна.

hWnd
Идентифицирует окно.
X
Устанавливает новую позицию левой стороны окна.
Y
Устанавливает новую позицию верхней части окна.
nWidth
Устанавливает новую ширину окна.
nHeight
Устанавливает новую высоту окна.
bRepaint
Определяет, должно ли окно быть перекрашено. Если этот параметр — ИСТИНА (TRUE), окно принимает сообщение WM_PAINT. Если параметр — ЛОЖЬ(FALSE), никакого перекрашивания какого-либо сорта не происходит. Это применяется к рабочей области, нерабочей области (включая строку заголовка и линейки прокрутки) и любой части родительского окна, раскрытого в результате перемещения дочернего окна. Если этот параметр — ЛОЖЬ(FALSE), прикладная программа должна явно аннулировать или перерисовать любые части окна и родительского окна, которые нуждаются в перерисовке.

Возвращаемые значения
Если функция завершилась успешно, возвращается значение отличное от нуля. Если функция потерпела неудачу, возвращаемое значение — ноль.

Замечания
Если параметр bRepaint — ИСТИНА (TRUE), Windows посылает сообщение WM_PAINT оконной процедуре немедленно после перемещения окна (то есть функция MoveWindow вызывает функцию UpdateWindow). Если bRepaint — ЛОЖЬ(FALSE), Windows помещает сообщение WM_PAINT в очередь сообщений, связанную с окном. Цикл сообщений посылает сообщение WM_PAINT только после диспетчеризации всех других сообщений в очереди. Функция MoveWindow посылает в окно сообщения WM_WINDOWPOSCHANGING, WM_WINDOWPOSCHANGED, WM_MOVE, WM_SIZE и WM_NCCALCSIZE.

Смотри также
SetWindowPos, UpdateWindow, WM_GETMINMAXINFO, WM_PAINT

Размещение и совместимость MoveWindow

Moving to a Windows 10 PC

Making the move to a new Windows 10 PC? We’re happy you’re here and we’ve got you covered.

This guide will help you discover the best Microsoft has to offer and help you transfer your favorite files and apps to your new device so you can get up and running quickly, and get back to doing what you love.

If you’re on a Windows 7 device, note that support has ended and we recommend you move to a Windows 10 PC to stay secure. Learn more about the Windows 7 end of support and how to get Windows 10.

Step 1: Learn the benefits of a modern Windows 10 PC

Shopping for a new PC? Watch videos about common device-related terms you might come across in your research, including storage types, graphics processing units, and more.

Regular updates are built in to Windows 10, meaning you’ll always have the latest features. Explore what‘s new in the latest Windows 10 updates.

Get customized info about your current Windows 7 PC health and performance with the Guide to Windows 10 app (for Windows 7 devices).

Читайте также:  Windows server 2016 как сделать ярлык remoteapp

Step 2: Purchase your new PC

For quicker startup times, longer battery life, and more responsive apps, a new PC has you covered. Find a new PC that fits your needs.

Step 3: Sign in with Microsoft to streamline your experience

Never forget a password again. Get personal access to all things Microsoft with a single, secure sign-on, plus get free OneDrive storage to help you move your files to your new PC. Good news—if you have an Xbox or Office account, you may already have a Microsoft account. You can also sign in with any email to get started.

Step 4: Bring your files and favorites with you

There’s no need to leave your files or browser favorites behind. Bring them with you to your new PC using one of the following options. We recommend using OneDrive so your files are backed up and protected in the cloud.

Select your current version of Windows to find instructions on how to move your files.

MoveWindow function (winuser.h)

Changes the position and dimensions of the specified window. For a top-level window, the position and dimensions are relative to the upper-left corner of the screen. For a child window, they are relative to the upper-left corner of the parent window’s client area.

Syntax

Parameters

A handle to the window.

The new position of the left side of the window.

The new position of the top of the window.

The new width of the window.

The new height of the window.

Indicates whether the window is to be repainted. If this parameter is TRUE, the window receives a message. If the parameter is FALSE, no repainting of any kind occurs. This applies to the client area, the nonclient area (including the title bar and scroll bars), and any part of the parent window uncovered as a result of moving a child window.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

If the bRepaint parameter is TRUE, the system sends the WM_PAINT message to the window procedure immediately after moving the window (that is, the MoveWindow function calls the UpdateWindow function). If bRepaint is FALSE, the application must explicitly invalidate or redraw any parts of the window and parent window that need redrawing.

How to move windows across Virtual Desktops on Windows 10

Windows 10 introduced built-in functionality for Virtual Desktops. Even if you don’t use multiple monitors, virtual desktops can be very handy when you want to switch from work to play or vice versa. You can create many virtual desktops and enjoy multitasking at another level. But most people are unaware of the fact that opened windows in one desktop can be moved to other desktops as well. In this post, we’ve discussed how to move windows and apps across Virtual Desktops on Windows 10. Towards the end of the post, we’ve reviewed a tool called MoveToDesktop that lets you do so in a better way.

Move windows across Virtual Desktops

The process is pretty basic and simple. You will be able to it very easily by following these steps:

Open a few programs which you want to move to some other virtual desktop.

Hit the ‘Task View’ button beside the Cortana icon in the taskbar.

Next, click on the ‘New Desktop’ button to add as many virtual desktops as you want.

Now right-click a window and then select ‘Move to’ and then from the options offered, select the desired desktop.

Читайте также:  Как запустить восстановить windows через биос

Alternatively, you can simply drag the window and drop it on the desired desktop.

There are a few other options also available. You can right-click a window and then select ‘Show this window on all desktops’. Selecting this option will show a particular window on all virtual desktops. This feature comes in handy when you have an application that you want on the screen irrespective of virtual desktops.

There is also another option available that lets you show all windows from an app on all the desktops. This option offers a more consistent setup across all the virtual desktops. These settings can be similarly reverted back anytime.

NOTE: To create a new virtual desktop, press Win+Ctrl+D. Then you can switch between your desktops by pressing Win+Ctrl+Left or Right Arrow.

MoveToDesktop tool

Why bother to even open Task View? MoveToDesktop is a small utility that moves windows from one virtual desktop to another. Once the application is running, you can right-click the title bar of any window and then select ‘Move to’. And then choose the desktop you want to move this window to.

This tool makes it simple to move applications and even looks like as if it was built into Windows OS by default. You can move all the applications and even create new desktop with just a few clicks. This tool offers a faster method and if you want to skip using Task View.

Click here to download MoveToDesktop from GitHub.

We would have loved this tool even more if there was a provision to create hotkeys to move applications.

How to use multiple desktops in Windows 10

Source: Windows Central

Windows 10, now enjoying the October 2020 Update, continues to make it extremely easy to set up and use multiple virtual desktops in Windows 10. Multiple desktops are great for keeping unrelated, ongoing projects organized, or for quickly hiding from the boss that browser game you can’t stop playing. And if you’ve not yet upgraded to Windows 10, be sure to have a look at our collection of the best Windows laptop options with the latest OS.

Ready to tackle the day with multiple desktops? Let’s go!

How to create a new virtual desktop in Windows 10

Creating a new virtual desktop can be done with a couple of clicks or with a keyboard shortcut.

Click the Task View button in your taskbar.

  • You can also use the Windows key + Tab shortcut on your keyboard, or you can swipe with one finger from the left of your touchscreen.

Click New Desktop. (It’s located in the top left corner of your screen.)

Source: Windows Central

That’s it. Easy, right? There’s also a Ctrl + Windows key + D keyboard shortcut that will immediately create a new virtual desktop.

How to switch between virtual desktops in Windows 10

Now that you’ve created a new virtual desktop, you can quickly switch a few different ways.

Click the Task View button in your taskbar.

  • You can also use the Windows key + Tab shortcut on your keyboard, or you can swipe with one finger from the left of your touchscreen.

Click Desktop 2 or any other virtual desktop you’ve created.

Source: Windows Central

You can switch back to your original desktop at any time by following the above steps but choosing Desktop 1. There’s also a Ctrl + Windows key + Left and right arrow keyboard shortcut that you can use to switch between virtual desktops. Using a device with a touchpad? You can perform a four-finger swipe left or right to switch between virtual desktops.

How to move windows between virtual desktops in Windows 10

There are two ways you can move windows between virtual desktops. First, you can click and drag windows; second, you can right-click the window and use the menu.

Читайте также:  How to remove bars on windows

Click-and-drag method

Click the Task View button in your taskbar.

  • You can also use the Windows key + Tab shortcut on your keyboard, or you can swipe with one finger from the left of your touchscreen.
  • Click and hold the window you want to move.

    Drag and release the window on an alternate desktop.

    Source: Windows Central

    Right-click menu method

    Click the Task View button in your taskbar.

    • You can also use the Windows key + Tab shortcut on your keyboard, or you can swipe with one finger from the left of your touchscreen.

    Right-click on the window you’d like to move to another desktop.

    Source: Windows Central

    Click the desktop to which you’d like to move the window.

    Source: Windows Central

    You can move windows back and forth between desktops to your heart’s content.

    How to duplicate windows across virtual desktops

    Certain windows or collections of windows from one app can be duplicated across all virtual desktops.

    Click the Task View button in your taskbar.

    • You can also use the Windows key + Tab shortcut on your keyboard, or you can swipe with one finger from the left of your touchscreen.

    Right-click an active window.

    Source: Windows Central

    Click Show windows from this app on all desktops to duplicate all windows from one app.

    Source: Windows Central

    How to remove a virtual desktop in Windows 10

    Want to get back to just one desktop? No problem.

    Click the Task View button in your taskbar.

    • You can also use the Windows key + Tab shortcut on your keyboard, or you can swipe with one finger from the left of your touchscreen.
  • Hover your cursor over the desktop you’d like to remove.

    Click the X in the top-right corner of the desktop icon.

    Source: Windows Central

    Open and running windows in a desktop you close will be moved back to your original desktop. You can also use the Ctrl + Windows key + F4 keyboard shortcut to immediately close the virtual desktop you’re currently viewing.

    More Windows 10 resources

    For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:

    The Dell XPS 15 is our choice for best 15-inch laptop

    For a lot of people, a 15-inch laptop is a perfect size that offers enough screen for multitasking, and in a lot of cases, some extra performance from powerful hardware. We’ve rounded up the best of the best at this size.

    Halo: MCC’s live service elements make it better, not worse

    Halo: The Master Chief Collection is more popular than ever, but some fans don’t agree with the live service approach 343 Industries has taken with it. Here’s why those elements are, at the end of the day, great for the game and for Halo overall.

    Microsoft’s Surface Duo is not ‘failing up’

    Microsoft announced this week that it was expanding Surface Duo availability to nine new commercial markets. While Surface Duo is undoubtedly a work in progress, this is not a sign of a disaster. It’s also doesn’t mean that Surface Duo is selling a ton either. Instead, the reason for the expansion is a lot more straightforward.

    These are the best PC sticks when you’re on the move

    Instant computer — just add a screen. That’s the general idea behind the ultra-portable PC, but it can be hard to know which one you want. Relax, we have you covered!

  • Оцените статью