Why do I receive the error when using GETFRAME on a figure in a second (dual) monitor?
2 ビュー (過去 30 日間)
古いコメントを表示
I have performed the following to utilize a dual monitor setup for my workstation and executed GETFRAME to capture an image on the extra monitor:
1. Connect a second monitor as a left-hand extension of the main screen
2. Execute the GETFRAME function
3. Move figure to left (secondary) screen
4. Execute GETFRAME again
When I proceed with the mentioned steps I receive the following error:
??? Error using ==> capturescreen
The rectangle passed to getframe must be at least partially on screen.
Error in ==> getframe at 35
x=capturescreen(varargin{:});
採用された回答
MathWorks Support Team
2012 年 5 月 25 日
There are two possible reasons for receiving this error message:
1. The figure you want to capture via 'getframe' has been moved to the border of your monitor, so that you can see no content at all.
or
2. You are using dualview (dual monitors) and put the figure on the second screen, which cannot be captured via 'capturescreen'.
In both cases the workaround is to move the figure, so that you can see its content on the (first) screen. You don't have to do this manually, you can use the command:
movegui(h)
which automatically moves the figure identified by the handle h to the 'onscreen' position.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!