Door library (Beta) - Special library

francisco cobos

Member
Licensed User
Longtime User
Sorry Erel for my clumsiness, next time I will use a new tread... The thing is I would like use de Hekkus library (Thanks Louis and Erel for this great library) to play a sound just while a hey is pressed: From keydown (the sound start) to Keyup event (the sound strop). Maybe is an stupid question, but I don't know how get that...
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Sorry you can't do it with a textbox.
Try this:
obj is an Object, eventKey... is Events.
B4X:
Sub App_Start
    Form1.Show
    obj.New1(false)
    obj.FromControl("form1")
    obj.SetProperty("KeyPreview",true)
    eventKeyDown.New1(obj.Value,"KeyDown")
    eventKeyUp.New1(obj.Value,"KeyUp")
End Sub

Sub eventKeyDown_NewEvent
    obj.Value = eventKeyDown.Data
    form1.Text = obj.GetProperty("KeyCode") & " is down"
End Sub

Sub eventKeyUp_NewEvent
    form1.Text = "Key Up"
End Sub
 

berndgoedecke

Active Member
Licensed User
Longtime User
BindingContext property with Door.dll?

Hello Erel,
is it possible to use the BindingContext property of an control to bind datas of a SQLite-Table e.g. to that control, with door libary and if so, how??

Best Regards

berndgoedecke
 

yuzree

New Member
Licensed User
Doesn't work with TreeView controls on the device (NullReferenceException thrown). Works fine on desktop.
B4X:
Sub App_Start    
    objMain.New1(False)
    objMain.Value = tvMain.ControlRef
    objMain.SetProperty("Sorted", "True")
    
    frmMain.Show
End Sub
Same outcome with:
B4X:
objMain.FromControl("tvMain")
objMain.FromControl(tvMain.ControlRef)
 

agraham

Expert
Licensed User
Longtime User
Last edited:

klaus

Expert
Licensed User
Longtime User
Hi Andrew,

I am afraid that M. Alzheimer has joined me, I really didn't remember this.
Anyway I am somewhere glad that I reinvented that wheel on my own in playing with the Door library.

The 'funny' thing is that I asked you for that at that time. I remembered something but not this.

Best regards and sorry.
 

ashrafidkaidek

Member
Licensed User
Longtime User
MinimizeBox

is there a way to use the Door library to make sure that the minimixebox is not showing (i need to make sure that the app will have the "x" button on the top right hand not the minimizebox)

i know that Formlib can do that, but i'm interested in doing it using the Door library if it is possible.

a code example will be a perfect to answer to my question

Thank you all
 

Zenerdiode

Active Member
Licensed User
Not tested, but something like this?

Obj1 is a Door object:

B4X:
Obj1.New1(False)
Obj1.FromControl("Form1")
Obj1.SetProperty("MinimizeBox",False)
 

Discorez

Member
Licensed User
Longtime User
Erel, I didn't know it...
About this method wrote chanppc Here, and I have thought that it will work...
 

Discorez

Member
Licensed User
Longtime User
Please, help me with such question:
How to get values of fields from structure properties of control/form?
For example, Control.Font.Size, Control.Font.Name, e.t.c.

My code returns "0" -
B4X:
Obj.New1(False)
Obj.FromControl("Button1")
FontInfo.CreateNew("System.Drawing.Font" & FontInfo.System_Drawing)
FontInfo.Value = Obj.GetProperty("Font")
Msgbox(FontInfo.Value.Name)
 

agraham

Expert
Licensed User
Longtime User
B4X:
   Obj1.New1(False)
   Obj2.New1(False)
   Obj3.New1(False)
   Obj1.FromControl("Button1")
   Obj2.Value = Obj1.GetProperty("Font")
   Obj3.Value = Obj2.GetProperty("Size")
   Msgbox(Obj2.GetProperty("Size"))
   Msgbox(Obj2.GetProperty("Name"))
   Msgbox(Obj2.GetProperty("Style"))
Actually you can't do any more with a Font in the Compact Framework than is already exposed by the Control itself (Size) and the FormLib library (Name and Style).
 
Top