Author Topic: Screen Print, Windows 10, Logitech K850 Keyboard and QB64  (Read 5469 times)

0 Members and 1 Guest are viewing this topic.

Offline Dimster

  • Forum Resident
  • Posts: 500
    • View Profile
Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« on: December 29, 2020, 11:08:19 am »
I have a new computer and new keyboard/mouse. In the program I'm running there are a number of menu items. Once you select an item it generates a screen full of info. I simply use Sleep and a message to "press space bar to return to the menu". The new keyboard has a little different approach to "Screen Print" key then my old one, in that I now need to hold down  the "fn" key and the "alt/cmd" key and then press the "insert" key. This works fine when the menu is displayed but if I'm on any one of the screens which display the data selected I can't seem to get pass the press of the "alt/cmd" key to press the "insert" for the picture.

The "Sleep" doesn't appear to be the problem. I did alter the coding to an "Input" statement requesting the user of the program to input a value before returning to the main menu and while this did get me past the "alt/cmd" key - pressing the "insert" key on my new keyboard did not take the Screen Shot. It's strange that I can take a Screen Shot of the main menu but none of the data display screens.

Anyone run into this situation? Could this be a limitation of my new keyboard or something in the syntax of my coding?

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« Reply #1 on: December 29, 2020, 11:41:33 am »
Have you tried clicking outside the running app, and then pressing the print screen keys?

You know get the OS's focus out of the QB64 app and then trying the OS function key combo.
« Last Edit: December 29, 2020, 11:42:34 am by bplus »

FellippeHeitor

  • Guest
Re: Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« Reply #2 on: December 29, 2020, 11:42:56 am »
Try a harder pause:

Code: QB64: [Select]


This way, only ESC will move on to the next screen.

You can also copy the display (provided it's a graphical screen) straight to your clipboard:

Code: QB64: [Select]

Offline Dimster

  • Forum Resident
  • Posts: 500
    • View Profile
Re: Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« Reply #3 on: December 29, 2020, 04:46:54 pm »
@bplus . Ya, no joy. Definitely can do a Screen Print almost everywhere but my own data display screen

@FellippeHeitor. I'm going to give those routines a try tomorrow

Thanks guys for looking at this issue for me.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« Reply #4 on: December 29, 2020, 05:18:51 pm »
Hey, you probably have a Snipping Tool, it's an Windows accessory, I have mine pinned on Toolbar. That takes a snapshot of anything you put in it's frame.
« Last Edit: December 29, 2020, 11:11:15 pm by bplus »

Offline Dimster

  • Forum Resident
  • Posts: 500
    • View Profile
Re: Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« Reply #5 on: December 30, 2020, 09:14:09 am »
@FellippeHeitor - the Do Loop didn't work but the Clipboard Image did. The difficulty with the Clipboard Image is that I need to get out of my program run to save that image before returning to the program to run the next data screen (I have multiple data display screens). It would be much faster if I could just take a screen shot and move onto the  next data screen. But, it definitely is a workaround.

@bplus - I found the "Snip & Stretch" accessory, added to my task bar and played with it to familiarize how to use it. It seemed the perfect solution until I realized that my data screens fill the entire screen, the task bar is not visible, I can't access the Snip & Stretch. What a neat little accessory that is. While playing with it, it reminded me of that expression "Squirrel" whenever you see someone distracted from the task at hand.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« Reply #6 on: December 30, 2020, 09:27:03 am »
Have you tried using my SaveImage library?  Instead of _CLIPBOARDIMAGE to save a screenshot of your program, have it SaveImage one automatically for you.  With it, you can grab screenshots on the run.

https://www.qb64.org/forum/index.php?topic=1651.0
« Last Edit: December 30, 2020, 09:28:33 am by SMcNeill »
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

FellippeHeitor

  • Guest
Re: Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« Reply #7 on: December 30, 2020, 10:34:06 am »
@FellippeHeitor - The difficulty with the Clipboard Image is that I need to get out of my program run to save that image before returning to the program to run the next data screen (I have multiple data display screens). It would be much faster if I could just take a screen shot and move onto the  next data screen. But, it definitely is a workaround.

Steve's library is definitely what you're after then. Just a question: I assume before grabbing a screenshot with a key combo became a problem you were grabbing screens one by one and pasting them somewhere else too?

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« Reply #8 on: December 30, 2020, 11:12:46 am »
Quote
@bplus - I found the "Snip & Stretch" accessory, added to my task bar and played with it to familiarize how to use it. It seemed the perfect solution until I realized that my data screens fill the entire screen, the task bar is not visible, I can't access the Snip & Stretch. What a neat little accessory that is. While playing with it, it reminded me of that expression "Squirrel" whenever you see someone distracted from the task at hand.

Yes I thought Full Screens were a problem too but you can still access the tool bar and/or the Start Menu by an ALT+ TAB or Shift + TAB key combo, I think that's the combo, play around with Alt +... or God Forbid, read some Windows Help thingy. There is another key combo for Desktop access or try the Windows Menu button, I use that allot for Task Manager and stopping hanging programs (too bad it doesn't stop Windows Explorer from hanging on .OGG Files).

It's how I got a shot of Stx' prank from Full Screen.

Your Tool is called "Snip & Stretch" not "Snipping Tool"? I wonder if there are 2, I've seen threats of updates of Snipping Tool ie, try this instead of that suggestion now and then like try 3D Paint instead of Paint.
« Last Edit: December 30, 2020, 11:20:39 am by bplus »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« Reply #9 on: December 30, 2020, 12:07:26 pm »
Ho Ho! look what I found!

Snip & Sketch with the key press access:
  [ You are not allowed to view this attachment ]  

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« Reply #10 on: December 30, 2020, 12:14:14 pm »
Test Snip & Sketch, my first try with this thing! for full screen capture, apparently you can cut out shapes too.



Offline Dimster

  • Forum Resident
  • Posts: 500
    • View Profile
Re: Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« Reply #11 on: December 30, 2020, 12:31:26 pm »
@SMcNeill - I've never ventured into capturing images. I now have your SaveImage routine and will definitely see if I can get it to work for me.

@FellippeHeitor - the old keyboard and the new one place the Screen Shot is a "Pictures" folder and within that folder is another one entitled "Screenshots". I'm able to review and see the change in the Data Display screens over time.

@bplus - I did do a "search' on my computer for "Snipping Tool" and "Snipping". Got zilch. Then Snip came up with "Snip & Stretch". I will google Snipping Tool to see if it's a free download somewhere. I do have 3D Paint and will mess around with it. I did try ALT + Tab and had multiple images displayed but found I had to keep Tab down to keep the images on the screen. I will mess around with this as well. I just read your latest re- the Windows Logo key but this new keyboard does not have a Windows Logo key but I wonder if I can configure one of the F keys to mimic it? Another project in the forever tasks involved in setting up new equipment

So I've gone from a blank mind to one full of promises - Thanks again guys

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« Reply #12 on: December 30, 2020, 12:46:26 pm »
Steve's Image capture can get you the precise frame down to the pixel but it takes some coding and familiarizing of the 1700+ LOC for Bi and BM

If you want, I can give you a zip of my tests of capturing screen images from mouse frame like snipping tool. Not sure if SaveImage version is the latest.

Offline Dimster

  • Forum Resident
  • Posts: 500
    • View Profile
Re: Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« Reply #13 on: December 30, 2020, 01:23:52 pm »
@bplus - Thanks, I may take you up on that offer later. Right now I seem to have a lot of potential work arounds. The main thing that has me puzzled is that the main Menu screen is captured fine, no problem at all - it's all the subsequent Data Displays Screens which the Menu Screen calls that are not captured. If it's not something in syntax of the run of the program then it may simply be in the keyboard key strokes or combination thereof which I'm missing. Logitech has little to no info on a User Manual. As mentioned there is no Windows Logo key but this new keyboard has a"cmd" key (ie actual key is Alt/cmd) which appears to relate to Apple Products, so the keyboard good for an ipad. Long story short, before I go messing with my program, I'm going to research the hell out of this new keyboard (also lost my favorite key "Pause/Break" with this keyboard.

Offline Dimster

  • Forum Resident
  • Posts: 500
    • View Profile
Re: Screen Print, Windows 10, Logitech K850 Keyboard and QB64
« Reply #14 on: December 30, 2020, 01:44:41 pm »
---P.S.--- I was able to capture a Data Screen - Seems I have a key entitled "Start/alt opt" using this key (which may be a substitute for the Window's Logo key) I was able to display the Task bar and from there the snip&stretch and then, exactly as you (bplus) demonstrated, captured the screen and I was able to get back into my menu for the next data screen.  I think the phrase "It takes a village to .." should apply to would be programmers.