ACC2000: Custom Forms - Irregular Shape (1 Viewer)

Status
Not open for further replies.

Dom DXecutioner

AWF VIP
Local time
Yesterday, 20:38
Joined
Jun 25, 2007
Messages
57
Greetings,

Well, it's been a while since I last touched this sample, but I thought it might be worth posting it here...

Have you ever wanted to create a form based on one of your images ? Most of us have at one point or another... some time ago I came across an excellent article entitled Win 32 Skins (http://www.flipcode.com/articles/article_win32skins.shtml The only problem was that it was written for C++ and I know nothing about it but took a crack at it anyway... see screenshot below:



After carefully studying the article I came up with the attached, to use it just import the bas_api_FormShaper module to your database and on your form use the following code ...

Code:
Private Sub Form_Open(Cancel As Integer) 
[COLOR="SeaGreen"]'  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
' PARAMETER(S):
'   [in]    frm - (form object)
'           The form accepting the new shaped region
'   [in]    stPictureName - (string)
'           The name of the bitmap (myfilename.bmp) image to be used for the shape
'   [in]    TransparentColor - (long)
'           The color value to be used as transparency, it could the access format (125426) or
'           as RGB(0,0,0)
'   [in]    OPTIONAL FolderPath (string) (not used in this version)
'           The name of the path of the folder where the image is located
'   [in]    OPTIONAL IndexCollection (boolean) (not used in this version)
'           True if the handle to the new shaped region is to be added to a collection
'           to prevent rescanning over and over the same form.
'  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=     

     '// function to shape form to bitmap's shape    [/COLOR]
     fInitFormShape Me, "ImageFile.bmp", RGB(255, 0, 255) 

End Sub

One thing to remember is the bigger the picture the longer it will take to load your forms, so be careful.

As usual, enjoy.
 

Attachments

  • ACC2000 IrregularUI.zip
    68.7 KB · Views: 2,495
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom