Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
I have a picture which is to be stored on top of a grid. The grid should come on top of the picture and whenever a user click on a cell in a grid, the corresponding values(predecided or pixels) needs to be retrieved. How can it be done? Thanx!
Posted
Can you please put some code? I'm new to .Net! If we use the graphics object to draw a grid, will be picture be in the picturebox and over that do we use the graphics object or what? Please help and explain by code! Thanx a lot!
  • *Experts*
Posted

What exactly are you trying to accomplish? Are you wanting to place a grid of lines on top of a picture or the other way around (your first line says a picture on top of a grid)?

 

What are you trying to retrieve when they click? A list of ALL the pixels inside the grid cell? As an array or what...?

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted
Well it can be either ways. Whichever is possible. But placing a picture on top of a grid would be more helpful coz in that manner I can retrieve the row and column number of the particular cell that he has clicked (It's possible right?). See I'll tell you what I want. See I have a picture with me. It should be overimposed with grid lines giving seperate values for each grid. So when the click on a particular grid box, the value such as A1, B2, C4, D3 (as in excel) could be retreived and stored in database. Is it clear? Please helP!!! Thanx a lot!!
  • *Gurus*
Posted
If you mean the size of it, sure. You'll notice at the top of the code for the form there are two constant values, one for the horizontal spacing in the grid and one for the vertical spacing. You can modify these to your own size.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...