Author Topic: Updating time on the status bar (modemacro command)  (Read 4073 times)

0 Members and 2 Guests are viewing this topic.

ImaJayhawk

  • Guest
Updating time on the status bar (modemacro command)
« Reply #15 on: December 23, 2004, 10:36:21 AM »
Quote from: Keith
Ok ... this is a VBA app so ....
In a new module paste the following code
Code: [Select]

Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal HWND As Long, ByVal lpString As String) As Long

Sub SetText()
 Dim RetVal As Long
 RetVal = SetWindowText(Application.HWND, Interaction.InputBox("Please enter new name for AutoCAD application"))
End Sub


When you run the code it will request a new name which you can type in, then it will change the name to what you entered.

If you want to make it set to a preset value, simply remove this portion
Code: [Select]

Interaction.InputBox("Please enter new name for AutoCAD application")

and replace it with a string enclosed in quotes.. like so...
Code: [Select]

Sub SetText()
 Dim RetVal As Long
 RetVal = SetWindowText(Application.HWND, "Dommy2HottyCAD"))
End Sub


What do I need to change to get this to work on ACAD 2002?  Thanks.



--ImaJayhawk