Enlarge a box

  • Thread starter Thread starter Fay Yocum
  • Start date Start date
F

Fay Yocum

Using Echo's Jeopardy game. Question how can I make a small box when clicked
expand to fill the screen using VBA?

Thanks

Fay
 
Well I am also using your game to. I am using both games for my job. But I
am also showing them at a conference for nursing educators. Some tend to be
scared of "programming" so I want to show both. I am developing pages about
the course on my website on which I am linking to your file and will be
placing the copy of the games I have developed using yours and Echo's
examples. Create has been given to your site. I am not including the
instructions and sending them to your site for that. If you want to see the
site email me direct and I will send you the link. I have also mentioned and
quoted David. That goes for Echo and David also.

Anyway so there is no straight forward way to enlarge a graphic or
placeholder?

Thanks Fay
 
You can "fake" it by linking to another slide. This new slide can look
exactly like the main slide except that there is another text box (larger
one) that will automatically "Zoom in from center" when the slide is
reached. Make sure you have a button visible to link back to the main slide
(or scores, depending on how you set it up).

ENJOY! Feel free to holler if you have questions.

I wouldn't mind checking out the site. You can send me a link to:

infoatpttincdotcom (if you know what I mean)
 
Bill is probably right that the best choice would be to link to another
slide. However, you can always adjust the size and location of a shape.
If there is text, you would have to adjust the text size as well.
Something along the lines of the following code might do what you want.
Assign this procedure to a text box. The first time you click it, it
makes the text box large enough to fill the whole screen. The second
time it brings it back to normal size. It probably needs some tweaking,
including getting the actual screen size (I used 800 x 600, which worked
for my screen) and bringing the clicked shape to the front so nothing
else covers it, but you might be able to get the idea from here.
Remember that all the Dim statements that are outside the Sub need to go
at the top of your module.

Dim oldLeft As Long
Dim oldTop As Long
Dim oldWidth As Long
Dim oldHeight As Long
Dim oldFontSize As Long
Dim screenFilled As Boolean

Sub FillUnfillScreen(shp As Shape)
If screenFilled = False Then
oldLeft = shp.Left
oldTop = shp.Top
oldWidth = shp.Width
oldHeight = shp.Height
oldFontSize = shp.TextFrame.TextRange.Font.Size

shp.Left = 0
shp.Top = 0
shp.Width = 800
shp.Height = 600
shp.TextFrame.TextRange.Font.Size = 44
screenFilled = True
Else
shp.Left = oldLeft
shp.Top = oldTop
shp.Width = oldTop
shp.Height = oldHeight
screenFilled = False
shp.TextFrame.TextRange.Font.Size = oldFontSize
End If
End Sub


--
David M. Marcovitz, Ph.D.
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
Back
Top