明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1505|回复: 5

[求助]

[复制链接]
发表于 2005-10-2 06:04:00 | 显示全部楼层 |阅读模式
请教如何将2005的标题栏换成自己的标题栏?谢谢!
发表于 2005-10-2 11:37:00 | 显示全部楼层

reply

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 Long

Public 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 Sub

Public Sub Test_SetTitle()
    Dim hwnd As Long    '&
    hwnd = GetParent(GetParent(ThisDrawing.hwnd))
    SetTitle hwnd, "Hello World!"
End Sub

 楼主| 发表于 2005-10-2 15:36:00 | 显示全部楼层
能否再具体一些,谢谢!
发表于 2005-10-3 12:43:00 | 显示全部楼层

这样还不具体?

发表于 2005-10-3 13:44:00 | 显示全部楼层
很具体了。另外请问一下,能不能通过命令行修改标题栏?
发表于 2005-10-5 14:42:00 | 显示全部楼层
mikewolf2k发表于2005-10-3 13:44:00很具体了。另外请问幌拢懿荒芡ü钚行薷谋晏饫福?lt;/DIV>
  1. (defun SetTitleBar (Str)
  2.   (setvar "USERS5" Str)
  3.   (vl-vbarun "h:/alin/SetTitleBar.dvb!Test_SetTitle")
  4.   (princ)
  5. )
  1. Public Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
  2. Public Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
  1. Public Sub SetTitle(ByVal hwnd As Long, Optional ByVal title As String)
  2.     If title = "" Then
  3.         title = "???? http://www.mjtd.com"
  4.     End If
  5.     SetWindowText hwnd, title
  6. End Sub
  1. Public Sub Test_SetTitle()
  2.     Dim hwnd As Long    '&
  3.     hwnd = GetParent(GetParent(ThisDrawing.hwnd))
  4.     SetTitle hwnd, ThisDrawing.GetVariable("USERS5")
  5. End Sub
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-27 10:35 , Processed in 0.174777 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表