"Guide" window outside monitor's screen space

조회 수: 16 (최근 30일)
John Mortensen
John Mortensen 2016년 12월 20일
댓글: benjamin chew 2019년 10월 10일
Hello
MATLAB is placing the "guide" window (the gui editor) outside the visual space of my monitor and I'd like to know how to keep it from doing that. I've only had this happen with the "guide" window however it is possible it could happen with another at some point.
I'm sure this has something to do with how I use my Windows 7 system. I have two monitors that I use in "extended" mode at certain times. However, sometimes I just use one. The situation occurred I'm sure due to the fact I had the monitors in "dual" mode when I ran "guide" at some point using MATLAB. Now, however, when I'm in single monitor mode the "guide" window will end up showing up outside the confined space that I can't get mouse to nor can I see the window (obviously). I can't seem to get it to show up in the normal place when using a single monitor. Is there a file or registry setting I can adjust to correct this?
I hope I explained this clearly enough...it is a bit odd.
  댓글 수: 2
John Mortensen
John Mortensen 2016년 12월 21일
As I read some of these responses I'm guessing these solutions are to be placed in the code for an actual custom gui interface window. If so, I think I might not have been clear in my post. I did NOT mean a custom window gui I was working on showed up "off screen". It was the "Guide" window itself: the one where you choose what gui you want to work on or open a "new" one etc.
Sorry about that...I hope this make it more clear.
benjamin chew
benjamin chew 2019년 10월 10일
I tried adjusting the scaling size under display setting, it should refocus all the applications onto the main screen. I hope it helps!

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2016년 12월 20일
You might have ended up with a DefaultFigurePosition set.
Potentially you might want to go as far as to change DefaultFigurePosition in your startup.m by detecting the number of monitors by checking the root MonitorPositions value; that would allow you to have different settings depending on whether you had one monitor or two connected.
  댓글 수: 3
John Mortensen
John Mortensen 2016년 12월 21일
편집: John Mortensen 2016년 12월 21일
OK, this seemed to have worked. Even though MATLAB told me it existed I could not actually find a folder named "prefdir". It doesn't exist. So what I did was change the name of the R2016b folder there (under ....\Roaming\MathWorks\MATLAB) and re-started MATLAB. Now I type "guide" and the window pops up in on my screen.
Thanks!
Jan
Jan 2016년 12월 21일
The folder is not named "prefdir", but prefdir is the command, which replies the folder name.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Jan
Jan 2016년 12월 20일
You can insert this in the CreateFcn:
movegui(FigureHandle, 'onscreen')
This move the figure to the visible area of the main monitor securely. This helps e.g. when the monitor resultion is changed.
It would be even smarter to move the figure to the nearest monitor in case of a multi-monitor setup. This can be done by FEX: WindowAPI(FigH, 'toScreen') unter Windows.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by