Printing the Screen From HMG
Moderator: Rathinagiri
Printing the Screen From HMG
Hello Friends
My Name is Bill. I need help in adding a "Print the Screen" function to my project.
My first project is to design a Sudoku helper that allows entry to input the given puzzle numbers, then scans to find all remaining possibilities for the blank squares. It fills the blanks for you and displays results. This now works well, but I would like to avoid using Windows Snipping Tool to save and print the result.
There is an old thread that says HB has a PRINTWINDOW function and gives an example. However that example will not compile. The compiler cannot find such a function and gives numerous syntax errors.
Do any members have a successful solution to printing screen image?
Thanks
My Name is Bill. I need help in adding a "Print the Screen" function to my project.
My first project is to design a Sudoku helper that allows entry to input the given puzzle numbers, then scans to find all remaining possibilities for the blank squares. It fills the blanks for you and displays results. This now works well, but I would like to avoid using Windows Snipping Tool to save and print the result.
There is an old thread that says HB has a PRINTWINDOW function and gives an example. However that example will not compile. The compiler cannot find such a function and gives numerous syntax errors.
Do any members have a successful solution to printing screen image?
Thanks
Re: Printing the Screen From HMG
Andrés González López
Desde Guadalajara, Jalisco. México.
Desde Guadalajara, Jalisco. México.
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Printing the Screen From HMG
Hi Bill, welcome to our community.
This printscreen you have mentioned is it a clipboard copy image ?
This will be save as file ? Or be only displayed and add some text in the images?
To capture image, there is a important graphic function BossTaurus:
BT_BitmapCaptureDesktop
BT_BitmapCaptureWindow
BT_BitmapCaptureClientArea
BT_BitmapClipboardPut
BT_DrawText
These syntax you can find in "Bos Taurus"/ Reference Guide at C:\hmg.3.4.3\DOC HMGDOC
I can not help without screen or any code in your try...
This printscreen you have mentioned is it a clipboard copy image ?
This will be save as file ? Or be only displayed and add some text in the images?
To capture image, there is a important graphic function BossTaurus:
BT_BitmapCaptureDesktop
BT_BitmapCaptureWindow
BT_BitmapCaptureClientArea
BT_BitmapClipboardPut
BT_DrawText
These syntax you can find in "Bos Taurus"/ Reference Guide at C:\hmg.3.4.3\DOC HMGDOC
I can not help without screen or any code in your try...
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- serge_girard
- Posts: 3166
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Printing the Screen From HMG
Hi Bill,
Welcome from Belgium!
Serge
Welcome from Belgium!
Serge
There's nothing you can do that can't be done...
Re: Printing the Screen From HMG
Here is the picture of the screen I want to capture. You can see the Print Button ready to go if I can find out how to print it to my default printer.[img
- Attachments
-
- Capture Sudoku.JPG (257.92 KiB) Viewed 6733 times
Re: Printing the Screen From HMG
Refer link, it may help you
http://hmgforum.com/viewtopic.php?f=9&t=3196
http://hmgforum.com/viewtopic.php?f=9&t=3196
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
Re: Printing the Screen From HMG
Tring to use BosTaurus functions
Does any kind person out there know of a compilable working use of for example BT_BitmapCaptureWindow(form_1,0,0,1040,940).
I have tried using it to get closer to the goal of saving and printing a window image.
It does not work past the linker which decalares it an unrecognized external.
Thanks for reading
Does any kind person out there know of a compilable working use of for example BT_BitmapCaptureWindow(form_1,0,0,1040,940).
I have tried using it to get closer to the goal of saving and printing a window image.
It does not work past the linker which decalares it an unrecognized external.
Thanks for reading
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Printing the Screen From HMG
Hi Bill,
You have forgotten to put form_1 in quotes. Otherrwise any system will interprete as a variable.
Have you read HMGDOC at Bos Taurus item ?
You will see BT_BitmapCaptureWindow return a handle(1). After taking this handle thru a variable you can atttrib to IMAGE control (2) then you can print (3) in graphical mode of course. This is the right sequence. The better thing is to learn by our difficulties than get easily the fish...
1)hBitmap:=BT_BitmapCaptureWindow("form_1",0,0,1040,940) // will get image handle
(See BossTaurus examples: see demo5, demo6 and demo11)
2)Here you have to option: to save to a file (easier way) or use direct from the memory
See this topic (see point #3 of Claudio´s message):
viewtopic.php?p=45801#p45801
3) Read this topic (see Pict2Prn function at code of Claudio´s msg):
viewtopic.php?p=30633#p3063
If you have success with my explaination, please be kind to post your code test for printing screen.
Sorry I can not help more in exemples, because I am without my PC. And I have not any example in this tablet.
You are right. There is not any sample about BT_BitmapCaptureWindow and print (simultaneously, but samples in separated). But you can be the first.bluebird wrote:Does any kind person out there know of a compilable working use of for example BT_BitmapCaptureWindow(form_1,0,0,1040,940)
You have forgotten to put form_1 in quotes. Otherrwise any system will interprete as a variable.
Have you read HMGDOC at Bos Taurus item ?
You will see BT_BitmapCaptureWindow return a handle(1). After taking this handle thru a variable you can atttrib to IMAGE control (2) then you can print (3) in graphical mode of course. This is the right sequence. The better thing is to learn by our difficulties than get easily the fish...
1)hBitmap:=BT_BitmapCaptureWindow("form_1",0,0,1040,940) // will get image handle
(See BossTaurus examples: see demo5, demo6 and demo11)
2)Here you have to option: to save to a file (easier way) or use direct from the memory
See this topic (see point #3 of Claudio´s message):
viewtopic.php?p=45801#p45801
3) Read this topic (see Pict2Prn function at code of Claudio´s msg):
viewtopic.php?p=30633#p3063
If you have success with my explaination, please be kind to post your code test for printing screen.
Sorry I can not help more in exemples, because I am without my PC. And I have not any example in this tablet.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: Printing the Screen From HMG
Thanks about the quotes. However I still get a link error
UNRESOLVED EXTERNAL _HB_FUN_BT_BitmapCaptureWindow
Where is the linker supposed to finf it?
Thanks
UNRESOLVED EXTERNAL _HB_FUN_BT_BitmapCaptureWindow
Where is the linker supposed to finf it?
Thanks
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: Printing the Screen From HMG
http://hmgforum.com/viewtopic.php?f=9&t=4902bluebird wrote:Tring to use BosTaurus functions
Does any kind person out there know of a compilable working use of for example BT_BitmapCaptureWindow(form_1,0,0,1040,940).
I have tried using it to get closer to the goal of saving and printing a window image.
It does not work past the linker which decalares it an unrecognized external.
Thanks for reading
Viva INTERNATIONAL HMG