Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link Par2: Display image (in own window) 2002-05-16 -- Lynn Howard here's some C5 Clarion/Legacy code that dispalys an image in a separate
window of its own.
At Preparing to Process the Window
SETCURSOR()
IF ImagePath <= ''
Alarm !Sound alarm
MESSAGE('There is no image to Display','MMS',ICON:Exclamation)
POST(EVENT:CloseWindow)
END
?Image1{PROP:Text} = ImagePath
SETPOSITION(?Image1,0,0,150,150*ImageHeight/ImageWidth)
SETPOSITION(?Region1,0,0,150,150*ImageHeight/ImageWidth)
WINDOW{PROP:Height} = ?Image1{PROP:Height}
WINDOW{PROP:Width} = 150
And at Window Event Handling Sized
Window{PROP:Height} = (ImageHeight/ImageWidth)*Window{PROP:Width}
SETPOSITION(?Region1,,,Window{PROP:Width},Window{PROP:Height})
SETPOSITION(?Image1,,,Window{PROP:Width},Window{PROP:Height})
Today is November 23, 2024, 2:05 am This article has been viewed 35331 times.
|
|