Problem with door library

gkel

New Member
Licensed User
Probably a beginners question.
The code below works on the desktop, but not on the device.
When I replace the button by an image, it works on both.

Ger


B4X:
Sub Globals
   'Declare the global variables here.

End Sub

Sub App_Start
   Form1.Show
   obj.New1(False)
   obj.FromControl("Button1")
   MouseDownEvent.New1(obj.Value, "MouseDown")
   MouseUpEvent.New1(obj.Value, "MouseUp")
   
End Sub

Sub MouseDownEvent_NewEvent
   form1.Text="button down"
End Sub

Sub MouseUpEvent_NewEvent
   form1.Text="button up"
End Sub
 

agraham

Expert
Licensed User
Longtime User
The Compact Framework is a small subset of the full .NET Framework so not all methods, properties and events that are present on the desktop are implemented on the device. In the case of a Button the mouse events are not present on the device. To use the Door library you need to be familiar with finding what is actually present on the device. For a Button Button Members (System.Windows.Forms) you can see what is implemented on the device by the presence of a device icon by each member. Events are at the bottom of the page.
 
Top