locked
How to set a picture of the GraphicsWindow or a part of the GraphicsWindow into ImageList RRS feed

  • Question

  • How can i set a picture of the GraphicsWindow (or a part of the GraphicsWindow) into ImageList for further processing with availible ImageList related methods there?

    I think about PictureTools.TakeScreenShot to save the whole DT into ImageList and crop the GW part there or save the GW to a file via LDUtilities.GWCapture and load this file into ImageList again for further processing.  Or is there any direct method i've overseen or don't remember ??

    Tuesday, July 15, 2014 7:31 PM
    Answerer

Answers

  • I think the LDTextWindow.KeyDown will work.

    I did some temp uploads for the JR suggestions coz from experience it often takes a few iterations to get the options right and tested.

    So probably easier to just wait for main uploads which should be more stable.

    Wednesday, July 16, 2014 10:41 PM

All replies

  • As far as I know these are the ways to do it.
    Tuesday, July 15, 2014 8:56 PM
  • Ok, thanks LitDev,

    Maybe a suggestion?

    For a desktop wide colorpicker i have a little GW-ToolWindow with color(values), coords, etc. that flees from the mouse if the mouse comes on the window. Any idea to interact again with this GW? eg. to switch of running away  from the mouse or quit the program. Can't use left click nor right click on desktop for that and keys only work if mouse is on in the GraphicsWindow. Any ideas?

    Tuesday, July 15, 2014 10:36 PM
    Answerer
  • Not sure I follow exactly, but "keys only work if mouse is on in the GraphicsWindow".

    Check out LDTextWIndow.KeyDown

    This is low level Operating system and should work even if GW or TW don't have focus.

    TextWindow.Show()
    GraphicsWindow.Show()
    
    LDTextWIndow.KeyDown = OnKeyDown
    
    Sub OnKeyDown
      TextWindow.WriteLine(LDTextWindow.LastKey)
    EndSub

    Wednesday, July 16, 2014 6:39 PM
  • Oh, i  have deactivated the flag for 'GW flees from mouse' to default behaviour and deactivated colorpicking if mouse is on GW, to allow dragging it.

    But that (LDTextWindow.KeyDown) would be a great suggestion and i hope this will work. Also will try LDEvents.MouseWheel  to toggle GW moving by middle mousekey click.

    Upped the v113 xml, before i saw on JR's thread that there's already a further update with an extension, so 'll check that one and till tomorrow,...

    Wednesday, July 16, 2014 10:36 PM
    Answerer
  • I think the LDTextWindow.KeyDown will work.

    I did some temp uploads for the JR suggestions coz from experience it often takes a few iterations to get the options right and tested.

    So probably easier to just wait for main uploads which should be more stable.

    Wednesday, July 16, 2014 10:41 PM
  • Roger & OK,

    but maybe although get the previous upload here, i've added properties for all the LDColours.Colorname, if you like, before i delete it. Then i don't need to add that tomorrow.


    • Edited by Pappa LapubEditor Wednesday, July 16, 2014 10:51 PM Ups, link would be good
    Wednesday, July 16, 2014 10:50 PM
    Answerer
  • LDTextWindow.KeyDown works perfect and is exactly what i was searching for! Thanks!

    Here is the latest LitDevDe.xml

    To show up in IntelliSense i had to change:

    P:LitDev.LDColours.Firebrick   to FireBrick  and

    P:LitDev.LDColours.SeaShell  to Seashell

    (Anything seemed to conflict there, hmm).

    Also found some more working solutions for GW-Shot like:

    RZGraphicsWindow.EveryWindowScreenShot(GraphicsWindow.Title, SShotFile)   ' GW to file

    RZGraphicsWindow.EveryWindowScreenShot("Program Manager", SShotFile)   ' DT to file

    SPExtra.SendKeys("{PRTSC}")   ' DT to Clipbrd

    SPExtra.SendKeys("%{PRTSC}")  ' GW to Clipbrd

    KeyboardBuffer.SendAlt("{PRTSC}")  ' GW to Clipbrd

    KeyboardBuffer.SendString("{PRTSC}")  ' DT to Clipbrd

    KeyboardBuffer.SendString("%{PRTSC}")  ' GW to Clipbrd

    Thursday, July 17, 2014 10:31 PM
    Answerer