I've problem with my code in MapBasic for change region style in MapBasic. I've created voronoi and I want to select that voronoi and change the style of it to yellow border and no fill. I already try a code to change that color which I got it from other source but it takes a long time more than I change it manually from MapInfo and when I try to run it becomes not responding.
This is my code
<blockquote> Sub Voronoi
Create Table "voronoi" (Block_no Char(15),Remark Char(10),Type_Palm Char(10),Ha Float) file "D:\voronoi.TAB" TYPE NATIVE >Charset "WindowsLatin1"
Create Map For voronoi CoordSys Earth Projection 1, 104
Create Index On voronoi (Block_no)
Add Map Layer voronoi
Set Map Layer 1 Editable On
Create Object As Voronoi from sensus Into Table voronoi
Update voronoi Set Ha = Area(obj, "sq m")
select * from voronoi where Ha >= Val(inputnumber) into Selection
Call ChangeColor
browse * from Selection
End Sub
Sub ChangeColor
Fetch first from Selection
x = 1
Do oUpdateObj = Selection.obj
b1 = Makebrush (1, 0, 16777215) '
This is my code
<blockquote> Sub Voronoi
Create Table "voronoi" (Block_no Char(15),Remark Char(10),Type_Palm Char(10),Ha Float) file "D:\voronoi.TAB" TYPE NATIVE >Charset "WindowsLatin1"
Create Map For voronoi CoordSys Earth Projection 1, 104
Create Index On voronoi (Block_no)
Add Map Layer voronoi
Set Map Layer 1 Editable On
Create Object As Voronoi from sensus Into Table voronoi
Update voronoi Set Ha = Area(obj, "sq m")
select * from voronoi where Ha >= Val(inputnumber) into Selection
Call ChangeColor
browse * from Selection
End Sub
Sub ChangeColor
Fetch first from Selection
x = 1
Do oUpdateObj = Selection.obj
b1 = Makebrush (1, 0, 16777215) '