18808.html
来自「以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题」· HTML 代码 · 共 30 行
HTML
30 行
<html> <head> <title>急急急 请教一个怪现像 有关 PopupMenu , Form.Show , TreeView </title> </head> <body bgcolor="#FFFFFF" vlink="#808080"> <center> <h1>急急急 请教一个怪现像 有关 PopupMenu , Form.Show , TreeView </h1> </center><hr size=7 width=75%><hr size=7 width=75%><p>Posted by <a href="mailto:vitoshao@ms2.url.com.tw">vito</a> on September 11, 1999 at 15:30:57:<p><br>'在这个project中共有<br>'Form1,Form2,TreeView1,testMenu(with submenu ItemA,ItemB)<br>'testMenu的visible设成False<br>'在Form1上面放一个 TreeView(版本为 common control 6.0 (sp3)或5.0 sp2)<br>' <p>'以下是整个 project 的程式 -----------------------------------------<p>Private Sub TreeView1_MouseUP(Button As Integer, Shift As Integer, x As Single, y As Single)<br> If Button = 2 Then<br> PopupMenu testMenu<br> End If<br>End Sub<p>Private Sub ItemA_Click()<br> Form2.Show 1<br>End Sub<p>'--------------------------------------------------------------------<p>问题在 : 当user使用视窗右上角的'X'来关闭Form2时<p>若这个Form2的 'X' 位在 Form1 的 标题栏上面, (也就是把form2的 'X' 移到 form1 的标题列上再按 'X')<br>就会导至一个系统的PopupMenu的发生, <br>而这个popupMenu却是 Form1 上的 caption area 的标准 menu<p>为什么会这样子呢,有解吗?????????<p><br>ps.若是 MouseUp 是作用在 Form1上,或 其它元件上,试过好几个都不会有这种现像说<br>就是这个TreeView会,下面这一段是作用在 Form1上的 mouseUp<p>Private Sub Form1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)<br> If Button = 2 Then<br> PopupMenu testMenu<br> End If<br>End Sub<br><br><br><hr size=7 width=75%><p><a name="followups">Follow Ups:</a><br><ul><!--insert: 18808--><!--top: 18816--><li><a href="18816.html">Re: 急急急 请教一个怪现像 有关 PopupMenu , Form.Show , TreeView </a> <b>Buier</b> <i>17:08:34 9/11/99</i>(<!--responses: 18816-->1)<ul><!--insert: 18816--><!--top: 18829--><li><a href="18829.html">Re: 急急急 请教一个怪现像 有关 PopupMenu , Form.Show , TreeView </a> <b>vito</b> <i>09:53:24 9/12/99</i>(<!--responses: 18829-->0)<ul><!--insert: 18829--></ul><!--end: 18829--></ul><!--end: 18816--></ul><!--end: 18808--><br><hr size=7 width=75%><p></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?