CefSharp minimal example - A blank window shows/disappears - cefsharp

I haven't seen any posts concerning this, so perhaps someone can help.
On the minimal example, A blank window opens and immediately disappears only on the first opening of the browser. I'd like a way to suppress this behavior.
To reproduce, change this line of code in the Winforms example:
browser = new ChromiumWebBrowser("www.foxnews.com")
Any ideas?

Related

How to extend time of active code highlight in a shiny app?

I am working on a Shiny project where the Shiny app contains large amount of code. I want to debug the app's code interactively using:
runApp("ShinyApp.R", launch.browser = TRUE, display.mode = "showcase")
The display.mode = "showcase" argument displays the active code next to the app in my browser and highlights the area where the user interacted with the app. Here is a good example of how this works: https://shiny.rstudio.com/articles/action-buttons.html
Another example of how it can be used is mentioned in this answer: How do I highlight active code in a shiny app?
What I found challenging is that because my app's script contains over 800 lines of code, I am not able to see the highlighting when it occurs (it disappears too fast). As mentioned here: https://shiny.rstudio.com/articles/display-modes.html, the highlighting disappears after a few moments.
My questions are:
Is it possible to increase the time until the highlighted area disappears?
Is there a way to force the side bar to scroll to the area where the highlighting occurs?
Thank you for any suggestions or answers!
Yes and yes, but you have to edit the source code and it's Javascript. The code in need of modification lives in inst/www/shared/shiny-showcase.js. I already made the code changes on my fork of Shiny if you want to start there.
For your first question about highlight duration, this is handled by the JQuery highlight effect on line 112:
// End any previous highlight before starting this one
jQuery(el)
.stop(true, true)
.effect("highlight", null, 5000);
The original is 1600, or 1.6 seconds, so I upped it here to 5 seconds. You can change it to whatever you think is best.
Your second question about scrolling to the active/highlighted code, isn't included in the original script but the ability to do is baked into web elements and called element.scrollIntoView(). I just inserted this bit of code immediately after the highlighting block:
// Scroll to highlighted element
el.scrollIntoView({behavior: 'smooth'});
el is variable name currently pointing to the active code region to highlight.
Here is hosted working demo of the tweaks in action.

JavaFX - How to run desktop app in the background using window close/minimize button and 'reopen or completely close' from hidden icons

I created a simple clipboard(desktop app) using JavaFX. Now I want to run the clipboard in the background when user minimizes or closes the app. For example, 'XAMPP' or 'μtorrent'. Of course, user can reopen or completely close the clipboard from hidden icons(in windows) or from the top panel(in ubuntu). From THIS question, i found
Platform.setImplicitExit(false);
which runs the clipboard in the background. But i want to show it in the hidden icons(in windows) so that i can reopen or completely close it from there.
I know how to get and modify the window OnCloseRequest. I just want to know what i should do to run the clipboard in the background.
I searched in the google and StackOverflow for any related tutorial or blog post but found nothing. Any suggestion will be highly appreciated.
I didn't share my code because my clipboard app has no problem. I just want to add the above-mentioned feature.

How to resolve the Blurness issue in print Preview of UWP?

I am familiar with the data grid in the UWP plat form. we tried to provide the support for printing the results in sheets. we have faced the hurdles while we print the content. In the print preview panel the content looks like blurry to the view, but in the printed sheet the contents look like normal. could your share your ideas to resolve this.
Thanks in advance for your updates.
It seems it is by design.
In UWP, we use the PrintManager to inform Windows that an application wishes to participate in printing.
When we run the ShowPrintUIAsync() method, it will run the "PrintDialog.exe" that the print Preview page will be shown.
We can use the "Inspect" to test the content of the print Preview page. From the following image, we can see the content is a Image control that render by the XAML.
For the performance, it does not render as clear as the printting result. We can not change that.
If you do want this feature, you are welcome to ask on UserVoice.

Wordpress website won't open menu pages

I have been struggling with this for more than a week and didn't find anything or anyone who could answer so I am trying my luck here.
I made the following website: http://1mikesflooring.ca
When I open any of the menus/gallery, instead of opening the page, a blank window with an activity indicator appears and nothing else happens. The only way to open a new page is opening it on a new tab.
Also, the mobile version is not working either.
Here's a screenshot of how it looks like:
https://www.dropbox.com/s/f43ve1ttwuwe3ii/Screenshot%202015-11-12%2000.28.27.png?dl=0
If anyone has seen this before and know how to fix it, it would be much appreciated.
Thanks!

close current web form in asp.net

How i can close current web form in web based application?
I have tried with following code:
mybutton.Attributes.Add("onclick","window.close()")
But its not working
Help me. Thank you.
You can use window.close() to close a pop-up window only. If you really need to close the window, use a pop-up instead. However review why the closing is important? You may consider a redirection (either server.transfer or response.redirect).
Update:
Looking at the discussion at this stage, we need to see the relevance of why wee need to close the window as desired. What is the business value that we are achieving?
You can use the following script to close the current window in Chrome and IE (I checked in IE8).
mybutton.Attributes.Add("onclick", "window.open('', '_self');window.close();");
but it still won't work in Firefox. See more info on this: How can I close a window with Javascript on Mozilla Firefox 3?
But because it is a workaround (as Kangkan said window.close() should be used only to close popup window created by window.open() ), it is not a reliable solution and can be broken if a new browser version is out.
Bottom line: there is no reliable, universal solution for your problem, there is no proper way to close a non-popup window from javascript. If you can rely on the fact that your site will be used only in IE, Chrome, etc. you can use a workaround/hack (see above - but don't forget, it can easily be broken in next browser release), otherwise you should consider a different approach of the problem, instead of closing the window.

Resources