
Quote from PGSuni on October 24, 2021, 8:05 pmI want to create a sidebar where other windows cannot enter below or be above. That is, they can only reach the edge of the sidebar. The sidebar should always be visible. Is this possible?
I want a small app like this but for my own tasks.
Thanks in advance for your reply
I want to create a sidebar where other windows cannot enter below or be above. That is, they can only reach the edge of the sidebar. The sidebar should always be visible. Is this possible?
I want a small app like this but for my own tasks.
Thanks in advance for your reply

Quote from Vadim on October 24, 2021, 9:01 pm@pgsuni
Yes, you can get the size and position of the main application window and control its state.
See commands GetWindowPos, SetWindowPosAnd also plugin commands:
hpwSendKeys (Hans-Peter Wickern).
zmFunctions 1.0b (Peter Pavlov)
rlFunctions 2.6s (Reynold E. Lariza)
ksFunctions (Igor R.)
Yes, you can get the size and position of the main application window and control its state.
See commands GetWindowPos, SetWindowPos
And also plugin commands:
hpwSendKeys (Hans-Peter Wickern).
zmFunctions 1.0b (Peter Pavlov)
rlFunctions 2.6s (Reynold E. Lariza)
ksFunctions (Igor R.)

Quote from PGSuni on October 24, 2021, 10:32 pmThanks.
I looked at GetWindowPos, SetWindowPos I think I understand how it works. However, I don't know where to find the [AppID]? I tried: sidebar, sidebar.pub, sidebar.exe, SideBar (title)
Unfortunately, I don't understand exactly what to expect here.GetWindowPos "sidebar" "[X]" "[Y]" "[W]" "[H]"
GetWindowPos "[AppID]" "[X]" "[Y]" "[W]" "[H]"I understand a lot already, but it caught me :-(
Thanks.
I looked at GetWindowPos, SetWindowPos I think I understand how it works. However, I don't know where to find the [AppID]? I tried: sidebar, sidebar.pub, sidebar.exe, SideBar (title)
Unfortunately, I don't understand exactly what to expect here.
GetWindowPos "sidebar" "[X]" "[Y]" "[W]" "[H]"
GetWindowPos "[AppID]" "[X]" "[Y]" "[W]" "[H]"
I understand a lot already, but it caught me :-(

Quote from Vadim on October 25, 2021, 7:55 am@pgsuni
The [AppID] variable is populated when using the Run or RunInRectangle commands:
https://winhelp.visualneo.com/Applications.html#SETWINDOWPOSIf you want to control application windows that have been run by the user separately from your project, look at plugins. They allow to get identifiers (HWND descriptors) of top windows in the system and manage them.
The [AppID] variable is populated when using the Run or RunInRectangle commands:
https://winhelp.visualneo.com/Applications.html#SETWINDOWPOS
If you want to control application windows that have been run by the user separately from your project, look at plugins. They allow to get identifiers (HWND descriptors) of top windows in the system and manage them.

Quote from PGSuni on October 26, 2021, 8:23 pmThank you for dealing with me :-)
APP PROPERTIES / ACTIONS / STARTUP:
Run "notepad.exe" "" "Normal+RunOnce" "" "[AppId]"
SetWindowPos "[AppId]" "0" "0" "200" "200"With this solution, I can adjust the size and position of another EXE window launched by my program. Am I correct?
However, I want to set the position and size for my own basic program.
Eg aligned to the left side of the screen, then aligned to the right side at the touch of a button.I attached a picture
Thank you for dealing with me :-)
APP PROPERTIES / ACTIONS / STARTUP:
Run "notepad.exe" "" "Normal+RunOnce" "" "[AppId]"
SetWindowPos "[AppId]" "0" "0" "200" "200"
With this solution, I can adjust the size and position of another EXE window launched by my program. Am I correct?
However, I want to set the position and size for my own basic program.
Eg aligned to the left side of the screen, then aligned to the right side at the touch of a button.
I attached a picture
Uploaded files:
Quote from Vadim on October 26, 2021, 9:06 pm@pgsuni
Try this demonstration file. To test it, compile it first and run the compiled application (not F9, that is, you should not run the test compilation, but the compiled application). This is required because the SetWindowPos command uses the filename of the application which has a postfix in the test compilation.
I used the zmFunctions 1.0b plugin (Peter Pavlov) to get the desktop coordinates. The English version of the plugin is available here:
https://visualneo.com/forum/topic/loc-file-for-zmfunctions
Try this demonstration file. To test it, compile it first and run the compiled application (not F9, that is, you should not run the test compilation, but the compiled application). This is required because the SetWindowPos command uses the filename of the application which has a postfix in the test compilation.
I used the zmFunctions 1.0b plugin (Peter Pavlov) to get the desktop coordinates. The English version of the plugin is available here:
Uploaded files:
Quote from PGSuni on October 26, 2021, 9:58 pmOK now that's how I'm starting to understand :-)
The zmFunctions 1.0b plugin (Peter Pavlov) looks good for several things :-)
Thanks for the help.
OK now that's how I'm starting to understand :-)
The zmFunctions 1.0b plugin (Peter Pavlov) looks good for several things :-)
Thanks for the help.
Quote from Gaev on October 27, 2021, 12:49 am@pgsuni
However, I want to set the position and size for my own basic program.
Eg aligned to the left side of the screen, then aligned to the right side at the touch of a button.There are predefined variables for this ... you will find them on this Help page ... Predefined Global Variables (visualneo.com)
... including ...
[WindowLeft] The screen Y location of the upper left of the publication window.
[WindowTop] The screen X location of the upper left of the publication window.
[WindowWidth] The width of the publication window including the border and scroll bars (if any).
[WindowHeight] The height of the publication window including the title bar, border and scroll bars (if any).
[WindowState] The display state of the publication window (Normal, Minimized or Maximized).[PubWidth] The width of the interior of the publication window (the client area).
[PubHeight] The height of the interior of the publication window (the client area).
However, I want to set the position and size for my own basic program.
Eg aligned to the left side of the screen, then aligned to the right side at the touch of a button.
There are predefined variables for this ... you will find them on this Help page ... Predefined Global Variables (visualneo.com)
... including ...
[WindowLeft] The screen Y location of the upper left of the publication window.
[WindowTop] The screen X location of the upper left of the publication window.
[WindowWidth] The width of the publication window including the border and scroll bars (if any).
[WindowHeight] The height of the publication window including the title bar, border and scroll bars (if any).
[WindowState] The display state of the publication window (Normal, Minimized or Maximized).[PubWidth] The width of the interior of the publication window (the client area).
[PubHeight] The height of the interior of the publication window (the client area).

Quote from Vadim on October 27, 2021, 8:07 amYes, these variables are used in the example above. The plugin is only needed to get the size of the desktop area not hidden by the taskbar.
Yes, these variables are used in the example above. The plugin is only needed to get the size of the desktop area not hidden by the taskbar.

Quote from PGSuni on October 27, 2021, 9:37 pmThank you both :-)
Now I can position and manage both my own and external windows.However, something is not right yet:
Using this, realtime prints as I move, resize the windows, so it's OK.
WindowLeft: [WindowLeft]
WindowTop: [WindowTop]
WindowWidth: [WindowWidth]
WindowHeight: [WindowHeight]
WindowState: [WindowState]
ScreenHeight: [ScreenHeight]
ScreenWidth: [ScreenWidth]However, when I say the window should be MAXMINIZED, unfortunately the dimensions are not good.
The upper left corner is at -8 -8 pixels.
And width isn’t really what it should be.The resolution of the monitor at which it starts: 2560x1440 pixels.
Pure mystery :-)What do you think this might be?
I built a 4 monitor system for myself which works perfectly well.
But maybe you're getting involved here for some reason? I can't think of anything else.
Thank you both :-)
Now I can position and manage both my own and external windows.
However, something is not right yet:
Using this, realtime prints as I move, resize the windows, so it's OK.
WindowLeft: [WindowLeft]
WindowTop: [WindowTop]
WindowWidth: [WindowWidth]
WindowHeight: [WindowHeight]
WindowState: [WindowState]
ScreenHeight: [ScreenHeight]
ScreenWidth: [ScreenWidth]
However, when I say the window should be MAXMINIZED, unfortunately the dimensions are not good.
The upper left corner is at -8 -8 pixels.
And width isn’t really what it should be.
The resolution of the monitor at which it starts: 2560x1440 pixels.
Pure mystery :-)
What do you think this might be?
I built a 4 monitor system for myself which works perfectly well.
But maybe you're getting involved here for some reason? I can't think of anything else.

Quote from Vadim on October 28, 2021, 7:43 am@pgsuni
Try pausing the debugger and running the code line by line. Determine the line where the variables take on a value you don't expect. This will allow you to catch the moment when the code doesn't do what you intended. That way you can determine the cause and fix it.
Try pausing the debugger and running the code line by line. Determine the line where the variables take on a value you don't expect. This will allow you to catch the moment when the code doesn't do what you intended. That way you can determine the cause and fix it.

Quote from PGSuni on November 6, 2021, 9:50 pmUnfortunately, I just had time to use the program again.
Debug doesn't show me a bug
If the program sets the left side of the window to 0 pixels, the values are 0 pixels everywhere.
But visually, at -10 pixels would actually be the edge of the screen.
I did a test little app. Ls is an image where you can see that it does not completely go to the edge of the screen.
I got stuck I don't know what the problem might be.
Unfortunately, I just had time to use the program again.
Debug doesn't show me a bug
If the program sets the left side of the window to 0 pixels, the values are 0 pixels everywhere.
But visually, at -10 pixels would actually be the edge of the screen.
I did a test little app. Ls is an image where you can see that it does not completely go to the edge of the screen.
I got stuck I don't know what the problem might be.

Quote from PGSuni on November 6, 2021, 9:53 pmThere is a small app here that can be aligned to the edge of the monitor or just to the center with a few buttons.
ZIP->windowpos.pub
There is a small app here that can be aligned to the edge of the monitor or just to the center with a few buttons.
ZIP->windowpos.pub
Uploaded files:
Quote from Vadim on November 7, 2021, 8:50 pm@pgsuni
I have tested your sample. It works fine for me (see video). Does this pattern work for you by leaving space on the left?
If so, maybe you should calibrate your monitor. Monitors have an auto-tuning function.
For some reason the video does not play (writes that the file is damaged), so I put it in the archive.
I have tested your sample. It works fine for me (see video). Does this pattern work for you by leaving space on the left?
If so, maybe you should calibrate your monitor. Monitors have an auto-tuning function.
For some reason the video does not play (writes that the file is damaged), so I put it in the archive.
Uploaded files:Quote from mishem on November 11, 2021, 8:47 pm@pgsuniThis is deployed in full screen. - 8 This is probably the window frame.
@pgsuniThis is deployed in full screen. - 8 This is probably the window frame.
Uploaded files:

Quote from fkapnist on November 23, 2021, 11:38 pmAutoIt is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It contains a small app (Au3Info.exe) that can easily determine the exact ID, Handle, etc. of any running program just by dragging the Finder Tool over its window.
AutoIt is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It contains a small app (Au3Info.exe) that can easily determine the exact ID, Handle, etc. of any running program just by dragging the Finder Tool over its window.