Kenneth_Smith
Joined: 18 May 2012 Posts: 726 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Tue Mar 12, 2024 1:37 pm Post subject: |
|
|
This works for me. (FTN ver 9.00). After pressing the TOCB menu item, I can paste the graphics region into word etc.
Code: | winapp
module s_mod
use clrwin
implicit none
integer gw, gh
contains
subroutine setup
integer iw
gw = 0.8*clearwin_info@('SCREEN_WIDTH')
gh = 0.8*clearwin_info@('SCREEN_DEPTH')
iw = winio@('%mn[Exit]&','Exit')
iw = winio@('%mn[TOCB]&',TO_CB) !Copy %gr to clipboard.
iw = winio@('%gr[red]&',gw,gh)
iw = winio@('')
end subroutine setup
integer function TO_CB()
integer i
i = GRAPHICS_TO_CLIPBOARD@(0,0,gw-1,gh-1)
if (i .eq. 1) print*, 'Success. Graphics region copied to clipboard.'
if (i .ne. 1) print*, 'Failed. Graphics region not copied to clipboard.'
TO_CB = 2
end function TO_CB
end module s_mod
program main
use s_mod
call setup
end |
|
|