Solved

Zooming a Window !

Posted on 2006-06-18
4
269 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now