Solved

make non-rectangler button

Posted on 1998-06-05
2
132 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
ID: 1462629
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
ID: 1462630
great! Dalin.
you should get more points, but that is all i have.
thank you
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA open file from excel cell 4 42
Using "ScreenUpdating" 6 63
vb6 connector to SQL Server 2 37
Export Data to Different .csv Files 26 103
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

815 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

8 Experts available now in Live!

Get 1:1 Help Now