?
Solved

Zooming a Window !

Posted on 2006-06-18
4
Medium Priority
?
299 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Accepted Solution

by:
tguez earned 500 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…
Suggested Courses

770 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