ArminKH Well-Known Member Jul 31, 2015 #1 hi can every body please convert this code to JavaObject? Code: Copy Dim Bounds As Rect Bounds.Initialize(0,0,0,0) Dim r As Reflector r.Target=lbl r.Target = r.GetContext r.Target = r.RunMethod("getResources") r.Target = r.RunMethod("getDisplayMetrics") Return((Bounds.Right - Bounds.Left)* r.GetField("xdpi")/ 160) i can't change this r.Target = r.GetContext to javaobject THIS code not worked for me Code: Copy Dim jo =LBL As JavaObject jo.RunMethod("getResources",Null) jo.RunMethod("getDisplayMetrics",Null) Return((Bounds.Right - Bounds.Left)* jo.GetField("xdpi")/ 160) tnx Last edited: Jul 31, 2015
hi can every body please convert this code to JavaObject? Code: Copy Dim Bounds As Rect Bounds.Initialize(0,0,0,0) Dim r As Reflector r.Target=lbl r.Target = r.GetContext r.Target = r.RunMethod("getResources") r.Target = r.RunMethod("getDisplayMetrics") Return((Bounds.Right - Bounds.Left)* r.GetField("xdpi")/ 160) i can't change this r.Target = r.GetContext to javaobject THIS code not worked for me Code: Copy Dim jo =LBL As JavaObject jo.RunMethod("getResources",Null) jo.RunMethod("getDisplayMetrics",Null) Return((Bounds.Right - Bounds.Left)* jo.GetField("xdpi")/ 160) tnx