I'm creating a windowarranger with C# and autoitX. I tried it with C# only but I couldn't get the correct handles.
But I worked in autoit so I thought I just use the autoitX dll to get the handles.
And I am nearly finished with my project, but the autoit winsetstate function to minimize the windows seems a little bit buggy with certain programs.
So I thought I could use the handle which I get from an autoit function and minimize the window with the sendmessage win api function.
control.winlist[1, i]
This should give me the handle control.winlist[0, i]=title
and control.winlist[1, i] = handle
. ( funny that the arguments are reversed in autoitx)
The first problem was that the return type of winlist is a string, and not a handle.
So I did this
SendMessage(Marshal.StringToHGlobalUni( control.winlist[1, i]), 0x111, (IntPtr)419, IntPtr.Zero);
First question where do I get those flags?
I couldn't find any of them on msdn.
Got those flags from this post => Minimizing all open windows in C#
Do you see any mistake? Because it didn't minimize at all. I'm not sure if I made a mistake with the flags or if the handle from autoit is wrong.