Prevent process window from being moved - winforms

I've found a function which can be used for moving window and also hiding it when set width & height to 0.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms633534(v=vs.85).aspx
I wonder if there are any ways with winform to prevent this function from being executed on another process (i.e: notepad.exe) or not.
Can anyone help me please ?
Thank you.

Related

Hover across entire window and stop where mouse pointer changes

I'm faced with an issue I do not know how to tackle. I need to implement a function in python or C that allows me to hover( with the mouse) over the entire windowed application and stop when the mouse pointer icon changes. Any help or tip as to how I can attain this will be appreciated. Thank you.

Is it possible to maximize a SDL window?

I would like to make my program to maximize using the maximizing button left to the cross in my C program but I can't find how to do so. I found that the ShowWindow Function could be of some help but I don't understand it.
If someone could explain it if this is the solution or tell if there is something else or nothing at all, it'd be very nice.
By the way, I'm using SDL if that help.
PS: the maximize button is indeed grayed out.
The 'maximize' button is disabled if your window is not resizable.
Pass SDL_WINDOW_RESIZABLE flag to SDL_CreateWindow, and make sure your code can handle window size changing.
I may be wrong but it seems that the best way to maximise a window is to use the SDL2 because the SDL doesn't seem to allow maximisation, just resizing.

Xlib - Two issues with call to XMoveResizeWindow

I am new to Xlib (in C) and am having two issues when calling the XMoveResizeWindow function.
ex.
XMoveResizeWindow(display, window_id, move_x, move_y, resize_x, resize_y);
1) After the call, the window I move will reposition itself correctly, however, if I select the window with the pointer after the move, it will instantly revert back to the position it held prior to the move. I assume I have to somehow 'update' the X11 server after it's moved with the windows new position?
2) Secondly, in regards to the resize of the window. My window is essentially being truncated by the x and y values entered, instead of resized. In other words, instead of the entire window shrinking down, the right and bottom sides of the window are cut off from view. Is there a way to instead resize the entire window?
--I am sorry I am unable to submit my complete code, however, I believe my issues are due solely to my lack of understanding of Xlib and this particular function's operations. As such, I am not neccessarily looking for specific code as a solution, merely an explination or suggestion on how I should go about implementing a solution.
Thank you.
I believe there is something wrong with your code, since that code is not available i'll point to an example.
Examples are given at readme itself.

WPf Loading screen

I have window with loading icon.
In application I do like this
// create loading window
loadingWindow.Show();
//do some operations
loadingWindow.Visibility = Visibility.Hide;
loading window is not showing.
Can you tell me guys what I do wrong?
Maybe this will give you some help in the right direction. I believe you have to use threads to get the loading effect.
Edit: You show the loadingWindow, then you do operations and then you hide the loadingWindow. Since there is nowhere stated that the app should wait with making the loadingWindow hidden till the operations are done it won't show up. If you look at the link I posted you should get a general idea of how to make a loadingscreen. If it so happens to be you do need help with it, just say so in a comment.
Hope it helps.
If you want a splash screen, use the SplashScreen class.
Note that it can only display an image, so it's not suitable if you need something more complex (e.g. animations or interactivity)

form resizing and mazimizing problem

my form gets the black effect while resizing or maximizing the form
i want to remove that black screen effect
can someone help in that
You really have to explain what the black effect is.
I suspect it could be that you make some task in the OnResize event in the rendering thread that prevents it from repainting the window. But this is really speculation.

Resources