Login
`
Templates, Tools and Utilities
|
||
Icetips Article
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 21, 2024, 7:54 am This article has been viewed 35328 times.
|
|