Originally posted by Blobby Seems that PICTURE property contains original image and IMAGE property contains modified image.
Cheers
That's interesting... By the way, did you use some other picturebox for doing the stretchblt & bitblt manipulations? I often use other (invisible) pictureboxes but would like to know if they are really necessary.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
Well when i printed the .IMAGE I got the old image (before the edit), but when i printed the .IMAGE, i got the newly edited changes. It may be something to do with not having the .AUTOREDRAW property set as that dictates whether u need to do a .REFRESH or not as the picture can be manipulated in memory without affecting the actual image until u r ready.
As for your other question it depends what you are trying to do as regards whether you need extra picture boxes. I did as it made the programming/testing of it easier as i could see exactly the pictures i was working with. When u get strange results, its sometimes hard to find out whats going wrong when u have a large image being played with. Especially if you are mixing pixel and twips scalemodes,
There are 3 types of people in this world.........those that can count, and those that can't.
Originally posted by Blobby ...its sometimes hard to find out whats going wrong when u have a large image being played with. Especially if you are mixing pixel and twips scalemodes,
Hi bloke,
I agree with that. My question however was rather if the source and destination device contexts could be the same in a call to, say, Bilblt, i.e. if you could use the same picturebox as both source and destination.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
In the very app i was having trouble in i am moving a large portion of the image to the left by about 20% using the imagebox as both source AND destination.
Works a treat
There are 3 types of people in this world.........those that can count, and those that can't.
hey Blob just read ur posts... seems u can help me out with a prob.... i m usin stretchBlt for printing a portion of a picture into another one... but the thing is that i have to print the whole form... how do i specify that the "Me.PrintForm" takes the image property of the picture box rather than picture....
plz help me out with this...
lookin forward
There are 10 types of people in this world
Those who understand BINARY and those who do not!
---- aami
c friend 1st of all thxn a lottt 4 ur concern... its perfectly all right 2 reply a bit late, every1 has got their own stuff 2 do... neway...
i ve written an application with 2 forms, one of which is the main form (frmMain) n the other 1 (frmPrint) is meant for printing in a specific format. i pass all the info and parameters to the frmPrint alongwith a picture and its portions using the stretchBlt function... When the frmPrint gets printed, all the fields are printed except the portions painted using the stretchBlt... these areas are left blank (white) on the printout.... if u r still not clear i can send u the code as well
regards
There are 10 types of people in this world
Those who understand BINARY and those who do not!
---- aami
Oky doky, i understand. Have you got some runnable code that i can use to demonstrate (if you dont want to send me the whole project). I may be able to simply fix the code and send it you back.
Cheers
There are 3 types of people in this world.........those that can count, and those that can't.
hey guys rhinobull nd blobby thnx a lot 4 ur replies, 'coz i really need da thingi very very urgent as my deadline is just 2 days away.... da prob wid me is that i m at place far frm home b coz of da death of a relative, so i don't have nethin like vb stuff available here.... 2morrow i ll go 2 univ nd check ur code rhino... nd blobby! i have absolutely no prob in sendin u the actual proj, the only hurdle is its size as it is a highly multiform application havin so much graphics stuff, nd ll take me ages 2 upload it... i ll send u its manuals and links when i upload it... u'll find it an interesting one...
Thanx a lot nd i ll b lookin 4ward 2 a solution 2morrow or da day after...
There are 10 types of people in this world
Those who understand BINARY and those who do not!
---- aami
hey guys
here's da EXACT situation.... all i need is if somebody can print the whole form through ne printer..... i have put a load button that loads the part of the picture(larger1) to da smaller 1... The print button prints the whole form on the printer.... the prob is that smaller picture is not gettin printed, 'coz it has been painted usin stretchBlt...
pleeeeeeeeeeeeeez gimme some solution 2 it i m really caught
thanx nd desperately waitin
Regards
There are 10 types of people in this world
Those who understand BINARY and those who do not!
---- aami
When you use bitblt/stretchblt, it modifes the IMAGE property of a
picturebox. But ME.PRINTFORM only prints the ME.PICTURE property. You have
to set the pictureboxs AUTOREDRAW property to TRUE, then set the PICTURE
property = IMAGE property for it to work.
New code should be:
VB Code:
Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal XSrc As Long, ByVal YSrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long