Pudge 24 Posted August 23, 2020 Share Posted August 23, 2020 Hey! How can I do this by c#? Without chanching resolution. Does the wrobot api has kind of this? Or need the big code? :) Just for use this button Link to comment Share on other sites More sharing options...
Droidz 2737 Posted August 23, 2020 Share Posted August 23, 2020 hi, try robotManager.Helpful.Win32.Native.ShowWindow(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, 3); (no tested) Pudge 1 Link to comment Share on other sites More sharing options...
Pudge 24 Posted August 23, 2020 Author Share Posted August 23, 2020 2 hours ago, Droidz said: hi, try robotManager.Helpful.Win32.Native.ShowWindow(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, 3); (no tested) Parfait, Mr. Droidz! What would I do without you?!!! Number 4 for minimize :) Link to comment Share on other sites More sharing options...
Pudge 24 Posted August 23, 2020 Author Share Posted August 23, 2020 @Droidz Sorry for the insolence, I would like to ask for help with a boolean to check when the window is minimized / maximized :) Link to comment Share on other sites More sharing options...
Droidz 2737 Posted August 23, 2020 Share Posted August 23, 2020 You need more code using System; using System.Runtime.InteropServices; using System.Windows.Forms; public class Main : wManager.Plugin.IPlugin { [DllImport("user32.dll", SetLastError = true)] static extern int GetWindowLong(IntPtr hWnd, int nIndex); public const uint WS_MINIMIZE = 0x20000000; public const uint WS_MAXIMIZE = 0x01000000; public const int GWL_STYLE = -16; void GetState() { int style = GetWindowLong(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, GWL_STYLE); if ((style & WS_MAXIMIZE) == WS_MAXIMIZE) { MessageBox.Show("maximized"); } else if ((style & WS_MINIMIZE) == WS_MINIMIZE) { MessageBox.Show("minimized"); } else { // normal style? MessageBox.Show("Normal??? > style=" + style.ToString("x8")); } } public void Initialize() { GetState(); robotManager.Helpful.Win32.Native.ShowWindow(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, 6); GetState(); robotManager.Helpful.Win32.Native.ShowWindow(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, 3); GetState(); robotManager.Helpful.Win32.Native.ShowWindow(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, 4); GetState(); } public void Dispose() { } public void Settings() { } } Pudge 1 Link to comment Share on other sites More sharing options...
Pudge 24 Posted August 23, 2020 Author Share Posted August 23, 2020 Many many thanks!!! Link to comment Share on other sites More sharing options...
Pudge 24 Posted September 18, 2020 Author Share Posted September 18, 2020 Is it possible to perform such actions with a bot? On 8/23/2020 at 3:01 PM, Droidz said: robotManager.Helpful.Win32.Native.ShowWindow(wManager.Wow.Memory.WowMemory.Memory.WindowHandle, 3); cant find method how get WindowHandle value for wrobot application, if it works Link to comment Share on other sites More sharing options...
Droidz 2737 Posted September 19, 2020 Share Posted September 19, 2020 hi, try System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle Pudge 1 Link to comment Share on other sites More sharing options...
Pudge 24 Posted September 19, 2020 Author Share Posted September 19, 2020 10 hours ago, Droidz said: hi, try System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle this is the one, thank you again Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now