Solved

Zooming a Window !

Posted on 2006-06-18
4
286 Views
Last Modified: 2010-04-30
I have created a Static Control via the "CreateWindowEx" API function, added some text to it and set its parent window to an Excel application.

When I Zoom out the Excel sheet I want the Static Control to also zoom by the same ratio....  ie : The size of the Text in the Static Control should adjust according to the new Zoom of the Uderlying Excel worksheet .

Can this be done ?

Thanks.
0
Comment
Question by:RAFAAJ
4 Comments
 
LVL 1

Accepted Solution

by:
tguez earned 125 total points
ID: 17040324
Let me get this correctly.  You are not writing in excel.  You are interving with excel in a forceful way. You are creating a window using an api that excel does not know of.  Then you want to monitor excel for when there is a zoom, and change the zoom of the excel.

Now, clearify:

Is your applciation written in excel?  Or is it an outside applciation of excel.

If your application is within excel, then just monitor with a timer or something the value of the zoom of the window in question.  If the value changes, then change your text in the static control.  That is it.

If applciation is out side of excel, and you have created the instance of excel using an ole automation, then you can do the above as well.

But if your application is an outside application, not an excel and not a ole of excel, then you are in hard luck my friend, this is possible to do only with hacking techniques.

Tomer
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question