tags:

views:

38

answers:

1

I was using Ruby's Win32API to MoveWindow to move a window and resize it.

But if the window is minimized, it won't show.

SetWindowPos works too, and has a flag to hide or show the window, but it is to only make a window visible or invisible, not about minimizing or normalizing.

I also tried SetForegroundWindow and SetActiveWindow and they won't work either. Is there a call to make a window normalized or maximized?

+3  A: 

ShowWindow(hwnd, SW_RESTORE) may be what you're looking for. See: MSDN docs

jwismar
it works great!
動靜能量
may also want to call SetForegroundWindow() so that the window appears in front
動靜能量