Results 1 to 9 of 9

Thread: Location() property

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    Location() property

    I don't normally code in asp.net...I do mainly desktop apps with vb.net
    I'm trying to grab the location of a control at run-time but the Location property doesn't seem to exist.

    What's a way to capture the upper left corner and lower right corner of a control?

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Location() property

    I think you should explain what you're trying to do.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    Re: Location() property

    I'm trying to create a rectangle object by using the coordinates of a datagrid. I'm trying to do a screen capture. I've explored other articles and such and just simply want to grab the contents of a datagrid. The height will vary but the width should stay the same every time.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Location() property

    That's an odd requirement.

    If you want the datagrid's contents, use the dataset's writeXML method. It will give you the contents of the dataset (which is what is in the datagrid anyways) into an XML file.

    If you're talking in terms of the GUI, as in, you want to take a screenshot of your ASP page with the grid on it, then, you cannot. You'd have to use something like an ActiveX control.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    Re: Location() property

    It IS and odd requirement...here is the whole story...I test a reef tank's water qualility on a regular basis. I plug those readings in a database. I wanted to be able to press a button and create a datagrid (like the shot above), then capture it, create a .jpg file, name it, ftp it to a server and over-write the file that is already there. This image is the 'signature' for me in a forum I am a member of that deals with reef tanks..This way, at any given time, others can see the quality of my water.

    great idea but hard and probably not worth the trouble...the way i do it now is create the grid, then use PrintKey (a freeware program) to grab what I want off screen, save it, ftp it....I't all about a 30 second process but since I'm a developer, I thought I should use my skills LOL

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    Re: Location() property

    oops..correction...the image isn't 'above' in this post, i posted a similar question in the vb.net forum.

  7. #7
    Fanatic Member -TPM-'s Avatar
    Join Date
    Jul 2005
    Posts
    850

    Re: Location() property

    Well in answer to your original question, the location is in the controls style property.

    As for why you want it, do you really need a screen shot? Why not just have the server stick the data in an excel sheet or something.
    TPM

    Add yourself to the VBForums Frappr Map!!

  8. #8

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    Re: Location() property

    Quote Originally Posted by -TPM-
    Well in answer to your original question, the location is in the controls style property.

    As for why you want it, do you really need a screen shot? Why not just have the server stick the data in an excel sheet or something.
    Because I'm not doing anything with the data...I'm using the grid as a signature to display latest conditions.

  9. #9
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Location() property

    Ah I see... then it might be possible. You can generate images in ASP.NET dynamically, and I believe that's what you need to start with.

    Read these:
    http://www.sitepoint.com/article/gen...net-images-fly

    http://msdn.microsoft.com/msdnmag/is...4/CuttingEdge/

    HTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width