vb使右上角關(guān)閉按鈕為假
就是禁用右上角x按鈕,,如果把controlbox設(shè)為假則又所有按鈕都消失了。有什么辦法嗎,?
Private Declare Function GetSystemMenu Lib "User32" (ByVal hwnd As Long, ByVal bRevert As Long) As LongPrivate Declare Function RemoveMenu Lib "User32" (ByVal hMenu As Long, ByVal nPosition As Long, _ ByVal wFlags As Long) As LongPrivate Const MF_REMOVE = &H1000Private Const SC_CLOSE = &HF060Private Sub Disabled(a, B)Dim hMenu, hwndMenu As LongDim c As LonghMenu = GetSystemMenu(a, 0)RemoveMenu hMenu, SC_CLOSE, MF_REMOVEEnd SubPrivate Sub Form_Load()Dim a As StringDim B As Integera = Me.hwndB = 0Disabled a, BEnd SubPrivate Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)Cancel = TrueEnd Sub
相關(guān)推薦
- 音響低音炮壞了上面兩個旋轉(zhuǎn)扭頭要慢慢調(diào)才能調(diào)好低音炮能修好嗎?
- 花甲之年在這里被罵是中國豬心里發(fā)堵該怎么辦,?
- 小棕瓶保質(zhì)期
- 樂山到犍為晚上有車嗎,?
- 為什麼歌手在臺上唱歌的時候總是戴著耳機?有什麼作用?
- 請問我轉(zhuǎn)學(xué)啦,,學(xué)籍也轉(zhuǎn)走了,,但是很不適應(yīng),想轉(zhuǎn)回去,,和我家長也說通啦,,但是我家長去問過一次老師,。
- 先涂bb還是防曬
- 蘋果6splus摔壞了開不了機
- g6730高鐵始發(fā)涿州東是每天都有嗎
- 我父母爸爸1.65,,媽媽1.50,我現(xiàn)在初二1.65,,長了腋毛和腿毛,,以后還能長多少啊。
便查問答是一款實用的網(wǎng)絡(luò)熱門知識問答平臺,,專注于分享你不知道的知識,、經(jīng)驗及生活問題,在這里所有人都能找到答案歡迎網(wǎng)友參與討論,。