分类
外汇交易市场策略

二进制机器人WS评论

1957年的平措汪杰,时任西藏自治区筹委会办公厅党组书记、西藏工委统战部副部长。(Public Domain)

Attach window to window of another process

My WPF application has more than one window, I want to attach some of these windows to a window of another process. My problem is that once I attach my window it becomes invisible.

I'm trying this with the following code:

So, the above code successfully attaches the 二进制机器人WS评论 window, but unfortunately makes it invisible.

My reason for doing this is that I'm trying to extend an application by building "Widgets" for it, my widgets will hook in and show the user extra information.

Both windows have the following styles: WS_OVERLAPPEDWINDOW, WS_OVERLAPPED, WS_VISIBLE, 二进制机器人WS评论 WS_CLIPSIBLINGS, WS_CLIPCHILDREN.

@Neil: I've added the 二进制机器人WS评论 styles to the end of my question, by attach I mean that I want my WPF window to be a child of the new window.

@DavidHeffernan: My window needs to either be a child, or just appear (to the user) to be a child. Do you know anyway to do the latter.

Do you have control of the other app? If so, then do the coding in that other app. If not then what makes you think that you can push another processes window, and a WPF one at that, into this other app?

3 Answers 3

Trending sort

Trending sort is based off of the default sorting method — by highest score — but it boosts 二进制机器人WS评论 votes that have happened recently, helping to surface more up-to-date answers.

It falls back to sorting by highest score if no posts are trending.

Switch to Trending sort

I found that I could do this without even using the setParent call. I used HwndSource class as follows:

This is working great now without any problems.

Hi @Gerve. Yours is the only example I could find of what I'm trying to do, but it doesn't work for me. Spy++ tells me that in my case, MyWindow is NOT a child of newParent. My questions are: a) what values do you set for the WindowStyle, AllowsTransparency and Background properties of MyWindow in MyWindow.xaml? b) Do you call Show() on the window? If so does it matter whether you do it before or after the above code? c) In my case, MyWindow gets the WS_EX_LAYERED extended style, which I read is incompatible with child windows. Not sure why. d) Do you set any other styles with SetWindowLong()?

My WPF Window has always a black background (regardless if I set it's background color to transparent (and allow transparency) or to a color).

I'm not sure what you need to do with overlapped windows, but from MSDN:

For compatibility reasons, SetParent does not modify the WS_CHILD or WS_POPUP window styles of the window whose parent is being changed. Therefore, if hWndNewParent is NULL, you should also clear the WS_CHILD bit and set the WS_POPUP style after calling SetParent. Conversely, if hWndNewParent is not NULL and the window was previously a child of the desktop, you should clear the WS_POPUP style and set the WS_CHILD style before calling SetParent.

While this may answer the question, it doesn't provide any context to explain how or why. Consider adding a sentence or two to explain your answer.

WindowInteropHelper is class from System.Windows.Interop namesapce. Assists interoperation between Windows Presentation Foundation (WPF) and Win32 code.

I'm glad to see you're trying to improve your answer, as a rule you should add clarifications like that in your answer by editing rather than in the comments. Comments can get cleaned up and not everyone reads them so your clarification 二进制机器人WS评论 could be missed.

xlwings实时操作WPS-Excel笔记

首先,找到xlwings安装目录下的文件:你的python安装位置\Python39\Lib\site-packages\xlwings_xlwindows.py, 然后,找到代码313行 self._xl=COMRetryObjectWrapper(DispatchEx('Excel.Application')) 默认使用的是win32com模块下面的DispatchEx方法,此方法会启动一个新进程,把DispatchEx修改为Dispatch就可以啦 self.二进制机器人WS评论 _xl = COMRetryObjectWrapper(Dispatch('Excel.Application'))

如果你用的是WPS,修改代码为: self._xl = COMRetryObjectWrapper(Dispatch('ket.Application'))

评论 | 唯色: 平措汪杰先生谈昌都战役后的阿沛·阿旺晋美(五)

Share on WhatsApp

评论 | 唯色: 平措汪杰先生谈昌都战役后的阿沛·阿旺晋美(五)

毛泽东与阿沛·阿旺晋美。

在文革中被批斗的崔科·顿珠次仁。(泽仁多吉拍摄)

在文革中被批斗的崔科·顿珠次仁。(泽仁多吉拍摄)

右二为拉乌达热·土丹旦达。(翻拍戈尔茨坦著作《西藏现代史: 暴风雨之前的平静, 1951-1955 第二卷》)

右二为拉乌达热·土丹旦达。(翻拍戈尔茨坦著作《西藏现代史: 暴风雨之前的平静, 1951-1955 第二卷》)

1980年代的合影。(翻拍画册《十世班禅》)

1980年代的合影。(翻拍画册《十世班禅》)

评论 | 唯色:平措汪杰先生谈昌都战役和阿沛·阿旺晋美(一)

Share on WhatsApp

评论 | 唯色:平措汪杰先生谈昌都战役和阿沛·阿旺晋美(一)

1950年10月6日至19日的昌都战役,始于毛泽东9月8日对军队发出“占领昌都,促使西藏代表团来京谈判”的指示。

1957年的平措汪杰,时任西藏自治区筹委会办公厅党组书记、西藏工委统战部副部长。(Public Domain)

1957年的平措汪杰,时任西藏自治区筹委会办公厅党组书记、西藏工委统战部副部长。(Public Domain)

西藏政府昌都总管阿沛·阿旺晋美(左二)在朱古寺被俘。(Public Domain)

西藏政府昌都总管阿沛·阿旺晋美(左二)在朱古寺被俘。(Public Domain)

昌都战役后,被俘的阿沛·阿旺晋美与解放军先遣部队18军副政委王其梅。(Public Domain)

昌都战役后,被俘的阿沛·阿旺晋美与解放军先遣部队18军副政委王其梅。(Public Domain)