Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > General > Chit Chat
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Chit Chat The place for open discussions.

MouseMoveFunction

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-24-2009, 08:45 PM
Basic4ppc Veteran
 
Join Date: Jan 2009
Location: Bayern, Germany
Posts: 489
Awards Showcase
Beta Tester 
Total Awards: 1
Default MouseMoveFunction

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
Reply With Quote
  #2 (permalink)  
Old 12-25-2009, 09:23 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,826
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

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.
__________________
Klaus
Switzerland
Reply With Quote
  #3 (permalink)  
Old 12-25-2009, 05:31 PM
Basic4ppc Veteran
 
Join Date: Jan 2009
Location: Bayern, Germany
Posts: 489
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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
Reply With Quote
  #4 (permalink)  
Old 12-25-2009, 06:56 PM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 906
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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
__________________
PPC: MDA Pro, 2GB SD
Device: HTC Desire , Android 2.2
______________________
Reply With Quote
  #5 (permalink)  
Old 12-25-2009, 08:15 PM
Basic4ppc Veteran
 
Join Date: Jan 2009
Location: Bayern, Germany
Posts: 489
Awards Showcase
Beta Tester 
Total Awards: 1
Default

working on Naegel mit Knoepfe...
Reply With Quote
  #6 (permalink)  
Old 12-25-2009, 08:28 PM
Basic4ppc Veteran
 
Join Date: Jan 2009
Location: Bayern, Germany
Posts: 489
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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?
Reply With Quote
  #7 (permalink)  
Old 12-25-2009, 08:44 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,826
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

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.basic4ppc.com/forum/tutor...-tutorial.html.

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

Best regards.
__________________
Klaus
Switzerland
Reply With Quote
  #8 (permalink)  
Old 12-25-2009, 08:52 PM
Basic4ppc Veteran
 
Join Date: Jan 2009
Location: Bayern, Germany
Posts: 489
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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...
Reply With Quote
  #9 (permalink)  
Old 12-25-2009, 09:10 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 3,826
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

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.
__________________
Klaus
Switzerland
Reply With Quote
  #10 (permalink)  
Old 12-25-2009, 09:29 PM
Basic4ppc Veteran
 
Join Date: Jan 2009
Location: Bayern, Germany
Posts: 489
Awards Showcase
Beta Tester 
Total Awards: 1
Default

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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


All times are GMT. The time now is 09:00 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0