基于C#的mapinfo二次开发问题,非请勿答。采纳后再加100分!!

来源:百度知道 编辑:UC知道 时间:2024/05/31 23:21:51
前题:
开发语言:C#
数据库:oracle
在C#中调用mapinfo组件,查看图元属性时。台帐窗口不能出现在图形窗口的上方,问了一些这方面的人,说是非模态窗口问题。请问要怎么才能将非模态窗口置于所有窗口的最前面。还有就是mapinfo中的标尺量算功能,在delphi中调用时,标尺可以正常使用。在C#中调用时,标尺就不可以用,为什么?怎么解决?
本人菜鸟,请大侠不吝赐教?
最好是C#源码,不胜感激!

非模态窗口置于所有窗口的最前面,使用API函数,
The SetWindowPos function changes the size, position, and Z order of a child, pop-up, or top-level window. Child, pop-up, and top-level windows are ordered according to their appearance on the screen. The topmost window receives the highest rank and is the first window in the Z order.

BOOL SetWindowPos(

HWND hWnd, // handle of window
HWND hWndInsertAfter, // placement-order handle
int X, // horizontal position
int Y, // vertical position
int cx, // width
int cy, // height
UINT uFlags // window-positioning flags
);

Parameters

hWnd

Identifies the window.

hWndInsertAfter

Identifies the window to precede the positioned window in the Z order. This parameter must be a window handle or one of the following values:

Value Meaning
HWND_BOTTOM Places the window at the bottom of the Z order. If the hWnd