TheSwamp

CAD Forums => CAD General => Topic started by: Keith™ on November 26, 2003, 02:54:57 PM

Title: Want to IMPRESS your CoIrkers??
Post by: Keith™ on November 26, 2003, 02:54:57 PM
Try this bit of API Code I put together.

Simply place it in a new module in the VBA editor and select the corresponding macro "SetWindowText" from the macros list from the toolbar.

Code: [Select]

Option Explicit

Declare Sub WindowText Lib "user32" Alias "SetWindowTextA" (ByVal hWnd As Long, ByVal N As String)

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Function FindAutoCAD() As Long
  FindAutoCAD = FindWindow(vbNullString, Application.Caption)
End Function
Sub SetWindowText()
 WindowText FindAutoCAD, Interaction.InputBox("What do you want to name your AutoCAD session: ", "Rename AutoCAD", "AutoCAD")
End Sub


Right now I am using AutoCAD 2000 W/SwampCAD Add-ons....
(http://bcinc.hypermart.net/SwampCAD.jpg)

Cool huh....
 :twisted:  :twisted:  :twisted:
Title: Want to IMPRESS your CoIrkers??
Post by: daron on November 26, 2003, 04:19:11 PM
that is cool. I see you have yet to make a few dll files. You have a smiley on a toolbar in the upper right.
Title: Want to IMPRESS your CoIrkers??
Post by: Keith™ on November 26, 2003, 04:30:25 PM
Actually, that was done intentionally. I hacked the acadres.dll and substituted the "evil smiley" :twisted:  from the forum in place of the regular smiley. That way the smiley more accurately reflects the attitude of the user.
Title: Want to IMPRESS your CoIrkers??
Post by: daron on November 26, 2003, 04:45:56 PM
Ah, I wanted to do that since the last time we had that discussion from cadalog. I couldn't figure it out. I just looked through the acadres.dll in 2004 and couldn't find the ? on a cloud. That's what they've replaced it with in this release.
Title: Want to IMPRESS your CoIrkers??
Post by: Keith™ on November 26, 2003, 04:52:26 PM
I should have said that it was in acadbtn.dll

If you have reshacker you can change it, if not use something like Visual Studios.

Generally the "error" icon is the last of the bitmaps.

When I get my other system up and running I will check out the 2004 version.

K
Title: Want to IMPRESS your CoIrkers??
Post by: daron on November 26, 2003, 05:09:05 PM
Ah, couldn't find it there either.