diff --git a/app/src/gambas3/.src/Editor/Form/CControl.class b/app/src/gambas3/.src/Editor/Form/CControl.class index a0e83a6e5..5f36b11b0 100644 --- a/app/src/gambas3/.src/Editor/Form/CControl.class +++ b/app/src/gambas3/.src/Editor/Form/CControl.class @@ -875,7 +875,7 @@ Private Function ConvertToString(vVal As Variant, hProp As CPropertyInfo) As Str If IsLong(vVal) Then sVal = Hex$(vVal, 8) If sVal Begins "00" Then sVal = Mid$(sVal, 3) - Return "&H" & sVal & "&" + Return "&H" & sVal Else Return vVal Endif diff --git a/app/src/gambas3/.src/Editor/Form/FForm.class b/app/src/gambas3/.src/Editor/Form/FForm.class index c121a39cd..7fe310b47 100644 --- a/app/src/gambas3/.src/Editor/Form/FForm.class +++ b/app/src/gambas3/.src/Editor/Form/FForm.class @@ -440,6 +440,10 @@ Private Sub FromString(sData As String, Optional hParent As CControl) As String Else + If sValue Begins "&" And If sValue Ends "&" Then + sValue = Left(sValue, -1) + Endif + Try vValue = CInt(Val(sValue)) If Not Error Then Goto SET_PROPERTY