如何获取当前激活窗体?

dwyao 2004-12-25 11:31:10
如何获取当前激活窗体?
...全文
204 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
jf_xs 2005-01-04
  • 打赏
  • 举报
回复
可以在每个窗体的ACTIVE事件中把窗体的名字赋给一个全局变量
motoc 2005-01-03
  • 打赏
  • 举报
回复
Isvalid()
aichangfeng 2005-01-03
  • 打赏
  • 举报
回复
同意LZP
dwyao 2005-01-03
  • 打赏
  • 举报
回复
ok
netspies 2004-12-26
  • 打赏
  • 举报
回复
我帮你看看行不行!
WorldMobile 2004-12-25
  • 打赏
  • 举报
回复
如果你用的是MDI窗口,要取里面当前的窗口,那你可以用狗狗说的getactivesheet

如果你用的只是Main的话,你需要用API函数GetActiveWindow来取

PB声明为:
FUNCTION ulong GetActiveWindow() LIBRARY "user32.dll"
hygougou 2004-12-25
  • 打赏
  • 举报
回复
Description
Returns the currently active sheet in an MDI frame window.
Controls
MDI frame windows
Syntax

mdiframewindow.GetActiveSheet ( )
Argument Description
mdiframewindow The MDI frame window for which you want the active sheet
Return value
Window. Returns the sheet that is currently active in mdiframewindow. If no sheet is active, GetActiveSheet returns an invalid value. If mdiframewindow is NULL, GetActiveSheet returns NULL.
Usage
Use the IsValid function to determine whether GetActiveSheet has returned a valid window value.
dwyao 2004-12-25
  • 打赏
  • 举报
回复
谢谢!!

1,108

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧