0

What is the equivalent windows api function to..

this.MaximumSize = new Size(500, 500); 

on winforms? (I have only the handle of form)

This link How do I change another program's window's size?

does not solves how to set maximum size of window, it addresses size of window.

ProgrammingLlama
  • 36,677
  • 7
  • 67
  • 86
Ruwan Liyanage
  • 333
  • 1
  • 13
  • _I have only the handle of form_ Does the form belong to your application or to a 3rd-party program? – 41686d6564 stands w. Palestine Jun 19 '20 at 03:04
  • Ahmed Abdelhameed the handle belongs to another programs opened on desktop. – Ruwan Liyanage Jun 19 '20 at 03:06
  • You need to send a `WM_GETMINMAXINFO` message to the window. https://learn.microsoft.com/en-us/windows/win32/winmsg/wm-getminmaxinfo – Gusman Jun 19 '20 at 03:07
  • Gusman, I tried through your link and this is what I could find so far; https://stackoverflow.com/questions/5794630/setting-a-windows-minimum-and-maximum-size-using-winapi but it replies back withing form to return maximum size values. I'm having only the handle of window as reference. How to call the outside program window with WM_GETMINMAXINFO through my program? – Ruwan Liyanage Jun 19 '20 at 03:56

0 Answers0