"Guide" window outside monitor's screen space

16 visualizaciones (últimos 30 días)
John Mortensen
John Mortensen el 20 de Dic. de 2016
Comentada: benjamin chew el 10 de Oct. de 2019
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 comentarios
John Mortensen
John Mortensen el 21 de Dic. de 2016
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 el 10 de Oct. de 2019
I tried adjusting the scaling size under display setting, it should refocus all the applications onto the main screen. I hope it helps!

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 20 de Dic. de 2016
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 comentarios
John Mortensen
John Mortensen el 21 de Dic. de 2016
Editada: John Mortensen el 21 de Dic. de 2016
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 el 21 de Dic. de 2016
The folder is not named "prefdir", but prefdir is the command, which replies the folder name.

Iniciar sesión para comentar.

Más respuestas (1)

Jan
Jan el 20 de Dic. de 2016
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.

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by