OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > Corel Photo-Paint VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 26-02-2012, 10:19
hvw hvw is offline
Junior Member
 
Join Date: Jan 2012
Location: Ingelmunster (Belgium)
Posts: 13
Default Zoom to fit (F4)

What is the code to zoom to fit an image (F4 in Photo-Paint)

Thanks
Reply With Quote
  #2  
Old 26-02-2012, 20:55
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Zoom to Fit

There isn't one that I know, you would have to write one with ActiveWindow.Zoom

Or you could use SendKeys
Code:
Sub ZoomToFit()
    SendKeys "{F4}"
End Sub
-Shelby

Last edited by shelbym; 26-02-2012 at 21:00.
Reply With Quote
  #3  
Old 27-02-2012, 00:46
hvw hvw is offline
Junior Member
 
Join Date: Jan 2012
Location: Ingelmunster (Belgium)
Posts: 13
Default Zoom to fit (F4)

Hi Shelby,

Well my problem was just that the ==>SendKeys "{F4}"<== doesn't work

Thanks anyway
Reply With Quote
  #4  
Old 27-02-2012, 07:52
shark shark is offline
Senior Member
 
Join Date: Aug 2010
Location: Russia, Belgorod
Posts: 145
Default

Try to use ActiveWindow.ActiveView.ToFitSelection
It works in CorelDraw
Reply With Quote
  #5  
Old 27-02-2012, 11:36
hvw hvw is offline
Junior Member
 
Join Date: Jan 2012
Location: Ingelmunster (Belgium)
Posts: 13
Default Zoom to fit (F4)

Thanks for the reply

==> ActiveWindow.ActiveView.ToFitSelection<== doesn't work in Photo-paint
Reply With Quote
  #6  
Old 27-02-2012, 11:55
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default SendKeys

If you are running the code from the editor, it does not work. But if you run the Macro from "Run Macro" or a shortcut key, the SendKeys should work. I have it working here.

-Shelby
Reply With Quote
  #7  
Old 28-02-2012, 03:29
hvw hvw is offline
Junior Member
 
Join Date: Jan 2012
Location: Ingelmunster (Belgium)
Posts: 13
Default Zoom to fit (F4)

Thanks Shelby,

you are right. It works.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Zoom to selected bug knowbodynow General 1 24-01-2012 00:22
zoom one shot in PP Jeff Harrison Corel Photo-Paint VBA 0 13-02-2010 13:47
Zoom in Corel 11 ebu CorelDRAW/Corel DESIGNER VBA 0 02-08-2008 02:00
Lost toolbar zoom tools when opening zoom justsmilin General 3 02-05-2007 10:44
bug? on Zoom F3 wOxxOm General 1 31-01-2006 12:59


All times are GMT -5. The time now is 13:00.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com