Edge浏览器 (文本选择)I型光标消失不见问题

Edge浏览器 I型(文本选择)光标消失不见的问题。

在白色背景中 光标也变成了纯白色,所有都是纯白 也就看不到光标在哪里了,会影响正常使用。

解决方案:把默认的I型光标替换掉

选择一个 beam*.cur , 可以在预览框中查看

完成后,可以去Edge测试,不理想继续更换。

如果都不喜欢,也可以去网上下载更多自己喜欢的光标文件。

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
可以使用Microsoft提供的Speech API来实现这个功能。Speech API是一个Windows API,可用于将文本转换为语音或将语音转换为文本Edge浏览器提供了对Speech API的支持,可以通过C#代码调用Speech API以将文本转换为语音。 下面是一个简单的示例代码,使用SpeechSynthesizer类将文本转换为语音并播放出来: ```csharp using System.Speech.Synthesis; SpeechSynthesizer synthesizer = new SpeechSynthesizer(); synthesizer.SetOutputToDefaultAudioDevice(); synthesizer.Speak("Hello World"); ``` 在上面的示例中,我们创建了一个SpeechSynthesizer对象,并使用SetOutputToDefaultAudioDevice方法将输出配置为默认音频设备。然后,我们调用Speak方法将文本转换为语音并播放出来。 如果您想要使用Edge浏览器进行语音合成,请按照以下步骤操作: 1. 确保您的Windows版本支持Speech API和Edge浏览器。 2. 在Visual Studio中创建一个新的C#控制台应用程序。 3. 在程序包管理器控制台中安装Microsoft.Speech.SDK库。 4. 将以下代码添加到您的程序中: ```csharp using System.Speech.Synthesis; SpeechSynthesizer synthesizer = new SpeechSynthesizer(); synthesizer.SetOutputToAudioStream( new EdgeBrowserAudioStream(), new SpeechAudioFormatInfo(EncodingFormat.Pcm, 16000, 16, 1, 32000, 2, null)); synthesizer.Speak("Hello World"); public class EdgeBrowserAudioStream : System.IO.Stream { private readonly System.IO.Stream _underlyingStream; public EdgeBrowserAudioStream() { _underlyingStream = Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlProcess.GetWebViewCompatibleStream(new System.IO.MemoryStream()); } public override bool CanRead => _underlyingStream.CanRead; public override bool CanSeek => _underlyingStream.CanSeek; public override bool CanWrite => _underlyingStream.CanWrite; public override long Length => _underlyingStream.Length; public override long Position { get => _underlyingStream.Position; set => _underlyingStream.Position = value; } public override void Flush() => _underlyingStream.Flush(); public override int Read(byte[] buffer, int offset, int count) => _underlyingStream.Read(buffer, offset, count); public override long Seek(long offset, SeekOrigin origin) => _underlyingStream.Seek(offset, origin); public override void SetLength(long value) => _underlyingStream.SetLength(value); public override void Write(byte[] buffer, int offset, int count) => _underlyingStream.Write(buffer, offset, count); } ``` 在上面的代码中,我们创建了一个SpeechSynthesizer对象,并使用SetOutputToAudioStream方法将输出配置为Edge浏览器的音频流。我们还创建了一个EdgeBrowserAudioStream类,该类实现了System.IO.Stream接口,并将其传递给SetOutputToAudioStream方法。EdgeBrowserAudioStream类是必需的,因为SpeechSynthesizer类只能将音频输出到System.IO.Stream对象。最后,我们调用Speak方法将文本转换为语音。 请注意,这里使用的是Microsoft.Toolkit.Win32.UI.Controls.Interop.WinRT.WebViewControlProcess.GetWebViewCompatibleStream方法来获取Edge浏览器的音频流。这是由于Speech API需要使用一个特殊的音频流,才能与Edge浏览器兼容。 希望这个示例对您有帮助!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值