[Grapich] Lens effect...!

  • Thread starter ALESSANDRO Baraldi
  • Start date
A

ALESSANDRO Baraldi

Hi.
In Vb i can, using PictureBox, copy the region around the Mouse and
put it in a Pic.
So if i enlarge it before puting in a Pic i have Lens effect.
In VBA we don't have PictureBox, so i think to put it in ImageControl.
I'm lookink for this in many Site, but probably it's not possible....???

Thanks.

Alessandro.(IT)
 
A

Alessandro IT

Stephen Lebans said:
Here's a class to simulate a VB PictureBox control using the standard
Access Image control. You should be able to use your VB code directly.
http://www.lebans.com/imageclass.htm

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

Thanks Stephen, but i just see it....!
I need this to create special effect in my Foto sistem DB.
I'm not so able with API, but i also need Events Object procedure.
I search about, but Access can't support Event procedure.
Can i use the Mouse_Move Event of Image to do this..?

This is short-part that work good in VB....!

Private Sub Form_Activate()
PrintScreen
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)

'tex = StretchBlt(pb.hdc, 0, 0, wid, hig, Form1.picBack.hdc, X, Y,
100, 100, SRCCOPY)

End Sub

Function PrintScreen()
Dim r As Long
Dim hWndDesk As Long
Dim hDCDesk As Long
Dim LeftDesk As Long
Dim TopDesk As Long
Dim WidthDesk As Long
Dim HeightDesk As Long
'coordinate dello schermo
LeftDesk = 0
TopDesk = 0
WidthDesk = Screen.Width \ X.TwipsPerPixelX
HeightDesk = Screen.Height \ Y.TwipsPerPixelY
'Handle del desktop desktop
hWndDesk = GetDesktopWindow()
hDCDesk = GetWindowDC(hWndDesk)
'copia la picture del desktop
r = BitBlt(pB.hdc, 0, 0, WidthDesk, HeightDesk, hDCDesk,
LeftDesk, TopDesk, vbSrcCopy)
r = ReleaseDC(hWndDesk, hDCDesk)
End Function


Thanks again.
Alessandro(IT)
 
S

Stephen Lebans

You're not giving me enough to go on. Can you send me the complete VB
application. Then I can take a look at it and see what's involved to
translate to Access.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
A

ALESSANDRO Baraldi

Stephen Lebans said:
You're not giving me enough to go on. Can you send me the complete VB
application. Then I can take a look at it and see what's involved to
translate to Access.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.

I have little problem with my MailServer so i don't know if you receive my
Exemple because
i receive many Delivery Notification Failure for few days.....
Thanks again...!

Alessandro.
 
S

Stephen Lebans

No, I still have not received your Email.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
A

ALESSANDRO Baraldi

I just send you this morning the block to:
(e-mail address removed)

Many Thanks.
Alessandro[IT].
 
S

Stephen Lebans

Did you have a look at a similiar sample on my site here:
http://www.lebans.com/Magnify.htm
You would only have to add a call to set the Eliptical Region for the
window.

What exactly are you trying to do that you need to do this within an
Access application?
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
A

ALESSANDRO Baraldi

Stephen Lebans said:
Did you have a look at a similiar sample on my site here:
http://www.lebans.com/Magnify.htm
You would only have to add a call to set the Eliptical Region for the
window.

What exactly are you trying to do that you need to do this within an
Access application?


I'm not need Eliptical Region, but only Rect.....!
I'm building for my self a program to Catalogue my Foto....!
So, in my program i want to insert some graphics effects...!
One of this is this, only with Recttangle Lens effect on the
left windows side part.
In Vb all OK, but i want do it with only Access97....!
Hope is better now....!
I'm not very good to explain my thinks, probably for
my bad english, but i also think that is not very easy to do....!

Good Week End from IT

Alessandro.[IT]
 
S

Stephen Lebans

So you simply want to be able to allow the users to see a magnified(up
or down) view of your photos? You would have a better user interface by
simply placing an Image control(s) on a SubForm. WIth manipulation of
the Image control's SizeMode property combined with the built in
functionality of the form's ScrollBars you would have a complete
solution. Have a look here:
http://www.lebans.com/loadjpeggif.htm

Am I understanding correctly what you are trying to do?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


ALESSANDRO Baraldi said:
"Stephen Lebans"
ha scritto nel messaggio news:%[email protected]...
Did you have a look at a similiar sample on my site here:
http://www.lebans.com/Magnify.htm
You would only have to add a call to set the Eliptical Region for the
window.

What exactly are you trying to do that you need to do this within an
Access application?


I'm not need Eliptical Region, but only Rect.....!
I'm building for my self a program to Catalogue my Foto....!
So, in my program i want to insert some graphics effects...!
One of this is this, only with Recttangle Lens effect on the
left windows side part.
In Vb all OK, but i want do it with only Access97....!
Hope is better now....!
I'm not very good to explain my thinks, probably for
my bad english, but i also think that is not very easy to do....!

Good Week End from IT

Alessandro.[IT]
 
A

ALESSANDRO Baraldi

Stephen Lebans said:
So you simply want to be able to allow the users to see a magnified(up
or down) view of your photos? You would have a better user interface by
simply placing an Image control(s) on a SubForm. WIth manipulation of
the Image control's SizeMode property combined with the built in
functionality of the form's ScrollBars you would have a complete
solution. Have a look here:
http://www.lebans.com/loadjpeggif.htm

Am I understanding correctly what you are trying to do?

I just use your fantastic exemple about Immage manipulating with
all the power inside, but is not like the exemple in VB that i send you...!
This will be the new add-ins in my travel............!
In this VbExemple you have a PictureBox in a screen inside this i see
like in a Lens the square region around MousePointer.
It's a dinamic view.
In the VB_Ex work with all Screen Area, but is not Probel, because
i can limit mouse movement inside my Picture....!
Have you seen my file and the effect required...??

I'm giving you many useless trouble, don't worry if you haven't time....!!

Thanks again....!
Alessandro[IT]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top