VB.NET實現Winodws式隱現菜單

來源:互聯網
上載者:User
菜單 主要是通過Panel和ImageButton兩個控制項實現,很簡單.
<Script Language="VB" Runat="Server">
Sub Button1_Click(sender As Object, e As ImageClickEventArgs)
If myPanel1.Visible = True Then
myPanel1.Visible = False
sbmr.ImageUrl="images/sb_show.gif"
Else
myPanel1.Visible = True
sbmr.ImageUrl="images/sb_hide.gif"
End If
End Sub
Sub Button2_Click(sender As Object, e As ImageClickEventArgs)
If myPanel2.Visible = True Then
myPanel2.Visible = False
bjmr.ImageUrl="images/bj_show.gif"
Else
myPanel2.Visible = True
bjmr.ImageUrl="images/bj_hide.gif"
End If
End Sub
Sub Button3_Click(sender As Object, e As ImageClickEventArgs)
If myPanel3.Visible = True Then
myPanel3.Visible = False
bjkc.ImageUrl="images/kc_show.gif"
Else
myPanel3.Visible = True
bjkc.ImageUrl="images/kc_hide.gif"
End If
End Sub
Sub Button4_Click(sender As Object, e As ImageClickEventArgs)
If myPanel4.Visible = True Then
myPanel4.Visible = False
bjrk.ImageUrl="images/rk_show.gif"
Else
myPanel4.Visible = True
bjrk.ImageUrl="images/rk_hide.gif"
End If
End Sub
Sub Button5_Click(sender As Object, e As ImageClickEventArgs)
If myPanel5.Visible = True Then
myPanel5.Visible = False
bjck.ImageUrl="images/ck_show.gif"
Else
myPanel5.Visible = True
bjck.ImageUrl="images/ck_hide.gif"
End If
End Sub
Sub Button6_Click(sender As Object, e As ImageClickEventArgs)
If myPanel6.Visible = True Then
myPanel6.Visible = False
bjjh.ImageUrl="images/jh_show.gif"
Else
myPanel6.Visible = True
bjjh.ImageUrl="images/jh_hide.gif"
End If
End Sub
Sub Button7_Click(sender As Object, e As ImageClickEventArgs)
If myPanel7.Visible = True Then
myPanel7.Visible = False
bjqt.ImageUrl="images/qt_show.gif"
Else
myPanel7.Visible = True
bjqt.ImageUrl="images/qt_hide.gif"
End If
End Sub
</Script>
<html>
<head>
<title>左邊框</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #CFEFFA;
}
body,td,th {
color: #000066;
}
.style4 {color: #FFFFFF}
a:link {
color: #000066;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000066;
}
a:hover {
text-decoration: none;
color: #000066;
}
a:active {
text-decoration: none;
color: #000066;
}
-->
</style></head>

<body>
<Form Runat="Server">

<Asp:ImageButton Runat="Server" Id="sbmr" ImageUrl="images/sb_show.gif" OnClick="Button1_Click" /><br>
<Asp:Panel Runat="Server" Id="myPanel1" HorizontalAlign="Left" Visible = "False">
<table width="150" border="1" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#A7D2ED" bgcolor="#CFEFFA">
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center"><a href="sbmr/addsbmr.aspx" target="mainFrame">增加</a></div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">修改</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center"><a href="sbmr/sbmr.aspx" target="mainFrame">查詢</a></div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">刪除</div></td>
</tr>
</table>
</Asp:Panel>

<Asp:ImageButton Runat="Server" Id="bjmr" ImageUrl="images/bj_show.gif" OnClick="Button2_Click" /><br>
<Asp:Panel Runat="Server" Id="myPanel2" HorizontalAlign="Left" Visible = "False">
<table width="150" border="1" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#A7D2ED" bgcolor="#CFEFFA">
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center"><a href="BJMR/add.aspx" target="mainFrame">增加</a></div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center"><a href="bjmr/edit.aspx" target="mainFrame">修改</a></div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center"><a href="BJMR/search.aspx" target="mainFrame">查詢</a></div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">刪除</div></td>
</tr>
</table>
</asp:panel>

<Asp:ImageButton Runat="Server" Id="bjkc" ImageUrl="images/kc_show.gif" OnClick="Button3_Click" /><br>
<Asp:Panel Runat="Server" Id="myPanel3" HorizontalAlign="Left" Visible = "False">
<table width="150" border="1" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#A7D2ED" bgcolor="#CFEFFA">
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center"><a href="BJKC/bjkc.aspx" target="mainFrame">查詢</a></div></td>
</tr>
</table>
</asp:panel>

<Asp:ImageButton Runat="Server" Id="bjrk" ImageUrl="images/rk_show.gif" OnClick="Button4_Click" /><br>
<Asp:Panel Runat="Server" Id="myPanel4" HorizontalAlign="Left" Visible = "False">
<table width="150" border="1" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#A7D2ED" bgcolor="#CFEFFA">
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">增加</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">修改</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">查詢</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">刪除</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">統計</div></td>
</tr>
</table>
</asp:panel>


<Asp:ImageButton Runat="Server" Id="bjck" ImageUrl="images/ck_show.gif" OnClick="Button5_Click" /><br>
<Asp:Panel Runat="Server" Id="myPanel5" HorizontalAlign="Left" Visible = "False">
<table width="150" border="1" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#A7D2ED" bgcolor="#CFEFFA">
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">增加</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">修改</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">查詢</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">刪除</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">統計</div></td>
</tr>
</table>
</asp:panel>

<Asp:ImageButton Runat="Server" Id="bjjh" ImageUrl="images/jh_show.gif" OnClick="Button6_Click" /><br>
<Asp:Panel Runat="Server" Id="myPanel6" HorizontalAlign="Left" Visible = "False">
<table width="150" border="1" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#A7D2ED" bgcolor="#CFEFFA">
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center"><a href="BJJH/ydjh.aspx" target="mainFrame">應訂</a></div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center"><a href="bjjh/yjjh.aspx" target="mainFrame">應交</a></div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center"><a href="bjjh/search.aspx" target="mainFrame">查詢</div></a></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">增加</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">刪除</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">修改</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">統計</div></td>
</tr>
</table>
</asp:panel>

<Asp:ImageButton Runat="Server" Id="bjqt" ImageUrl="images/qt_show.gif" OnClick="Button7_Click" /><br>
<Asp:Panel Runat="Server" Id="myPanel7" HorizontalAlign="Left" Visible = "False">
<table width="150" border="1" cellpadding="0" cellspacing="0" bordercolordark="#FFFFFF" bordercolorlight="#A7D2ED" bgcolor="#CFEFFA">
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">其他[1]</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">其他[2]</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">其他[3]</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">其他[4]</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">其他[5]</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">其他[6]</div></td>
</tr>
<tr>
<td onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#FFcccc'"><div align="center">其他[7]</div></td>
</tr>
</table>
</asp:panel>
</form>
</body>
</html>

相關文章

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。