Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can reports become images to be made into wallpaper or desktop image? 5

Status
Not open for further replies.

Docpro777

Programmer
Jul 1, 2003
105
US
I realize this is probably not possible, but:

Can reports be made images to be made into wallpaper or a desktop (backround) image.

(I currently generate images in the main foxpro window via report writer)

Thanks in advance,

Phil

Philip M. Traynor, DPM
 
I would just capture it with PrintScreen button from Print Preview window, then copy to Paint and save.

Stella
 
You can also search for topics that appeared here earlier. some of them discussed sending reports to PDF and some other types of files. I believe some posts provided links to 3rd party tools for sending reports to almost any type of file.
 
Thanks Stella for your input,

If their was:

1) a VFP command for PrintScreen (or better yet, for Print_MainVFP_Window).

and/or

2) a command to make it wallpaper (from within VFP).

Philip M. Traynor, DPM
 
Docpro777

Can I ask? Is this a "real business" "real life" situation? What would make a client's request make it such that he wants a report to be his wallpaper...
I mean just the concept of taking a VFP report to a bitmap is a trick in itself, but as an "expert" to come up with a possible solution makes me question the usefullness of this.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
This is real business/life, Mike. (I am a podiatrist that writes for podiatrists, primarily) Have I ever given you a pseudo-problem or something that was not a powerful scheduling tool? (I've used every precious code you've given me to push MS Outlook to the extreme in VFP, almost to the point of synchronizing the 2 in scheduling dynamics!)

Mike, Please Consider this excellent scenario/reason:

I want to paste the client's (doctor's) vital appointments and/or reminders in a calendar format (daily, weekly, and/or monthly) as temporary desktop wallpaper (not repetitive wallpaper) or image(and/or screensaver). That would save my client from repeatedly launching 'My.exe', Outlook, etc. just to get a glimpse of his schedule ... i.e., when he's on the phone, web, or whatever. He merely looks at his computer screen and VOILA!

I presently have a routine and report that draws a monthly schedule on the main VFP window (it sucks):
**********************************************************
report format 'reports\visit\schedmo' for visit.dos=date()
**********************************************************
Well, as you probably guessed, app-windows get in the way of this main-window VFP-calendar view making it unviewable and impractical.

Now, again, I realize this aspiration is probably not too plausible, Mike (and others) but I ask you merely to consider it if you think its feasible. What a business advantage this might perhaps give you and your non-savvy employees,

...to see your dynamic vital schedule right there on your monitor desktop (even PDAs try to do that). (It blows me away to think about it!)


Philip M. Traynor, DPM
 
If you do a screenshot or otherwise write the info to a BMP, you can use this code to set the wallpaper.

lcBMPFile = "C:\path\schedule.bmp"
DECLARE INTEGER SystemParametersInfo IN user32;
INTEGER uiAction, INTEGER uiParam,;
STRING @pvParam, INTEGER fWinIni
= SystemParametersInfo (20, 5, @lcBMPFile , 3)
 
You might also find How to catpure the Desktop Window?
thread184-700870 interesting.

Brian
 
Philip:

You can use (ALT + PrintScrn) to grab the visible portion
of the application with the current focus.

The only problem with that is, if a portion of the preview
is obscured, you'll have to use graphic api calls to get
the whole window.

There are a number of graphic controls and libraries out
there, so it probably doesn't make sense to re-invent the
wheel if it's for important clients.

Darrell
 
Brian and Darrell,

Your code (on paper at least) looks like its worth experimenting with (hence the stars). I will certainly share any successful code with you as it peradventure succeeds.

(ALT + PrintScrn) is great but requires a command 'keyboard' equivalent:

KEYBOARD '{ALT + PrintScrn}' of course generates error.

It seems if we could generate a bmp file from REPORT FORM command (i.e., something out there) we could then use Brian's code above.

I'll keep you posted.

Thanks,

Philip M. Traynor, DPM
 
ramani's code in Thread184-700870 does the programatic screen shot.

Brian
 
Brian: Thread184-700870 is extremely helpful.

The problem is almost solved by that thread. 2 additional problems arise:

1st Problem) The codewriter admits he's stuck with paint's default location for the saved object. He states:

&& Name as 'SS' the default location for XP is:
&& C:\Documents and Settings\UserName\My Documents\My Pictures
&& Not sure how to pass ":" and "\" required for path

2nd Problem) The codewriter saves in JPEG (which is prefered). I can only get your wallpaper-code (below) to work with bitmaps.

lcBMPFile = "C:\path\schedule.bmp"
DECLARE INTEGER SystemParametersInfo IN user32;
INTEGER uiAction, INTEGER uiParam,;
STRING @pvParam, INTEGER fWinIni
= SystemParametersInfo (20, 5, @lcBMPFile , 3)

Can we alter this wallpaper-code to work for JPEGs or must we always use BMPs?

(Again, thanks for this unexpectedly great thread.)


Philip M. Traynor, DPM
 
Have you considered exporting the info in HTML format and using that html file as the desktop? May even give you some added functionality given that the file could have hyperlinks and more in it. Depends on what the OS is whether you will have the ability to do this.

Slighthaze = NULL
craig1442@mchsi.com
"Whom computers would destroy, they must first drive mad." - Anon​
 
DocPro777

This is real business/life, Mike. (I am a podiatrist that writes for podiatrists, primarily) Have I ever given you a pseudo-problem or something that was not a powerful scheduling tool? (I've used every precious code you've given me to push MS Outlook to the extreme in VFP, almost to the point of synchronizing the 2 in scheduling dynamics!)

Sorry for asking, and I could see the usefullness. Thank you for the explanation.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
The code only seems to work with BMPs. I looked around for how to do it with jpgs, but couldn't find anything. Obviously Windows does allow for this, but maybe it does a conversion first?

Brian
 
DocPro777,

Mike also posted some related code in thread184-702604

Brian
 
Thanks all,

Slighthaze, I know of no seemless code to convert reports to HTML, I'm familiar with vendor software (i.e., f2anyware, etc. and some shaky freeware) though. Perhaps Fox 9.0 will fix that.

Also, Baltman's code only converts bmps (vs JPEGS and/or HTMLs):
***************************************************
lcBMPFile = "C:\path\schedule.bmp"
DECLARE INTEGER SystemParametersInfo IN user32;
INTEGER uiAction, INTEGER uiParam,;
STRING @pvParam, INTEGER fWinIni
= SystemParametersInfo (20, 5, @lcBMPFile , 3)
***************************************************

Now that you mention it, Slighthaze:
Report-->HTML-->Wallpaper IS WORTH WAITING FOR methinks(unless its already here)..

(API calls to MSPaint is shaky at present)

Philip M. Traynor, DPM
 
Hey Doc,

I was just reading the Jan VFUG newsletter and a person there, James Khan, is offering a C++ dll and it's source code that converts JPG to BMP.

Sign-up is free... look under Tips 'n Tricks


Brian
 
Doc,

I just implemeted the dll using the code below and everything went great!

Brian

lcWallpaper="C:\Documents and Settings\brian\My Documents\My Pictures\Img_0011.jpg"

Declare Integer tobmp IN "PCT_DLL.dll" String jpgfilename, String bmpfilename
retval = tobmp(lcWallpaper,JUSTPATH(lcWallpaper)+"\"+JUSTSTEM(lcWallpaper)+".bmp")
if retval = 0
messagebox("Convert jpeg to bitmap success!")
ELSE
messagebox("Failure!")
endif

lcWallpaper=JUSTPATH(lcWallpaper)+"\"+JUSTSTEM(lcWallpaper)+".bmp"

DO JpgWallPaper WITH lcWallpaper

PROCEDURE JpgWallPaper
PARAMETERS lcWallpaper
DECLARE INTEGER SystemParametersInfo IN WIN32API ;
INTEGER uiAction, INTEGER uiParam,;
STRING @pvParam, INTEGER fWinIni

SystemParametersInfo (20 , 0, @lcWallpaper, 3)
 
Brian, I'm excited about studying and implementing this work-around and seeing the whole idea work (however crude it may function).

Time permitting I'll keep you posted: re-state the conclusive code, and/or discuss a few other loose ends.

Thanks again for your exceeding thoughtfulness in this matter.

Philip M. Traynor, DPM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top