开发者

How to call window developed in C# through FindWindow api

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">.

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

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.

how I can change开发者_运维问答 the class name of window developed in C#?

Thanks,

Sagar


FindWindow wont recognize xaml class name.

Try to use

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

FindWindow(NULL,"MyTestWindow");


You can try navigating through the windows of your C# program by usuing the tool Spy++ in visual studio tools and retrieve the name of your main window, child windows, and so on.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜