CompuServe Thread

#VB Technical Questions

4 messages in this thread
#3438From: Graham HobsonOct 16, 1991 3:57 PM
I have three technical questions for a charting component of an application: 1. is it possible to print text vertically i.e. rotate it by 90 degrees? 2. If I have a picture box which I have used methods to draw to, how can I copy the contents of the picture box to the clipboard as a metafile? Just using the metafile parameter (3 I think) doesn't seem to work. 3. I know it is possible to pass a control into a procedure and have methods performed on that control but is possible to define a procedure that can draw the same image on a picture box OR a printer object? I'm sure this must be a common requirement for routines to print charts or reports. Regards… Graham There is 1 Reply.
#3454From: Jonathan Zuck (UFI)Oct 16, 1991 5:29 PM
Graham, 1. Vertical Text. Yes, use the Print method to print your text in a picture box and then use StretchBlt to flip it. it's not too flexible but you can do some neet stuff. 2. No. the graphic methods are creating a bitmap, *not* a metafile. You need to "play" you graphic commands into a memory metafile using API calls. 3.No. This is unfortunate but I don't think you can pass either a control or a printer object to the same procedure. On option is to write a routine to takes both a control and a printer as an paramter and then a final "flag" prameter that says which one to manipulate. The best solution probably is to pass the .hDC and use api functions to do your graphics. -=Jonathan There is 1 Reply.
#3458From: Ted M. YoungOct 16, 1991 6:03 PM
Jonathan, I don't think StretchBlt can rotate 90 degrees. You can flip (mirror) it horizontally or vertically, but there's simply no way to get it to be rotated 90 degrees. Gotta use a 2-d transformation matrix for that (something I'm working on). – Ted There is 1 Reply.
#3512From: Jonathan Zuck (UFI)Oct 16, 1991 11:18 PM
Ted, Thanks for the info. I haven't messed with StretchBLT that much. Looking forward to seeing your technique for graphic rotation. -=- Jonathan