您的位置:程序门 -> .net技术 -> vb.net



获得前台窗体活动标题


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


获得前台窗体活动标题
发表于:2007-09-29 01:12:16 楼主
请问怎么得到
前台活动窗体标题
发表于:2007-09-29 22:04:101楼 得分:0
沙发,友情up

发表于:2007-09-29 22:27:512楼 得分:0
这样的操作可以更新主窗体标题和状态栏显示

在主窗体的load事件中,使用事件
          '加入状态栏更新代码
                addhandler   me.mdichildactivate,   addressof   me.mdichildactivated

下面是具体的事件
protected   sub   mdichildactivated(byval   sender   as   object,   byval   e   as   system.eventargs)
                '20070926修改,不更新窗体标题,只更新状态栏,因为当子窗体最大化的时候,自动更新父窗体标题了。
                if   (me.activemdichild   isnot   nothing)   then
                        'me.text   =   my.resources.strapplicationname   &   "   -   ["   &   me.activemdichild.text   &   "]"
                        toolstripstatuslabelstatus.text   =   me.activemdichild.text
                else
                        me.text   =   my.resources.strapplicationname
                        toolstripstatuslabelstatus.text   =   "就绪..."
                end   if
        end   sub

这个是我以前写的,可以用的。
发表于:2007-09-30 02:29:483楼 得分:0
谢谢楼上的

        我想要的是这样的,窗体里,一个定时器控件,一个textbox

        窗体是置最顶层的,然后每1秒自动将当前系统的活动窗体的标题显示在,textbox.text里面

     
     


快速检索

最新资讯
热门点击