See the top rated post in this thread. Click here

Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Color Dialog in VBA

  1. #11
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,397
    Login to Give a bone
    0

    Default Re: Color Dialog in VBA

    Quote Originally Posted by branimirj View Post
    Well I'll try to explain what I meant by the CAD-like form.
    There are rounded corners in the frame, while line and text are colored.
    When you move the mouse near form object (CheckBox for example) it appears colored and so on (like rollover effect on web page).
    In VBA forms there are no such stuff.
    Have you looked at the properties for the form controls? While the default checkbox doesn't have a MouseOver event, it does have other mouse events. There are other controls available on the internet. Additionally, you can make your own with VB6.

    As for the other properties you describe, check out the BorderStyle and SpecialEffect properties. You can make them look exactly like dcl boxes.
    C:> ED WORKING....

  2. #12
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,397
    Login to Give a bone
    0

    Default Re: Color Dialog in VBA

    Quote Originally Posted by rkmcswain View Post
    If you want to avoid using "SendCommand", try this.

    PHP Code:
    Public Declare Function acedSetColorDialog Lib "acad.exe" (color As LongByVal bAllowMetaColor As BooleanByVal nCurLayerColor As Long) As Boolean

    Sub example_usage
    ()
     
    On Error Resume Next
     Dim blnMetaColor 
    As Boolean
     Dim lngCurClr 
    As Long
     Dim lngInitClr 
    As Long
     
    If acedSetColorDialog(lngInitClrblnMetaColorlngCurClrThen
        MsgBox lngInitClr
     End 
    If
    End Sub 
    Update: For using with current AutoCAD, You need to add PtrSafe and change exe to accore.dll.
    PHP Code:
    Public Declare PtrSafe Function acedSetColorDialog Lib "accore.dll" (color As LongByVal bAllowMetaColor As BooleanByVal nCurLayerColor As Long) As Boolean 
    C:> ED WORKING....

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Calling Revit's native color dialog
    By some buddy in forum Revit - API
    Replies: 11
    Last Post: 2009-10-08, 02:18 PM
  2. Color dialog - highlight box system variable?
    By Coolmo in forum AutoCAD General
    Replies: 1
    Last Post: 2006-03-22, 12:59 AM
  3. Color Dialog Box Not Showing Up.
    By tmccoy in forum AutoCAD General
    Replies: 4
    Last Post: 2006-01-07, 01:17 AM
  4. MTEXT dialog box background color
    By ldibenedetto in forum AutoCAD Wish List
    Replies: 6
    Last Post: 2005-01-31, 01:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •