Am working on a project in creating an application with a map of schools whereby if one clicks on a school attributes about that schools are shown. Is there anyone out there who can help please
Creating an Application with a Map
Page 1 of 114 Replies - 1051 Views - Last Post: 07 May 2009 - 12:43 AM
Replies To: Creating an Application with a Map
#2
Re: Creating an Application with a Map
Posted 24 April 2009 - 04:09 PM
So you have an image displayed via your form, picturebox, image control, or some other control. Well then, look at whatever you are using to see if it has a mouse move event. If it does then part of those arguements should contain a "Button" arguement. Now, with all of that information, you should be able to capture the x and y of where the user clicked. Then you will have to test the x and y values to see which school they clicked on. From there, you can then display the information you want.
Good Luck
Good Luck
#3
Re: Creating an Application with a Map
Posted 27 April 2009 - 05:28 AM
Thanks a lot for that. I have a Map already loaded but im not getting what you are trying to put across can you please explain. thanx in advance
#4
Re: Creating an Application with a Map
Posted 27 April 2009 - 05:56 AM
This is to capture a point. Just limit the range of the area.
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Label1.Caption = X Label2.Caption = Y End Sub
#5
Re: Creating an Application with a Map
Posted 28 April 2009 - 05:39 AM
iv got to admit yes its about to work but im having trouble determining the X and Y values to use how do i do that?
#6
Re: Creating an Application with a Map
Posted 28 April 2009 - 05:43 AM
Hard to interpret your question:
Do you mean you cant get the values to display?
Later:
Use something like: If the value of X and the value of Y equals this or that then Some message box appears or a new form appears.
Do you mean you cant get the values to display?
Later:
Use something like: If the value of X and the value of Y equals this or that then Some message box appears or a new form appears.
#7
Re: Creating an Application with a Map
Posted 28 April 2009 - 07:03 AM
#8
Re: Creating an Application with a Map
Posted 28 April 2009 - 10:21 PM
Please give feedback!
#9
Re: Creating an Application with a Map
Posted 02 May 2009 - 11:04 AM
If (X > 10 And X < 20) And (Y > 10 And Y < 20) Then 'Do something ElseIf...
Good Luck
#10
Re: Creating an Application with a Map
Posted 06 May 2009 - 04:50 AM
Ok i did what you said and what i am getting are X and Y values of the points i select on the map. What i want the application to do is this right, i have attributes( the fields being enrollment, number of teachers, capacity,address) of certain schools in a database table
say i click on school A the above fields should be displayed with the data relating to school A
if this is not clear just reply to this thread. thanks in advance
say i click on school A the above fields should be displayed with the data relating to school A
if this is not clear just reply to this thread. thanks in advance
#11
Re: Creating an Application with a Map
Posted 06 May 2009 - 05:00 AM
Just an example:
Private Sub a_Click() Form2.Show End Sub
This post has been edited by firebolt: 06 May 2009 - 05:00 AM
#12
Re: Creating an Application with a Map
Posted 06 May 2009 - 06:50 AM
Thanks for that but now how do i get the data in the the database to be reflected?
#13
Re: Creating an Application with a Map
Posted 06 May 2009 - 11:44 AM
Create your userform
Add your labels to the userform
Add a command button for them to close it when they are done.
This example will display what is between the “” marks. If you want it to pull from the data base then you need to give it the reference of where the information is located. It depends on the data base as to how to make the reference. It will probably be along the lines of :
Label1.caption = filename.cell (“A1”)
Add your labels to the userform
Add a command button for them to close it when they are done.
This example will display what is between the “” marks. If you want it to pull from the data base then you need to give it the reference of where the information is located. It depends on the data base as to how to make the reference. It will probably be along the lines of :
Label1.caption = filename.cell (“A1”)
Private Sub SchoolA_Click() UserForm1.Show Label1.Caption = "Enrollment" Label2.Caption = "Number of Teachers" Label3.Caption = "Street Address" Label4.Caption = "City, St Zip" End Sub Private Sub CmdClose_Click() UserForm1.Hide Unload UserForm1 End Sub
#14
Re: Creating an Application with a Map
Posted 06 May 2009 - 09:22 PM
use the mouse down event and set your query string where I have put the 'do something. Then at the end execute the query.
However, if you are using a popup form to show your data you can then set a variable at the 'do something and pass that variable to your popup form through a public sub or use a public variable declared in a module. Then your popup form would read that variable and based upon it, it would query your database for the appropriate information.
Good Luck
However, if you are using a popup form to show your data you can then set a variable at the 'do something and pass that variable to your popup form through a public sub or use a public variable declared in a module. Then your popup form would read that variable and based upon it, it would query your database for the appropriate information.
Good Luck
#15
Re: Creating an Application with a Map
Posted 07 May 2009 - 12:43 AM
thanks guys il give feedback
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|