Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 9th, 2006, 12:09 AM
Authorized User
 
Join Date: Feb 2006
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default Mark a point in Image and handle click event on it

Hi,
I have a big image and a database containing x,y coordinates.
I want to mark the points from the database.
I have one more table in database in which I need to add relations of these points.
Now I want to handle the click event on marked point.
Can anyone help me doing this?
Thanks..


Savan
__________________
Savan
 
Old June 9th, 2006, 01:28 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

If you use the image as an input type="submit" you get the X and Y coordinates of the place where the user clicked the image in the Request.Form collection....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old June 9th, 2006, 02:42 AM
Authorized User
 
Join Date: Feb 2006
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to savan_thakkar Send a message via Yahoo to savan_thakkar
Default

I am really thankful for your quick reply...
Yeah...that's right....I did it when I was making a web application for that.
But later on we decided to do this through Windows Application.
So I have a panel and a picturebox in panel.
I can get the points when user clicks anywhere on the image through the following code.

Dim x, y, res As Integer
        Dim mp As Point
        mp = pb1.PointToClient(Cursor.Position)
        res = cls.FireQry("insert into points(x,y) values(" & mp.X.ToString() & "," & mp.Y.ToString() & ")")
        If res = 1 Then
            MessageBox.Show("Point (" & mp.X & "," & mp.Y & ") added successfully")
        Else
            MessageBox.Show("Record could not be added")
        End If


Now What I want is , I need to mark the points those are already added in the database when the page loads.For that I want to put some image on that particular location.

Savan
 
Old June 9th, 2006, 02:56 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
quote:Yeah...that's right....I did it when I was making a web application for that. But later on we decided to do this through Windows Application.
In that case, I think you are better off posting this in a Win Forms related forum. This one is for ASP.NET.... I don't know much about Win Forms....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with Image Handler Click Event daniel.mihalcea C# 2008 aka C# 3.0 12 March 12th, 2010 06:29 AM
Handle Infra Red event emanueletorre C# 2005 0 December 13th, 2006 06:24 AM
Handle Infra Red event emanueletorre C# 0 December 13th, 2006 06:20 AM
how to handle click event for TextBox gagansharma7 General .NET 4 June 26th, 2006 01:18 PM
Handle Sessin in browser cross button click ashish2001mca General .NET 1 February 9th, 2006 10:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.