Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Include "MAPBASIC.def"
- Declare Sub Main
- Declare Sub show_pop_sub
- Declare Sub find_city_sub
- Declare Sub quit_sub
- Global pop as Integer
- Global cityName as String
- Sub Main
- Create Menu "Menu" As
- "Pop of man" Calling show_pop_sub,
- "find city" Calling find_city_sub,
- "End" Calling quit_sub
- Alter Menu Bar Add "Menu"
- End Sub
- Sub show_pop_sub
- Dialog
- Title "man pop in state"
- Control StaticText
- Title "Enter mans:"
- Control EditText
- Into pop
- Control OKButton
- Control CancelButton
- Open Table "E:\study\ОГеоТех\GIS\MAPINFO\DATA\TUT_DATA\TUT_USA\USA\STATES.TAB" Interactive
- select STATES.State_Name,STATES.Pop_Male from STATES where (STATES.Pop_Male > pop)
- end sub
- Sub find_city_sub
- Dialog
- Title "city"
- Control StaticText
- Title "Enter cityName:"
- Control EditText
- Into cityName
- Control OKButton
- Control CancelButton
- Open Table "E:\study\ОГеоТех\GIS\MAPINFO\DATA\TUT_DATA\TUT_USA\USA\STATES.TAB" Interactive
- Open Table "E:\study\ОГеоТех\GIS\MAPINFO\DATA\TUT_DATA\TUT_USA\USA\CITY_125.TAB" Interactive
- select * from City_125 where city = cityName
- dim buffer_25 As Object
- Fetch First From Selection
- buffer_25 = Buffer(Selection.obj, 25, 200, "km")
- alter object buffer_25 Info OBJ_INFO_PEN, makepen(2,2,BLACK)
- alter object buffer_25 Info OBJ_INFO_BRUSH, makebrush(1,0,BLACK)
- Insert Into WindowInfo(FrontWindow(), 10)(OBJ) Values(buffer_25)
- End Sub
- Sub quit_sub
- Alter Menu Bar Remove "Menu"
- end program
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement