Solved

make non-rectangler button

Posted on 1998-06-05
2
131 Views
Last Modified: 2010-05-03
how do i make non-rectangler command button, for example, eclipes, circle.?
0
Comment
Question by:jsilk
2 Comments
 
LVL 9

Accepted Solution

by:
Dalin earned 150 total points
Comment Utility
jsilk,
Try the following code (it works). If you have any questions, let me know
Regards
Dalin

                       Private Declare Function CreateEllipticRgn Lib "gdi32" _
                           (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, _
                           ByVal Y2 As Long) As Long
                             
                           Private Declare Function SetWindowRgn Lib "user32" _
                           (ByVal hWnd As Long, ByVal hRgn As Long, _
                           ByVal bRedraw As Boolean) As Long

Dim rgn as Long
Dim lWidth as Long
Dim lHeight as Long

        lWidth = myCommand.Width / Screen.TwipsPerPixelX
        lHeight = myCommand.Height / Screen.TwipsPerPixelY
        rgn = CreateEllipticRgn(0, 0, lWidth, lHeight)
        SetWindowRgn MyCommand.hWnd, rgn, True

0
 

Author Comment

by:jsilk
Comment Utility
great! Dalin.
you should get more points, but that is all i have.
thank you
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now