Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Include "MAPBASIC.def"
- 'Include "MENU.def"'
- Declare Sub Main
- Declare Sub show_pop_sub
- Declare Sub find_state_sub
- Declare Sub quit_sub
- Global pop as Integer
- Global stateName as String
- Sub Main
- Create Menu "Menu" As
- "Pop of man" Calling show_pop_sub,
- "find state" Calling find_state_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_state_sub
- Dialog
- Title "state"
- Control StaticText
- Title "Enter stateName:"
- Control EditText
- Into stateName
- Control OKButton
- Control CancelButton
- Open Table "E:\study\ОГеоТех\GIS\MAPINFO\DATA\TUT_DATA\TUT_USA\USA\STATES.TAB" Interactive
- select * from STATES where STATES.State_Name = stateName
- dim buffer_75_km As Object
- Fetch First From Selection
- buffer_75_km = Buffer(Selection.obj, 75, 150, "km")
- Insert Into WindowInfo(FrontWindow(), 10)(OBJ) Values(buffer_75_km)
- End Sub
- Sub quit_sub
- Alter Menu Bar Remove "Menu"
- end program
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement