MouseMoveFunction

wm.chatman

Well-Known Member
Licensed User
Longtime User
:)Hi

this is VB code. Need some assist. for writting to B4PPC code PLEASE.

Private Sub imgRight_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim X2, Y2 As Single
On Error GoTo Hell:
X2 = X
Y2 = Y

If (Start) And Button = 1 Then

With imgRight
If .Left - X1 + X2 > imgMargin.Left Then
imgRight.Left = imgMargin.Left
Else
.Move imgRight.Left - X1 + X2
End If
End With

End If


Hell:
Exit Sub
End Sub

Thank you and Merry Xmas and Happy New Year.

Best regards.

William
 

klaus

Expert
Licensed User
Longtime User
To be able to help you, you must give more explanations on :
- what your code is supposed to do
- what kind of objects imgRight and imgMargin are
- what value does X1 represent
- what is this line .Move imgRight.Left - X1 + X2
supposed to do

If imgRight and imgMargin are Images you must know that the MouseDown, MouseMove and MouseUp events are not directly available in B4PPC, you will need the Door library to get them.

Best regards.
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
:) Hi Klaus

its great that you took a look Klaus. Danke.

Hope all is well, with you!

Yes, imgRight and imgMargin had been the Images. But thinking I found something useful with MouseDown, MouseMove and MouseUp events, within this great Forum. At this time I am studying the Door library.
This Door lib seems quite popular.
Klaus, actually we can pass on the vb code I had posted.
Thank you for wanting to help.

Merry Xmas and a Happy New Year.

Best regards.

William
 
D

Deleted member 103

Guest
Hallo William,

have you ever tried fgMouseEvents views the function of my library fgControls?
I think that's exactly what you are looking for.

hast du schon mal die Funktion fgMouseEvents von mein Library fgControls probiert?
Ich denke das ist genau das was du suchst.


Ciao,
Filippo
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
from LINE CUTTER.

I may well have missed something here, but I'd like to be able to trap mouse/stylus events within an image, rather than having to display the graphics on the form.

e.g. Image_mouseUp(x,y) instead of Form1_MouseUp(x,y)

could someone add sbp example for me?
 

klaus

Expert
Licensed User
Longtime User
Here you have an example on trapping the mouse events on an Image control.​

I still ask my questions onece more, what do you want to do ?​

If you want to draw something you should, no you MUST, use the ImageLibEx library. In that case you draw onto a BitmapEx object. This one you can copy onto the from's background, so no need of an Image control.
For that you have all you need in the http://www.b4x.com/forum/tutorials/5191-graphics-tutorial.html.​

But well, it depends on what you want to do.​

Best regards.​
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
Klaus.

danke / thanks for quick respond.

what I want to do... learn how to code this up, to get the TRUIdb Functions brought to an end!
like Preview before the Photo is saved to file...
 

klaus

Expert
Licensed User
Longtime User
Sorry, but this still doesn't explain me what you want to do.
You posted a VB code to translate.
There were questions you didn't answer.
So what is this code supposed to do ?
Or, more generally, what TRUIdb Functions do you want ?

To be able to help, you must be more precise, otherwise it's very difficult for us to help. Explain what the function you are missing should do.

Best regards.
 

wm.chatman

Well-Known Member
Licensed User
Longtime User
What the functions should do.

the functions that are missing is Jothas Camera version that I like to get to run in our TRUIdb APP.
The VB code to translate, is Deadwood, because I cant use. I thought I could use to show Photo Preview. I was mistaken.

Best regards.

Limited Knowledge
 
Top