View previous topic :: View next topic |
Author |
Message |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Tue Dec 28, 2004 1:41 pm Post subject: Is it possible to save contents of eg. .Panel to bmp-file ?? |
|
|
Need this for some custom SysInfo -> Backgroundimage App here.
(Can't use BGInfo or such as I am not allowed to change anything on these systems and therefore as well can't run applications that are non-conform )
Basic idea is to load the original bitmap to either Panel or Picturebox, then overlay it with, for example, a GroupBox with different Backcolor properties (for different Subnets) and attach some textboxes to it ... hehe ... now the tricky question ... is there any possibility to get all this content of either the Panel or Picturebox saved to a picture file ?
If yes,please give me some keywords here  _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Lonkero KiXforms Devotee


Joined: 13 Mar 2003 Posts: 1022 Location: Espoo, Finland
|
Posted: Wed Dec 29, 2004 8:48 am Post subject: |
|
|
sure there is.
done it already.
the downside is that you can have it PPM only... remember that image format from the kixgolf?
and why is that? because kix only supports text and kixforms does not have a "save-method" _________________ Hammer |
|
Back to top |
|
 |
Lonkero KiXforms Devotee


Joined: 13 Mar 2003 Posts: 1022 Location: Espoo, Finland
|
|
Back to top |
|
 |
Lonkero KiXforms Devotee


Joined: 13 Mar 2003 Posts: 1022 Location: Espoo, Finland
|
Posted: Wed Dec 29, 2004 9:57 am Post subject: |
|
|
k, this is not the save way and there is actually no easy way to convert it around...
gonna keep looking... _________________ Hammer |
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Wed Dec 29, 2004 10:55 am Post subject: |
|
|
The major problem is the unability to copy the 'whole' content of a .Panel object (including child objects) to the clipboard or better the unability to save it directly as bmp... hmmm ... this can be viewed as a statement and a request at the same time
Shawn ? Is there any chance of a special development build, just for me ?
Please ?
 _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Lonkero KiXforms Devotee


Joined: 13 Mar 2003 Posts: 1022 Location: Espoo, Finland
|
Posted: Wed Dec 29, 2004 11:34 am Post subject: |
|
|
hmm...
not anymore sure what you want...
you want to have the big picture, the whole image, not childobjects separately or anything, right?
you want the same effect as one has with pressing printscreen, no? _________________ Hammer |
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Wed Dec 29, 2004 12:38 pm Post subject: |
|
|
Aye, that's correct, but only for this one .Panel and all its childs (graphically).
But, if it was like printscreen it would fail in my case because the whole picture isn't visible anyway because of different sizes for background bitmaps
The .Panel resides inside a groupbox and gets the bitmap for the corresponding resolution as .BackgroundImage, the .Location is calculated from the lower right corner coordinates minus Width and Height of the bitmap ; thus only the lower right part of the image is visible on form (That's the place the 'label' should be created)
 _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Lonkero KiXforms Devotee


Joined: 13 Mar 2003 Posts: 1022 Location: Espoo, Finland
|
Posted: Thu Dec 30, 2004 8:07 am Post subject: |
|
|
gone little far from the original question, don't you think?
going back.
you wanted to save content to bmp file = you want to have the content saved in same way as printscreen does.
then, the object references are not important in any way.
but, taking on...
you can do printscreen with kixtart but can you do paste from clipboard into picturebox?
if yes, then it is possible...
also, if RTbox would have been worked out previously, it would be able to write the image to RTF file.
anyways.
why you need this?
wouldn't it be simpler to trace what is going on and keep record of that?
printscreening is kinda "debugging" tool. what this would be for? _________________ Hammer |
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Thu Dec 30, 2004 8:35 am Post subject: Re: Is it possible to save contents of eg. .Panel to bmp-fil |
|
|
Jochen wrote: | Need this for some custom SysInfo -> Backgroundimage App here.
|
See ?
Basically it's taking a wallpaper bitmap, writing some info about the system to it, saving it as bitmap and copy it back to the client.
Btw. Welcome to the l33t Kixforms Advocate's Club  _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Lonkero KiXforms Devotee


Joined: 13 Mar 2003 Posts: 1022 Location: Espoo, Finland
|
Posted: Thu Dec 30, 2004 9:55 am Post subject: |
|
|
oh, so is this gonna be windows background image? _________________ Hammer |
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Thu Dec 30, 2004 10:24 am Post subject: |
|
|
yap _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Lonkero KiXforms Devotee


Joined: 13 Mar 2003 Posts: 1022 Location: Espoo, Finland
|
Posted: Thu Dec 30, 2004 10:49 am Post subject: |
|
|
oh, then would ask from shawn to write binary file operations to kixforms or add SaveAs or Write method to picturebox _________________ Hammer |
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Thu Dec 30, 2004 1:11 pm Post subject: |
|
|
The problem here is that neither .Label nor .PrintXY is accepted by .PictureBox so that'd be a dead end.
Best would be .SaveAs() for .Panel (which accepts Labels), but the problem I could think of is still the ability of .SaveAs to 'include' the labels (childs of .Panel) in the big picture.
Shawn ? _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Jochen KiXforms Devotee


Joined: 05 Mar 2003 Posts: 1204 Location: Stuttgart, Germany
|
Posted: Thu Dec 30, 2004 1:27 pm Post subject: |
|
|
Hmmm ... just found out that .Panel (with the current dev build) displays an Image created by
$img = $Panel.Image("ImagePath")
and this little basta accepts then .Labels
$label = $img.Label("Yalla",400,400,80,15)
might come in Handy when we get to SaveAs ...
Maybe a SaveAs Method for .Image object ??? / _________________ Jochen
Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand. |
|
Back to top |
|
 |
Shawn KiXforms Developer


Joined: 22 Feb 2003 Posts: 1983 Location: Canada
|
Posted: Thu Dec 30, 2004 4:32 pm Post subject: |
|
|
ok cappy give a try latest dev. build.
$control.savebitmap("filename.bmp")
This is just a test/experiment.
;0) |
|
Back to top |
|
 |
|