English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

建立表單後,caption所在那個外框,需用哪個指令將他消去呢?

2006-10-06 17:42:37 · 1 個解答 · 發問者 一個人的咖啡 4 in 電腦與網際網路 程式設計

謝謝您的回答,我是指連caption都消失...
請問該如何調用呢?
或是哪有相關文章可以提供參考呢..

2006-10-06 18:07:44 · update #1

如能改變他的顏色,也是可行的..

2006-10-06 18:11:20 · update #2

了解了,可能是因為是vba的原因,所以消不掉....
等等就選出解答囉,謝謝你呢...

2006-10-07 13:33:43 · update #3

1 個解答

'那如果是Access的話,你試試用API來改標題Private Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As LongPrivate Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As LongPrivate Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As LongDim S$, W&Private Sub Form_Activate()    Dim H&        '先取得主程式的Hwnd    H = GetParent(Me.hwnd)    Do Until H = 0       H = GetParent(H)       If H Then W = H    Loop    '若成功取得    If W Then       '先記錄原標題       S = String(255, Chr(0))       GetWindowText W, S, 255       S = Replace(S, Chr(0), "")       '改標題       SetWindowText Me.hwnd, "WJS"       SetWindowText W, "知識+"    End IfEnd SubPrivate Sub Form_Unload(Cancel As Integer)       SetWindowText W, S '還原標題End Sub

2006-10-07 11:07:32 補充:
嗯..不懂你的意思,都沒有外框了,怎麼會有Caption?當然也就沒顏色的問題了阿.

2006-10-07 18:26:53 補充:
原來如此,是Access嗎?表單本體有"框樣式"這屬性設成"無"就行,但Access本身的主(MDI)表單好像沒辦法XD,不過要改Caption應該可以(用API)至於顏色也是改系統顏色吧.

2006-10-06 17:52:19 · answer #1 · answered by W.J.S. 7 · 0 0

fedest.com, questions and answers