wql 发表于 2005-10-2 06:04:00

[求助]

请教如何将2005的标题栏换成自己的标题栏?谢谢!

王咣生 发表于 2005-10-2 11:37:00

reply

<P>Public Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long<BR>Public Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long</P>
<P>Public Sub SetTitle(ByVal hwnd As Long, Optional ByVal title As String)<BR>&nbsp;&nbsp;&nbsp; If title = "" Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; title = "明经通道 <A href="http://www.mjtd.com/" target="_blank" >http://www.mjtd.com</A>"<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; SetWindowText hwnd, title<BR>End Sub</P>
<P>Public Sub Test_SetTitle()<BR>&nbsp;&nbsp;&nbsp; Dim hwnd As Long&nbsp;&nbsp;&nbsp; '&amp;<BR>&nbsp;&nbsp;&nbsp; hwnd = GetParent(GetParent(ThisDrawing.hwnd))<BR>&nbsp;&nbsp;&nbsp; SetTitle hwnd, "Hello World!"<BR>End Sub</P>

wql 发表于 2005-10-2 15:36:00

能否再具体一些,谢谢!

alin 发表于 2005-10-3 12:43:00

<P>这样还不具体?</P>

mikewolf2k 发表于 2005-10-3 13:44:00

很具体了。另外请问一下,能不能通过命令行修改标题栏?

alin 发表于 2005-10-5 14:42:00

mikewolf2k发表于2005-10-3 13:44:00static/image/common/back.gif很具体了。另外请问幌拢懿荒芡ü钚行薷谋晏饫福?lt;/DIV>(defun SetTitleBar (Str)
(setvar "USERS5" Str)
(vl-vbarun "h:/alin/SetTitleBar.dvb!Test_SetTitle")
(princ)
)Public Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Public Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As LongPublic Sub SetTitle(ByVal hwnd As Long, Optional ByVal title As String)
    If title = "" Then
      title = "???? http://www.mjtd.com"
    End If
    SetWindowText hwnd, title
End SubPublic Sub Test_SetTitle()
    Dim hwnd As Long    '&
    hwnd = GetParent(GetParent(ThisDrawing.hwnd))
    SetTitle hwnd, ThisDrawing.GetVariable("USERS5")
End Sub

页: [1]
查看完整版本: [求助]