Shlomi
Shlomi

Reputation: 3792

Change external app window size from Electron code

I have an ElectronJS app with 2 buttons: "FF" and "IE", when I click on them, it opens the related browser via Node Childprocess spawn function.

Now, I want, somehow, to resize the opened browser window to be 600*600px (for instance).

I tried to looks if Electron has some functionality to do that but I can't find nothing, I also tried to understand if I can do it thru windows CLI but also didn't find anything.

Do anyone have some idea how to perform this such behavior?

Thank you!

Upvotes: 1

Views: 1203

Answers (1)

Vadim Macagon
Vadim Macagon

Reputation: 14847

The answers in How do I change another program's window's size? should give you some ideas, you can call Win32 APIs in Electron using node-ffi or from a native Node module.

Upvotes: 1

Related Questions