x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Release: CaptVB

1 2
WinCEDev Page Icon Posted 2023-09-06 9:46 PM
#
Avatar image of WinCEDev
Factorite (Senior)

Posts:
77
Location:
Europe
Status:
torch - 2023-09-02 7:14 AM

Thank you for checking this out.
Unfortunately the new version is unchanged.
I still get the “Starting” message. Then it minimizes into the system tray (but no icon is present )

As C:Amie and I dunk for bananas figured out when we were testing VB runtime on x86, for some reason, it’s a little funky. I think about 75% of the vb programs in SCL work on x86.


That's so strange, I was almost certain that you would be seeing a bit more happen this time.
When you dismiss the "Starting!" message, it is still nowhere near the actual code that takes the screenshot...

Since I removed the DoEvents code with our last test, all it is doing before it will show the next debug message is hiding and disabling the window.

Relevant code:

... MsgBox "Starting!" Hide Enabled = False 'Prevents the user from clicking the screenshot button again until we are done. Dim strFilePath As String If AskBeforeSaving Then 'Build the path based on this setting. MsgBox "AskBeforeSaving is enabled." ... Else MsgBox "AskBeforeSaving is not enabled." ... End If ...

If you're willing to keep testing then I have attached a new version that doesn't hide or disable the window.
Unless there is something in the eVB runtime going horribly wrong, it should then at least output a bit more than just the starting message.

I have also attached a test application that calls the screenshot function directly and writes it to "\Temp\Screenshot.bmp".
If that is successful then we at least know that the core functionality should work on CE 6.0, too.

torch - 2023-09-02 7:14 AM

Edit: Did more testing for you on my other device: NEC MobilePro 900 running CE 4.2 ARM processor
0.9.0 works great
+
0.9.1 as well

Two things I noticed:
The help menu title bar mentions "Telephone Alphabet Help"
but the contents themselves reference CaptVB so that's correct

Also, the default No Delay option still showed a snippet of the captvb window before it "Disappears", but the three second delay works great.

This is actually one of the best screenshot programs I've used. Basic but gets the job done and is very fast! Definitely gonna be my go-to.

Edit2: ditto on 790 MIPS running on CE3.0
Everything is the same as the 900


Good catch on the help file, I will fix this in the next release! Glad to hear it's working well on CE 3.0 and 4.2.

I also experienced the window still being partially visible in screenshots sometimes, still working on a fix for that.
As you've found, a good workaround for now is to use the 3-second delay option.

And thanks so much! I'm honored that you would consider using CaptVB as your go-to application.

Do please let me know if there's any functionality you would like to see. One of the things I am working on for the next version is a single-window screenshot option. Often times it's not necessary to capture the whole screen, but just the application you want to show/share. Should be a lot faster, too.


Edited by WinCEDev 2023-09-06 10:19 PM




Attachments
----------------
Attachments CaptVB.vb (55KB - 4 downloads)
Attachments Screenshot Test.vb (12KB - 4 downloads)
 Top of the page
torch Page Icon Posted 2023-09-07 9:09 AM
#
Avatar image of torch
Subscribers
H/PC Guru

Posts:
5,758
Location:
United States 
Status:
WinCEDev - 2023-09-06 2:46 PM


That's so strange, I was almost certain that you would be seeing a bit more happen this time.
When you dismiss the "Starting!" message, it is still nowhere near the actual code that takes the screenshot...


Okay, I clicked the "Capture" Button. First, the dialog box says "Starting", then "Ask Before Saving is Enabled"
Nothing happens after that, no other dialog boxes generate, but the window doesn't disappear at least.

Quote

If you're willing to keep testing then I have attached a new version that doesn't hide or disable the window.
Unless there is something in the eVB runtime going horribly wrong, it should then at least output a bit more than just the starting message.

I'm always happy to test, it's just a factor to consider that the x86 runtime is a little...funky.
Quote

I have also attached a test application that calls the screenshot function directly and writes it to "\Temp\Screenshot.bmp".
If that is successful then we at least know that the core functionality should work on CE 6.0, too.

In order with messages. I clicked "Take Screenshot", states screen resolution as 1920x1080, created display drawing contest 8913499, created bitmap info structure, created DIB section on memory DC 9306769, copied screen dc to memory dc, cleaned up drawing elements, created file handle 10298115, image length 6220800, *I clicked enter too soon to see what this dialog box read*, wrote bitmapinfoheader to file, wrote image data to file, closed the file, deleted bitmap object.

Subsequently, the test screenshot saves correctly into the temp folder.
Quote


Do please let me know if there's any functionality you would like to see. One of the things I am working on for the next version is a single-window screenshot option. Often times it's not necessary to capture the whole screen, but just the application you want to show/share. Should be a lot faster, too.

That would be fantastic, I'd love that feature!


Edited by torch 2023-09-07 9:10 AM
 Top of the page
thenzero Page Icon Posted 2023-09-11 12:59 AM
#
Avatar image of thenzero
Subscribers
H/PC Elite

Posts:
749
Location:
United States
Status:
Quote
Do please let me know if there's any functionality you would like to see.


I'm using this a lot now and it's great. The one thing I miss from screensnap is having a shortcut key. However, I would not want it if it would sacrifice the small footprint of your app. So, I'd like to offer that as a possible additional feature.
 Top of the page
WinCEDev Page Icon Posted 2023-09-13 11:12 PM
#
Avatar image of WinCEDev
Factorite (Senior)

Posts:
77
Location:
Europe
Status:
torch - 2023-09-07 10:09 AM

Okay, I clicked the "Capture" Button. First, the dialog box says "Starting", then "Ask Before Saving is Enabled"
Nothing happens after that, no other dialog boxes generate, but the window doesn't disappear at least.


Thank you, unfortunately this sounds like an eVB runtime bug, most likely something to do with the CommandBar. It would make no sense for it to stop there otherwise.

torch - 2023-09-07 10:09 AM

In order with messages. I clicked "Take Screenshot", states screen resolution as 1920x1080, created display drawing contest 8913499, created bitmap info structure, created DIB section on memory DC 9306769, copied screen dc to memory dc, cleaned up drawing elements, created file handle 10298115, image length 6220800, *I clicked enter too soon to see what this dialog box read*, wrote bitmapinfoheader to file, wrote image data to file, closed the file, deleted bitmap object.

Subsequently, the test screenshot saves correctly into the temp folder.


Awesome, good to know that this works fine at least. That's actually great news because it means that the issues you've been seeing are not likely to be related to the code handling the screenshot, but rather due to UI control related issues.

I have attached a version of CaptVB with an alternate UI that offers all of the same options. Could you please test if this works too? If it does, I think what I'll do is make the current interface the 'compact' mode (it will still be the default), and then offer an option to switch to the alternate interface if desired. This is actually useful in multiple ways since the alternate interface can be more easily operated with a keyboard (accelerator keys), and some people might prefer this over the menu based interface.

I left debug messages enabled just in case we run into anything else. If it works you don't have to go through the trouble of posting the debug output again, I mostly added that for if it was crashing during the screenshot process, but we already figured out that's not the case.

thenzero - 2023-09-11 1:59 AM

I'm using this a lot now and it's great. The one thing I miss from screensnap is having a shortcut key. However, I would not want it if it would sacrifice the small footprint of your app. So, I'd like to offer that as a possible additional feature.


Thank you! If you mean a global hotkey to trigger the screenshot functionality, that would be rather difficult to do in eVB unfortunately, as there's no way to listen for global key press events without using an external component. The other way is polling for it which is very inefficient and not really an option on H/PCs as this will impact general performance of the device.

I tried making it so that you could press the Enter key at the CaptVB window to take a screenshot, but the CommandBar control does not forward keypress events to the form, even with KeyPreview set to True. The alternative interface I made to troubleshoot with @torch should let you do this though.

Edited by WinCEDev 2023-09-13 11:28 PM




Attachments
----------------
Attachments CaptVB.vb (59KB - 4 downloads)
 Top of the page
torch Page Icon Posted 2023-09-14 5:19 AM
#
Avatar image of torch
Subscribers
H/PC Guru

Posts:
5,758
Location:
United States 
Status:
WinCEDev - 2023-09-13 4:12 PM


Awesome, good to know that this works fine at least. That's actually great news because it means that the issues you've been seeing are not likely to be related to the code handling the screenshot, but rather due to UI control related issues.

I have attached a version of CaptVB with an alternate UI that offers all of the same options. Could you please test if this works too? If it does, I think what I'll do is make the current interface the 'compact' mode (it will still be the default), and then offer an option to switch to the alternate interface if desired. This is actually useful in multiple ways since the alternate interface can be more easily operated with a keyboard (accelerator keys), and some people might prefer this over the menu based interface.

I left debug messages enabled just in case we run into anything else. If it works you don't have to go through the trouble of posting the debug output again, I mostly added that for if it was crashing during the screenshot process, but we already figured out that's not the case.



Okay, fyi, I left default settings alone (Always On Top Unchecked/Ask for Destination Checked/No Delay)

Here's the VB messages when I click Take ScreenShot
Starting
AskBeforeSaving is enabled
Starting
AskBeforeSaving is Enabled

Application Error
Application pvbload.exe encountered a serious error and must shut down

@C:Amie - we may be hitting a roadblock with the runtimes for x86. Any thoughts or ideas?
 Top of the page
C:Amie Page Icon Posted 2023-09-14 2:25 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
18,011
Location:
United Kingdom
Status:
Presumably it doesn't do it in the x86 emulator, so it is likely a CE6 issue rather than an x86 one?

We need to get a stack trace really. Can you put the entire app in an on error block and write the err object out to disk after every major relevant event fires? Or do some lazy msgbox debugging to find the last line to execute before the crash?
 Top of the page
thenzero Page Icon Posted 2023-09-14 3:22 PM
#
Avatar image of thenzero
Subscribers
H/PC Elite

Posts:
749
Location:
United States
Status:
C:Amie - 2023-09-15 9:25 AM
Or do some lazy msgbox debugging to find the last line to execute before the crash?


Don't you mean, the BEST kind of debugging?
 Top of the page
thenzero Page Icon Posted 2023-09-14 4:31 PM
#
Avatar image of thenzero
Subscribers
H/PC Elite

Posts:
749
Location:
United States
Status:
WinCEDev - 2023-09-14 6:12 PM


Thank you! If you mean a global hotkey to trigger the screenshot functionality, that would be rather difficult to do in eVB unfortunately, as there's no way to listen for global key press events without using an external component. The other way is polling for it which is very inefficient and not really an option on H/PCs as this will impact general performance of the device.

I tried making it so that you could press the Enter key at the CaptVB window to take a screenshot, but the CommandBar control does not forward keypress events to the form, even with KeyPreview set to True. The alternative interface I made to troubleshoot with @torch should let you do this though.


What about a mode where it automatically takes a screenshot X seconds after starting and then exits when done? Then I could set up a shortcut to simply start the app...
 Top of the page
torch Page Icon Posted 2023-09-14 5:14 PM
#
Avatar image of torch
Subscribers
H/PC Guru

Posts:
5,758
Location:
United States 
Status:
Oh that’s a cool idea! Because we don’t yet have a screenshot program like that !
 Top of the page
C:Amie Page Icon Posted 2023-09-14 7:23 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
18,011
Location:
United Kingdom
Status:
You're so right, I do
 Top of the page
WinCEDev Page Icon Posted 2023-10-05 9:58 PM
#
Avatar image of WinCEDev
Factorite (Senior)

Posts:
77
Location:
Europe
Status:
Hi all! Apologies for not replying earlier, work has been very busy lately and I didn't have a chance to write a proper reply until now.

torch - 2023-09-14 6:19 AM

Okay, fyi, I left default settings alone (Always On Top Unchecked/Ask for Destination Checked/No Delay)

Here's the VB messages when I click Take ScreenShot
Starting
AskBeforeSaving is enabled
Starting
AskBeforeSaving is Enabled

Application Error
Application pvbload.exe encountered a serious error and must shut down


Thanks again for testing, at this point I'm pretty sure that something inside the eVB runtime may be going wrong, because the order of those message boxes don't make sense (it should only show each of them once).

C:Amie - 2023-09-14 3:25 PM


Presumably it doesn't do it in the x86 emulator, so it is likely a CE6 issue rather than an x86 one?

We need to get a stack trace really. Can you put the entire app in an on error block and write the err object out to disk after every major relevant event fires? Or do some lazy msgbox debugging to find the last line to execute before the crash?


The versions I attached for troubleshooting show message boxes at each significant step in the process.
If it crashes after the AskBeforeSaving message box, it should be in this part of the code:
MsgBox "AskBeforeSaving is enabled." 'Generate a temporary file name. Dim strTempPath As String strTempPath = PathHelpers_GetTempFileName(PathHelpers_GetTempPath, "CVB", 0) While LenB(FileSystem.Dir(strTempPath)) <> 0 strTempPath = PathHelpers_GetTempFileName(PathHelpers_GetTempPath, "CVB", 0) Wend strFilePath = strTempPath MsgBox "File path to write: " & strFilePath

But it appears to be rather random, @torch tried to run a previous version with AskBeforeSaving disabled, and it still didn't work.
When "Ask Before Saving" is disabled it does not generate the temporary file name, and that code is not called at all.

thenzero - 2023-09-14 5:31 PM

What about a mode where it automatically takes a screenshot X seconds after starting and then exits when done? Then I could set up a shortcut to simply start the app...


That's a good idea, I'll look into implementing that.
I was thinking of making this a separate application that you can install alongside the 'regular' version of CaptVB. It would then use the settings you choose in the GUI app so it is still as configurable.

(Now you may be wondering why I cannot just combine that functionality into the main application, sadly eVB apps cannot properly start up hidden when they have forms. There are rather hacky ways to get it to start up hidden anyway but I have tried them and none of them are very good.)

thenzero - 2023-09-14 4:22 PM


C:Amie - 2023-09-15 9:25 AM
Or do some lazy msgbox debugging to find the last line to execute before the crash?


Don't you mean, the BEST kind of debugging?


Absolutely!
It is actually my only way to troubleshoot on-device, because I do not have a sync cable.
I have a wireless network card in my Jornada and transfer the files over FTP.

Edited by WinCEDev 2023-10-05 9:59 PM
 Top of the page
thenzero Page Icon Posted 2023-10-06 6:12 PM
#
Avatar image of thenzero
Subscribers
H/PC Elite

Posts:
749
Location:
United States
Status:
Quote
That's a good idea, I'll look into implementing that.
I was thinking of making this a separate application that you can install alongside the 'regular' version of CaptVB. It would then use the settings you choose in the GUI app so it is still as configurable.


Awesome! Can't wait to try it out.
 Top of the page
C:Amie Page Icon Posted 2023-10-06 7:23 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
18,011
Location:
United Kingdom
Status:
The obvious answer would be command line arguments, which are a bit of a pain to implement on CE.

A poor man alternative could be to trap a key press during startup - say it was launched while ctrl + shift were depressed or the notification button, it would run a timer, snap, bell and exit.
 Top of the page
1 2
Jump to forum:
Seconds to generate: 0.338 - Cached queries : 53 - Executed queries : 29