' by: sapta_agunk''this code is copyrighted and has' limited warranties.please see [You must be registered and logged in to see this link.]'1, declararion' this should be in the form's general declaration area. if you declare in a modeule,' you need to omit the word "private"private declare function createroundrectrgn lib "gdi32" (byval x1 as long, byval y1 as long, byval x2 as long, byval y2 as long, byval x3 as long, byval y3 as long) as longprivate declare function createrectrgn lib "gdi32" (byval x1 as long, byval y1 as long, byval x2 as long, byval y2 as long) as longprivate declare function createellipticrgn lib "gdi32" (byval x1 as long, byval y1 as long, byval x2 as long, byval y2 as long) as longprivate declare function combinergn lib "gdi32" (byval hdestrgn as long, byval hsrcrgn1 as long, byval hsrcrgn2 as long, byval ncombinemode as long) as longprivate declare function setwindowrgn lib "user32" (byval hwnd as long, byval hrgn as long, byval bredraw as long) as long

'2 the function' this should be in the form's code.private function fmakeatransparea(areatype as string, pcordinate() as long) as boolean'name: fmakeatranparea'author: sapta_agunk'date: 15-11-2010'purpose: create a transprarent area in a form so that you can see through'input: areatype : a string indicate what kind of hole shape it would like to make' pcordinate : the cordinate area needed for create the shape:' example: x1, y1, x2, y2 for rectangle'output: a booleanconst rgn_diff = 4dim loriginalform as longdim lthehole as longdim lnewform as longdim lfwidth as singledim lfheight as singledim lborder_width as singledim ltitle_height as single on error goto trap lfwidth = scalex(width, vbtwips, vbpixels) lfheight = scaley(height, vbtwips, vbpixels) loriginalform = createrectrgn(0, 0, lfwidth, lfheight)