![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Join Date: Dec 2002
Location: Larache--Morocco
Posts: 2,914
|
Hi there,
Is it possible to take a picture of a section of the screen programmatically? if so, how would I , for example, save the Top Right section of the current screen to disk ? the screen section should be determinated with screen coordinates. Regards.
__________________
Jaafar. Happiness is when what you think, what you say, and what you do are in harmony. http://www.laracheenelmundo.com/ |
|
|
|
|
|
#2 |
|
Join Date: Dec 2002
Location: Larache--Morocco
Posts: 2,914
|
Ok, I realise that wanting to get a picture of some section of the screen sounds a bit vain if not weird. so let me tell you why i need this.
My real problem is as follows: I have an oval autoshape placed on a worksheet. The autoshape's background is transparent so i can see through the cells underneath which contain some figures. When i copy the autoshape i want the underneath cells to be copied a long with it as well . They don't. I just get a copy of the transparent autoshape but without a copy of the cells. To get around this i thought maybe i should take a picture of the screen region delimiting the autoshape bounderies hence copying all that is on display in that screen region including the background cells. Copying the underneath cells first then placing the autoshape copy over them wouldn't work for me as the shape is an oval and i ill be using this picture taking repetitively in a timer. Open to any suggestions . Regards.
__________________
Jaafar. Happiness is when what you think, what you say, and what you do are in harmony. http://www.laracheenelmundo.com/ |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,208
|
|
|
|
|
|
|
#4 |
|
Join Date: Dec 2002
Location: Larache--Morocco
Posts: 2,914
|
Thanks Ivan.
Your workbook example uses the clipboard to to get a pointer to the copied selection. It doesn't work for my specific requirement as the underneath cells won't be selected. If the autoshape was a rectangle, i think i could use the BitBlt function to copy the rectangle Rect onto a memory DC and from there get a pointer to the its picture. I am experimenting with a transparent autoshape rectangle . If I come up with something that works, i'll post it Again, thanks for your help. Regards. late edit: i've just searched the forum and found this by Tom :http://www.mrexcel.com/board2/viewto...ghlight=bitblt . it may be of interest.
__________________
Jaafar. Happiness is when what you think, what you say, and what you do are in harmony. http://www.laracheenelmundo.com/ |
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,208
|
Could you explain a bit more about your project?
Is it not possible to select the region of cells beneath the AutoShape ? as that would be simplest method. |
|
|
|
|
|
#6 | |
|
Join Date: Dec 2002
Location: Larache--Morocco
Posts: 2,914
|
Quote:
I thought maybe the magnifying glass could be made out of a copy of another transparent autoshape in a second window of the same worksheet but with a bigger Zoom ratio. So as the user moves the Glass autoshape say over the range A1:B4, the transparent autoshape moves over the same range in the Zoomed window at the same time using a timer and updates what you see in the magnifying glass . I hope i am not confusing this further and apologise for rambling around and not being clear about what i am really trying to accomplish. Anyway, I am open to any suggestions and in the end, I might as well just have to rethink the whole design/logic in order to achieve this "Magnifying Glass" stuff. Regards.
__________________
Jaafar. Happiness is when what you think, what you say, and what you do are in harmony. http://www.laracheenelmundo.com/ |
|
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,208
|
Ah, yes I looked into this briefly a while ago ..... let's see what we can come up with, short of just calling up the Windows Applet that does this.
In fact you could just call this up and keep the Applet on top. But this would be a good project |
|
|
|
|
|
#8 |
|
Join Date: Feb 2003
Location: Gurgaon/Thrissur
Posts: 2,326
|
__________________
Kris |
|
|
|
|
|
#9 |
|
Join Date: Dec 2002
Location: Larache--Morocco
Posts: 2,914
|
Thanks Krishnakumar.
I hav actually come up with something that seems to work quite well. See here : http://www.mrexcel.com/board2/viewto...548&highlight= Regards.
__________________
Jaafar. Happiness is when what you think, what you say, and what you do are in harmony. http://www.laracheenelmundo.com/ |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|