CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 1999
    Posts
    4

    Print contents of a Filebox

    Ok, I'm new here and this is my first post... Looks like a good site!!! I just want to print the contents of my filebox... I can get the files to open up in the filebox but can't get them to print? Can you even do this? I'm sorry for the stupid question but i'm just a beginner and really really really appreciate everyone's help!!! Thanks and any response would be great!

    Ryan


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: Print contents of a Filebox

    what do you mean by "Filebox"? the FileListBox control?
    If so, the "easiest" way to print files is IMHO by means of the ShellExecute API as in

    dim lRet as long
    lRet = ShellExecute( me.hwnd, "print", yourfilegoeshere,...)



    This will launch the app associated with the file's extension and cause the started app to print the contents of the file.
    If you call that function for a ".doc" file, WORD will be started and it will print the contents of the document.


  3. #3
    Join Date
    Jul 1999
    Posts
    4

    Re: Print contents of a Filebox

    Ok, that's not really what I want to do. I want to print the whole list of FILENAMES!! Not the contents of a file. Like I have 150 files in a directory. I want to print the names of them files! Thanks though, any more thoughts?


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

Featured