Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Resizing BackgroundPicture Gifs programmatically for varying screen resolutions

We have 20 workbooks, all of which have a background picture for
Sheet1. The problem is that we get *tiling* for any resolution
different from 1,024 x 768. The obvious solution is to test for the
user's screen resolution and import an appropriately sized Gif, which
means for say 10 resolutions, 10 gifs ..... times 20 workbooks.

Instead, what about inserting a master Gif into a holding worksheet,
testing for screen resolution, and resizing it appropriately. But,
even if we could do this resizing, the following code which is
supposed to then set the background picture, bombs with the error msg
"Picture does not have value property"

Worksheets("Sheet1").SetBackgroundPicture
Worksheets("Sheet4").Pictures("Picture 1")

Is there any solution to this ? Or any other way of using one master
Gif ?

TIA - Charles Jordan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Resizing BackgroundPicture Gifs programmatically for varying screen resolutions

Charles ,
One thing: .SetBackgroundPicture expects a filename as a parameter. If the
gif is in a workbook, you can't supply that. You could copy and paste, but
then it's not in the background.

There is no .Pictures collection, only .OLEObjects and .Shapes, so I don't
think you can access the background picture once its there.

In terms of tiling, I get it everytime, it just that if the picture matches
your window size and you don't scroll right of down, it's not apparent.

Maybe the GetSystemMetric API and setting the scrollable area of the
worksheet may help.

NickHK

"Charles Jordan" wrote in message
om...
We have 20 workbooks, all of which have a background picture for
Sheet1. The problem is that we get *tiling* for any resolution
different from 1,024 x 768. The obvious solution is to test for the
user's screen resolution and import an appropriately sized Gif, which
means for say 10 resolutions, 10 gifs ..... times 20 workbooks.

Instead, what about inserting a master Gif into a holding worksheet,
testing for screen resolution, and resizing it appropriately. But,
even if we could do this resizing, the following code which is
supposed to then set the background picture, bombs with the error msg
"Picture does not have value property"

Worksheets("Sheet1").SetBackgroundPicture
Worksheets("Sheet4").Pictures("Picture 1")

Is there any solution to this ? Or any other way of using one master
Gif ?

TIA - Charles Jordan



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Resizing BackgroundPicture Gifs programmatically for varying screen resolutions

"NickHK" wrote in message ...
Charles ,
One thing: .SetBackgroundPicture expects a filename as a parameter. If the
gif is in a workbook, you can't supply that. You could copy and paste, but
then it's not in the background.

There is no .Pictures collection, only .OLEObjects and .Shapes, so I don't
think you can access the background picture once its there.

In terms of tiling, I get it everytime, it just that if the picture matches
your window size and you don't scroll right of down, it's not apparent.

Maybe the GetSystemMetric API and setting the scrollable area of the
worksheet may help.

NickHK

"Charles Jordan" wrote in message
om...
We have 20 workbooks, all of which have a background picture for
Sheet1. The problem is that we get *tiling* for any resolution
different from 1,024 x 768. The obvious solution is to test for the
user's screen resolution and import an appropriately sized Gif, which
means for say 10 resolutions, 10 gifs ..... times 20 workbooks.

Instead, what about inserting a master Gif into a holding worksheet,
testing for screen resolution, and resizing it appropriately. But,
even if we could do this resizing, the following code which is
supposed to then set the background picture, bombs with the error msg
"Picture does not have value property"

Worksheets("Sheet1").SetBackgroundPicture
Worksheets("Sheet4").Pictures("Picture 1")

Is there any solution to this ? Or any other way of using one master
Gif ?

TIA - Charles Jordan


NickHK - thanks . Sure there's a solution here somewhere - will keep
you posted. Charles
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Resizing BackgroundPicture Gifs programmatically for varying screen resolutions

I believe tiling occurs regardless of screen resolution and/or picture size.
To delete the background picture, set the file name to a blank string.

Sub AddBackground()
ActiveSheet.SetBackgroundPicture Filename:="C:\My Documents\Test
Background.jpg"
End Sub

Sub DeleteBackground()
ActiveSheet.SetBackgroundPicture Filename:=""
End Sub

How important is it that the picture fit the user's full screen? Can the
picture simply be bigger than the screen, so that it appears to "truncate"
on monitors that are set to smaller resolutions? In other words, can you use
a single picture file (GIF or JPG) that will fit the largest screen
resolution used by all users?
--
Regards,
Bill



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Resizing BackgroundPicture Gifs programmatically for varying screen resolutions

"Bill Renaud" wrote in message ...
I believe tiling occurs regardless of screen resolution and/or picture size.
To delete the background picture, set the file name to a blank string.

Sub AddBackground()
ActiveSheet.SetBackgroundPicture Filename:="C:\My Documents\Test
Background.jpg"
End Sub

Sub DeleteBackground()
ActiveSheet.SetBackgroundPicture Filename:=""
End Sub

How important is it that the picture fit the user's full screen? Can the
picture simply be bigger than the screen, so that it appears to "truncate"
on monitors that are set to smaller resolutions? In other words, can you use
a single picture file (GIF or JPG) that will fit the largest screen
resolution used by all users?


Bill - thanks - We may have to do as you suggest, but the trouble is
that each picture contains an image so can't really be truncated
without losing some.. I have just posted a query on another approach
to the problem, which is to *insert* the picture on the draw layer,
then resize it to fill the screen, and then dump it once the initial
splash is over.. But how to resize it?? ..

Tks Charles


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing cells in a selection without resizing entire sheet Danielle via OfficeKB.com Excel Discussion (Misc queries) 4 August 11th 06 10:06 PM
Need to convert point on screen to various screen resolutions Donna YaWanna Excel Discussion (Misc queries) 5 October 26th 05 10:10 PM
Making GIFs from anything, with optional resizing Dan[_28_] Excel Programming 1 January 30th 04 03:03 PM
different screen resolutions Rob Excel Programming 0 December 10th 03 09:48 PM
Exporting Charts as GIFs Adam Sparks Excel Programming 4 November 4th 03 11:05 PM


All times are GMT +1. The time now is 02:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"