本文介绍了隐藏在屏幕键盘上,rapsberry pi3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
现在,我正在Rapsberry Pi 3上为Windows IOT 10做一个小型应用程序.Visual Studio 2017.
我在Google搜索了一下隐藏键盘程序化。但我没有搜索任何信息。
Now, i am doing an small application fro Windows IOT 10 on a Rapsberry Pi 3. Visual Studio 2017.
I have search in google about to hide the keyboard programmatic. But I have not search any information.
我需要帮助。关于这个。
Please i need help. About this.
推荐答案
您可以使用设备门户REST API进行禁用屏幕键盘,这里有一个你可以参考的样本:
You can use device portal REST API for disable on-screen keyboard, here is a sample you can reference:
string uri = "http://[IP ADDRESS]:8080/api/iot/osk/settings?IsFollowInputFocusEnabled=false";
string data = "";
byte[] dataBytes = Encoding.UTF8.GetBytes(data);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
request.ContentLength = dataBytes.Length;
request.ContentType = "application/x-www-form-urlencoded";
request.Method = "POST";
CredentialCache myCache = new CredentialCache();
myCache.Add(new Uri("http://[IP ADDRESS]:8080"), "Basic", new NetworkCredential("Administrator", "p@ssw0rd"));
request.Credentials = myCache;
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
using (Stream stream = response.GetResponseStream())
using (StreamReader reader = new StreamReader(stream))
{
string answer = reader.ReadToEnd();
Console.WriteLine("status code:" + response.StatusCode.ToString());
Console.WriteLine("result:" + answer);
}
祝你好运,
Rita
这篇关于隐藏在屏幕键盘上,rapsberry pi3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!