如何通过FindWindow api在C#中开发调用窗口 [英] How to call window developed in C# through FindWindow api

查看:606
本文介绍了如何通过FindWindow api在C#中开发调用窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新的C#和XAML代码。我有在C#中实现的一个示例代码。当我审查XAML文件中我得到了<窗口x:类=test.MainWindow>

I am new to C# and xaml code. I have one sample code which implemented in C#. when I have reviewed xaml file I got <Window x:Class="test.MainWindow">.

也是如此 test.MainWindow 表示此窗口的类名。

So does test.MainWindow indicate the class name for this window.

我试图从调用此窗口这是在WIN 32
开发其它应用,我想通过这个类名 FindWindow函数(test.MainWindow,NULL),但它失败。做任何事情遗漏那边。

I am trying to invoke this window from other application which is developed in win 32. I am trying to pass this class name to FindWindow("test.MainWindow",NULL) ,but it fails. does anything missing over there.

我如何改变在C#开发的窗口类名?

how I can change the class name of window developed in C#?

谢谢,

萨加尔

推荐答案

FindWindow函数 。不会承认XAML类名

FindWindow wont recognize xaml class name.

尝试使用

<Window x:Class="test.MainWindow" Title="MyTestWindow">

FindWindow(NULL,"MyTestWindow");

这篇关于如何通过FindWindow api在C#中开发调用窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆