Results 1 to 6 of 6

Thread: Exporting Data Out Of a Form

  1. #1

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Question

    Is there any way to export data from a form to a file. I don't care the type of the file. Could be html, or JPG or whatever. What I want to export is not just text, I would like my exported data to include a photo.
    I mean, my app shows pupils data in a form: name, gender, address, telephone, etc. And it also show the pupil's photo (if available) Does anybody now how to export all this info (photo included) into any kind of file?

    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    'give this a shot..I find sometimes it acts up and grabs the whole screen and I don't know why.
    '
    Code:
    Private Declare Sub keybd_event Lib "user32" _
    (ByVal bVk As Byte, ByVal bScan As Byte, _
    ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
         
    
    Public Sub CaptureScreen(ByVal sFileName As String)
        
        Call keybd_event(vbKeySnapshot, 0, 0, 0)
         
        SavePicture Clipboard.GetData(vbCFBitmap), sFileName
        DoEvents
    End Sub
    
    Private Sub Command1_Click()
    Call CaptureScreen("C:\my documents\asdfg.bmp")
      
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    I gave it a shot. It seems to work. And I guess I already know why it captures the whole screen. However I don't know how not to do it. The Function captures the whole active "window". And if your app is an MDI project, your active window would be your app's parent. By the way, does anybody knows how to capture one of its child window?
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    'that's what I mean by acting up
    try this:
    Call keybd_event(vbKeySnapshot, 1, 0, 0)

    the 0,0,0 is supposed to get only the form
    the 1,0,0 is supposed to get the screen

    but for reasons unknown to me It screws up

    There is a good app I once had and I will look for it
    again that handles different versions or how to do this.
    I will look for it and if you send me and email and I find
    it I will send it to you.

    Wayne
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  6. #6

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    EXCELLENT!! That was what I was needing. THANKS A LOT!
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

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