What API/Functions does screenWings use to blackout the screenshot and prevent them?
I know about SetWindowDisplayAffinity to prevent the running application to be screenShoted and IsScreenCaptureEnabled ( this one is for UWP which is not our case )
Basically, as #Dai pointed to test in the comment, it was SetWindowDisplayAffinity, I tested it myself and it worked as predicted, not in all scenarios ( as you have to create a window and make it on foreground then apply the function on it .... ) but it is it
Related
I inherited a legacy website written in old zul and have to add new datebox component for birthday datepicker.
Have added a constraint to accept dates before a given date but that triggers an error alertbox from start as the date presented/selected by default on the datepicker is today.
I wouldn't want to use a workaround but to all due respect it seems like this is something over the top feature I'm looking for in zk's reality:
The main showcase for zul does include a birthday datebox, but pretty lame as it doesn't contain any constrain on age.
There is zk fiddler to show how the before constrain works, but that just proves my point that it doesn't select the first proper date for default date at least, if there is no clean way of setting it.
There is forum post that proposes a workaround to set the default year, so Zk is most probably incapable of doing this without a workaround.
There is an open ZK Jira issue from 2017 that addresses somewhat this issue, with a proposed solution pretty much the same as the workaround mentioned in the above point - so the hope is kinda lost, have to go on the workaround route.
I did try that workaround (after the forum post, as that has default year), but the workaround doesn't work for me. It does execute the
this.setValue(initialDate);
And I see that the value is set into the datebox's _pop/_value and _pop/_end nodes but no difference is visible on the datepicker box, still today is preselected altough it is greyed out - so no effect.
Still, when I try it in a fiddle with version 6.5.8.1, the oldest engine that exists, it does work, but not locally with v5.0.11.
In the buglist for this version there is no mention of datebox. Tried to look into to some bugs that might be interfering but turns out it was just another episode of me wasting time with this.
Tried in the 5.0.11 sandbox and it doesnt work with that version. The structure of how I use it is imitated in the linked fiddler. Hints on a workaround that works on this version?
ZK 5.0.11 is a bit on the older side currently, so it might not accept exactly the same overrides as later versions. If I understand the issue correctly, it boils down to either
1 - setting a value before Datebox is rendered to have a "initial date" opened in calendar.
I'd say that's the easy way out, since you can use either composing or databinding to set the value of the datebox during page rendering. Here's a small sample using databinding and zscripts, but the same logic should apply from composer with setValue(). You mentioned that this doesn't work for you locally with 5.0.11 though. Can you share the code that you are using for this? Sample code here in fiddle I can run it on local 5.0.11, and it set the date before popup is opened.
or
2 - setting an initial date (which doesn't affect the selected value) but would be the target for the opened calendar.
This is not a default ZK 5 behavior for datebox. If you want that effect, you would need to customize it using an override script. Simplest way in can think of in ZK 5 is to use the open event of the datebox popup here's an example of what it would look like (package in a script tag in a single page for the example, would use a global js file for real deployement) example here
I have an editable UITextView. When I drag text from this view and drop it onto itself, the text moves but the following two methods are not called:
textView:shouldChangeTextInRange:replacementText:
textViewDidChange:
What should I do if I want to perform some tasks (for examples, registering undo or updating the associated UIDocument) after the text has moved? Thank you in advance.
You can set your textView's textDragDelegate to self and implement
- (void)textDraggableView:(UIView<UITextDraggable> *)textDraggableView dragSessionDidEnd:(id<UIDragSession>)session withOperation:(UIDropOperation)operation;
or another suitable method from UITextDragDelegate.
Edit:
Actually in your case textDropDelegate may be a better solution as the new text may come from another app.
A suitable method from there seems to be
- (void)textDroppableView:(UIView<UITextDroppable> *)textDroppableView willPerformDrop:(id<UITextDropRequest>)drop;
I'm using VB with WPF and I am trying to close an application... the code I usually use ( Me.Close() ) is not working this time. The error it gave me was BC30545.. but it didn't help me understand the issue. Thanks for any solutions you all respond with.
The error code BC30545 corresponds with this message:
Property access must assign to the property or use it's value
Make sure you don't have another method/property/control with the same name (For example, a button on your form called "Close"
In the case of this example, you'd rename to something like CloseBtn so that it doesn't interfere.
sorry my english. Hi
check this little example
Playground example
Go to table, start edition of some cell, then press Escape, and press Escape again:
the edition cancel, and the command's execute listener work fine.
All is Ok.
Now copy this example to blank new Qooxdoo 5.0.2 application, run and edit a cell.
The behavior change: the command completely nullifies the table's keypress listener when I press Escape key.
What is good, what is bad?
If I change the line
if (! table.isEditing()) this.debug("escape");
to
if (! table.isEditing()) {
this.debug("escape")
} else {
table.cancelEditing();
table.focus();
}
the behavior is reasonable.
But I want the Playground behavior. And I want understand, because when I subclass table widget and interact with several commands I get similar problems.
I'm doing something wrong? How can solutionate this differente behavior?
Im using Firefox 49 and Windows 8.1.
Thanks
I want to process a template with a Google plusone button in it through phpQuery and I run into the following problem:
require_once( "phpQuery.php" );
$p = phpQuery( "<g:plusone></g:plusone>" );
echo $p->html();
the expected output would be:
<g:plusone></g:plusone>
But instead the output of this is:
<plusone></plusone>
Which doesn't match up with what google is expecting, so the button doesn't work any more. How can I stop phpQuery from changing (fixing?) my code, or how can I work around this problem without changing the string from plusone to g:plusone once the processing is done? (that's a nasty workaround, plus, I run into more of these 'translation'-problems in phpQuery).
I had the same problem while including a google+ badge. I could force the code generator from google to generate code with a div container. I just had to tick the "html5 valid code" checkbox.
I've been looking all over for solutions for this problem, to no avail. I found a horrible workaround. I'm sure this is NOT the most elegant way to do this, but at least it fixes the problem.
Instead of the tags:
<g:plusone>...</g:plusone>
use:
<g__0058__plusone>...</g__0058__plusone>
Then simply str_replace the result before you're outputting:
echo str_replace("__0058__",":",$doc->html());
Basically in a tag where you would normally put a colon (:) you put 0058 instead. It's a very non-elegant solution, I realise that, but at least it's a workaround to this old problem.