screen-recording 相关问题


有没有办法刷新/更新Win Forms应用程序中的Screen对象?

有没有办法更新Screen对象?备注:屏幕对象如 (Screen s in Screen.AllScreens) 如果缩放或其他属性更改,则对象不会更改。很详细的


如何在SikuliX(Java)中单击当前鼠标位置?

这是我尝试过的: 屏幕 screenWithCalendarField = new Screen(); 比赛日历 = new Match(); 尝试{ 日历 = screenWithCalendarField.find(new File("D:\Sikuli\CalendarField.png").


如何从Python中的另一个类更改kivy中的标签文本?

我是Python大佬。 这是我的 python 文件: 从 kivy.app 导入 App 从 kivy.uix.screenmanager 导入 ScreenManager, Screen 从 kivy.lang 导入生成器 kv = Builder.load_file('test.kv...


使用海龟图形的谢尔宾斯基三角形递归

我正在尝试编写一个程序,使用turtle用python绘制谢尔宾斯基树。这是我的想法: 进口龟 def draw_sierpinski(长度,深度): 窗口 = 海龟.Screen() t = 乌龟....


PIL:ImageGrab.grab() 失败 - OSError:屏幕抓取在一段时间后失败

我使用 ImageGrab.grab() 来截取屏幕截图。 我有一个功能,可以以一定的延迟无限地截取屏幕截图。然而,大约2小时左右后,出现错误OSError: screen scrap


从 Android Automotive OS 中“Screen”子类的方法获取“Activity”实例

我正在尝试在 Android (13) 汽车操作系统中制作一个简单的应用程序。我的理解非常有限,尤其是在活动方面。在onGetTemplate中,我希望请求许可,w...


⚡️ 类型错误:模块名称,“@capacitor/splash-screen”无法解析为有效的 URL

当我创建一个 Capacitorjs 项目并添加 iOS,然后打开 Xcode 并单击运行时,它会在 Xcode 输出中输出错误并显示白屏。它的网络版本运行良好。我已经修改了...


Javascript 函数 openFullscreen() ,如何让它在页面上的多个 iframe 上工作

在页面上我有一个 iframe,src 中有 *.pdf 文件。 <p>在页面上我有一个 iframe,src 中有 *.pdf 文件。</p> <pre><code>&lt;div class=&#34;node--view-mode-full&#34;&gt; &lt;p&gt;&lt;iframe allow=&#34;fullscreen&#34; allowfullscreen=&#34;&#34; frameborder=&#34;0&#34; height=&#34;980&#34; scrolling=&#34;no&#34; src=&#34;https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf&#34; width=&#34;660&#34;&gt;&lt;/iframe&gt;&lt;/p&gt; &lt;p&gt;&lt;iframe allow=&#34;fullscreen&#34; allowfullscreen=&#34;&#34; frameborder=&#34;0&#34; height=&#34;980&#34; scrolling=&#34;no&#34; src=&#34;https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf&#34; width=&#34;660&#34;&gt;&lt;/iframe&gt;&lt;/p&gt; &lt;/div&gt; </code></pre> <p>浏览器中内置的 pdf 查看器现在不支持 iframe 中的全屏模式。</p> <p>我找到了解决方案<a href="https://www.w3schools.com/howto/howto_js_fullscreen.asp" rel="nofollow noreferrer">https://www.w3schools.com/howto/howto_js_fullscreen.asp</a>,解决了问题 - 以全屏模式打开 iframe。在 w3schools 的示例中,打开 iframe 的按钮已存在于 HTML <a href="https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_fullscreen" rel="nofollow noreferrer">https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_fullscreen</a>.</p> <p>在我的解决方案中,我通过 javascript 添加按钮,因为带有 iframe 的页面已经存在,但没有此类按钮:</p> <pre><code>jQuery(document).ready(function($){ $(&#34;.node--view-mode-full iframe[src*=&#39;.pdf&#39;]&#34;).each(function (index) { $(this).addClass(&#39;fullscreenframe&#39;); $(this).attr(&#39;id&#39;, &#39;fullscreen-&#39;+index); $(&#39;&lt;button onclick=&#34;openFullscreen()&#34;&gt;Open in Fullscreen Mode&lt;/button&gt;&amp;nbsp;&lt;strong&gt;Tip:&lt;/strong&gt; Press the &#34;Esc&#34; key to exit full screen.&lt;br&gt;&#39;).insertBefore(this); }); }); </code></pre> <p>然后添加一个全屏打开 iframe 的功能(与 w3schools 相同):</p> <pre><code>function openFullscreen() { var elem = document.getElementsByClassName(&#34;fullscreenframe&#34;)[0]; if (elem.requestFullscreen) { elem.requestFullscreen(); } else if (elem.webkitRequestFullscreen) { /* Safari */ elem.webkitRequestFullscreen(); } else if (elem.msRequestFullscreen) { /* IE11 */ elem.msRequestFullscreen(); } }; </code></pre> <p>当页面上只有一个带有 *.pdf 的 iframe 时,Everysing 工作正常。但是,当我在页面上有两个或多个 iframe,并且单击任何 iframe 附近的“以全屏模式打开”任何按钮时,我总是在全屏模式下只看到第一个 *.pdf...</p> <p>我知道,这是因为我只得到 elem = document.getElementsByClassName("fullscreenframe")[0]; 中的第一个 iframe;</p> <p>我知道我需要使用类似的每个或类似的东西,但我无法解决它。在搜索关于页面上一个全屏元素的所有解决方案时,没有关于页面上多个元素的解决方案...谢谢。</p> </question> <answer tick="true" vote="0"> <p>也许是这样的:</p> <pre><code>jQuery(document).ready(function($){ $(&#34;.node--view-mode-full iframe[src*=&#39;.pdf&#39;]&#34;).each(function (index) { $(this).addClass(&#39;fullscreenframe&#39;); $(this).attr(&#39;id&#39;, &#39;fullscreen-&#39;+index); $(&#39;&lt;button onclick=&#34;openFullscreen(&#39; + index + &#39;)&#34;&gt;Open in Fullscreen Mode&lt;/button&gt;&amp;nbsp;&lt;strong&gt;Tip:&lt;/strong&gt; Press the &#34;Esc&#34; key to exit full screen.&lt;br&gt;&#39;).insertBefore(this); }); }); function openFullscreen(index) { var elem = document.getElementsByClassName(&#34;fullscreenframe&#34;)[index]; if (elem.requestFullscreen) { elem.requestFullscreen(); } else if (elem.webkitRequestFullscreen) { /* Safari */ elem.webkitRequestFullscreen(); } else if (elem.msRequestFullscreen) { /* IE11 */ elem.msRequestFullscreen(); } } </code></pre> </answer> <answer tick="false" vote="0"> <p>为什么不整合 jQuery?</p> <pre><code>const fullScreen = element =&gt; element.requestFullScreen(); // all modern browsers $(function(){ $(&#34;.node--view-mode-full iframe[src*=&#39;.pdf&#39;]&#34;).each(function (index) { $(this).addClass(&#39;fullscreenframe&#39;); $(this).attr(&#39;id&#39;, &#39;fullscreen-&#39;+index); $(&#39;&lt;button class=&#34;fullScreen&#34;&gt;Open in Fullscreen Mode&lt;/button&gt;&amp;nbsp;&lt;strong&gt;Tip:&lt;/strong&gt; Press the &#34;Esc&#34; key to exit full screen.&lt;br&gt;&#39;).insertBefore(this); }); $(&#34;.fullScreen&#34;).on(&#34;click&#34;, function() { const $iFrame = $(this).closest(&#39;p&#39;).find(&#39;iframe.fullscreenframe&#39;); if ($iFrame) fullScreen($iFrame.get(0)); // pass the DOM element }); }); </code></pre> </answer> </body></html>


MAUI 8 - 如何更改弹出背景叠加颜色?

使用 MAUI 7.0,下一个代码允许更改弹出背景叠加颜色,但该代码不适用于 MAUI 8.0 使用 MAUI 7.0,下一个代码允许更改弹出窗口背景覆盖颜色,但该代码不适用于 MAUI 8.0 <maui:MauiWinUIApplication x:Class="TestMaui8.WinUI.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:maui="using:Microsoft.Maui" xmlns:local="using:TestMaui8.WinUI"> <maui:MauiWinUIApplication.Resources> <Color x:Key="SystemAltMediumColor">Transparent</Color> <SolidColorBrush x:Key="SystemControlPageBackgroundMediumAltMediumBrush" Color="{StaticResource SystemAltMediumColor}" /> <SolidColorBrush x:Key="ContentDialogBackgroundThemeBrush" Color="{StaticResource SystemAltMediumColor}" /> <SolidColorBrush x:Key="ContentDialogDimmingThemeBrush" Color="{StaticResource SystemAltMediumColor}" /> <StaticResource x:Key="ContentDialogBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" /> <StaticResource x:Key="PopupLightDismissOverlayBackground" ResourceKey="SystemControlPageBackgroundMediumAltMediumBrush" /> <SolidColorBrush x:Key="SliderBorderBrush" Color="#1A73E8" /> <Style TargetType="Slider"> <Setter Property="BorderBrush" Value="{StaticResource SliderBorderBrush}"/> </Style> </maui:MauiWinUIApplication.Resources> </maui:MauiWinUIApplication> 有人知道为什么它不起作用以及如何修复它吗? 更新添加一些图片 CommunityToolkit Popup 没有 Overlay color 功能。您可以在 CommunityToolkit GitHub 页面上提出功能请求。 是的,您发布的上述代码曾经可以工作,但它不适用于具有最新 CommunityToolkit.Maui nuget 的 .NET8。 但是如果您想更改叠加颜色,这里有一个解决方法。 <toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui" ... Color="Black" xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit" > //make the size to be the full screen size <ContentView WidthRequest="1920" HeightRequest="1080"> <VerticalStackLayout WidthRequest="300" HeightRequest="300" BackgroundColor="Green"> <Image Source="dotnet_bot.png"/> <Label Text="Welcome to .NET MAUI!" VerticalOptions="Center" HorizontalOptions="Center" /> </VerticalStackLayout> </ContentView> </toolkit:Popup>


© www.soinside.com 2019 - 2024. All rights reserved.