Microsoft Knowledge Base Email Alertz

KBAlertz.com: (171492) - When using an ActiveX control created in Visual Basic 5.0 in Microsoft PowerPoint 97, the ScaleWidth and ScaleHeight of the control are changed after going to Slide Show mode and back.

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 171492 - Last Review: February 24, 2004 - Revision: 3.0

FIX: ActiveX Control Incorrectly Reports ScaleWidth/ScaleHeight

This article was previously published under Q171492

On This Page

SYMPTOMS

When using an ActiveX control created in Visual Basic 5.0 in Microsoft PowerPoint 97, the ScaleWidth and ScaleHeight of the control are changed after going to "Slide Show" mode and back.

CAUSE

PowerPoint 97 zooms the control's window when the slide is displayed, even if Zoom is set to 100%. Because ScaleWidth and ScaleHeight are based on the size of the control's window, and PowerPoint doesn't resize this window back to the control's extents when the control gets deactivated, the window retains its "zoomed" size until explicitly resized. In all containers that don't zoom, these values are always identical and do not exhibit this problem.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been fixed in Visual Studio 97 Service Pack 2.

For more information on the Visual Studio 97 Service Pack 2, please see the following article in the Microsoft Knowledge Base:
170365  (http://kbalertz.com/Feedback.aspx?kbNumber=170365/EN-US/ ) INFO: Visual Studio 97 Service Packs - What, Where, and Why
For a list of the Visual Basic 5.0 bugs that were fixed in the Visual Studio 97 Service Pack 2, please see the following article in the Microsoft Knowledge Base:
171554  (http://kbalertz.com/Feedback.aspx?kbNumber=171554/EN-US/ ) INFO: Visual Basic 5.0 Fixes in Visual Studio 97 Service Pack 2

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new ActiveX Control Project.
  2. Select Project1 Properties from the Project menu, and change the Project Name to "ScaleTest."
  3. Add the following to the Paint event:
            Private Sub UserControl_Paint()
             Dim sCaption As String
             sCaption = ScaleWidth & " ," & ScaleHeight
             CurrentX = (ScaleWidth - TextWidth(sCaption)) / 2
             CurrentY = (ScaleHeight - TextHeight(sCaption)) / 2
             Print sCaption
             Line (0, ScaleHeight / 2)-(ScaleWidth / 2, 0)
             Line (ScaleWidth / 2, 0)-(ScaleWidth, ScaleHeight / 2)
             Line (ScaleWidth, ScaleHeight / 2)-(ScaleWidth / 2, ScaleHeight)
             Line (ScaleWidth / 2, ScaleHeight)-(0, ScaleHeight / 2)
          End Sub
    						
  4. Select "Make ScaleTest.ocx" from the File menu.
  5. Close Visual Basic and start PowerPoint 97.
  6. Create a new Blank Presentation that contains one Blank Slide.
  7. Use the "More Controls" button on the ToolBox to add the previously- created control to the slide. Note the ScaleWidth and ScaleHeight.
  8. Select "Slide Show" from the View menu. The control will get larger and the ScaleWidth and ScaleHeight will be changed.
  9. Press the Escape key to return to layout mode and note that the ScaleWidth and ScaleHeight still reflect the "Slide Show" settings.

APPLIES TO
  • Microsoft Visual Basic 5.0 Learning Edition
  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft PowerPoint 97 Standard Edition
Keywords: 
kbbug kbfix kbprogramming kbvbp500sp2fix kbvs97sp2fix KB171492
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please