question

samaliyli-5264 avatar image
0 Votes"
samaliyli-5264 asked samaliyli-5264 commented

how can i make msedge in --app mode doesn't rember window size

In my c# program,I use System.Process to open msedge.exe with in app mode.I used --window-size to control the msedge window's size.However,when i open an new site in the mainwindow by the window.open function,the childwindow is the same as the mainwindow's size. Even I set the size for the childwindow,it doesn't work.
Why the childwindow be the same with the maniwindow?

The detail like the follow:
1.In C# ,open msedge.exe in app mode
string arg = " --window-position=10,10 --window-size=300,300 " + "--app" + "=" + "http://XXXX/sample.jsp"
process.StartInfo.FileName = "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe";
・・・
process.StartInfo.Arguments = arg;
process.Start();

2.In sample.jsp page,I excute the follow to open a new site.
window.open('" + XXXX+ "','" + windowName + "','toolbar=no,scrollbars=no,location=no,status=no,menubar=no,resizable=no,left=0,top=0,width=100,height=100')

3.The new childwindow is always same with the sample.jsp window's size.

Is there anyway to solve this problem? How can I contorl the childwindow's size that isn't be same to the mainwindow.

Best Regards

ms-edge
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

YuZhou-MSFT avatar image
0 Votes"
YuZhou-MSFT answered samaliyli-5264 commented

Hi @samaliyli-5264

I can reproduce the issue. It looks like in app mode, if you add the --window-size argument, it will be applied to every window opened from it. I think that's by design in Edge browser.

AFAIK, there's no workaround to change it unless you don't configure the --window-size argument when open Edge in app mode. I suggest that you can provide feedback about this to Edge team by pressing Alt+Shift+I in Edge. Edge team will check the feedbacks and improve the product continuously. Thanks for your understading.


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Regards,
Yu Zhou

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @samaliyli-5264

I have not heard from you for a couple of days. Please let me know if there is anything that I can help here.

0 Votes 0 ·

Hi @YuZhou-MSFT

Thanks for your reply.

It looks like in app mode, if you add the --window-size argument, it will be applied to every window opened from it. I think that's by design in Edge browser.

For this,I have changed another method to avoid this problem.I don't use the --window-size argument.

BestRegards
0 Votes 0 ·