Create Unconventional Windows to Dazzle Users

When designing a portion of an application that must grab users’ attention quickly&3151;such as your companys splash screen?you might want to create a nonrectangular window. This code shows you how to create a V-shaped window based on nine points:

Private Type POINTAPI	x As Long	y As LongEnd TypePrivate Declare Function SetWindowRgn Lib "user32" _	(ByVal hWnd As Long, ByVal hRgn As Long, _	ByVal bRedraw As Boolean) As LongPrivate Declare Function CreatePolygonRgn _	Lib gdi32 (ByRef lpPoint As POINTAPI, _	ByVal nCount As Long, _	ByVal nPolyFillMode As Long) As LongPrivate Sub Form_Load()	Dim lhandle As Long	Dim lpPoint(0 To 8) As POINTAPI	lpPoint(0).x = 0	lpPoint(0).y = 0	lpPoint(1).x = 20	lpPoint(1).y = 150	lpPoint(2).x = 60	lpPoint(2).y = 150	lpPoint(3).x = 80	lpPoint(3).y = 0	lpPoint(4).x = 52	lpPoint(4).y = 0	lpPoint(5).x = 46	lpPoint(5).y = 120	lpPoint(6).x = 40	lpPoint(6).y = 120	lpPoint(7).x = 32	lpPoint(7).y = 0	lpPoint(8).x = 0	lpPoint(8).y = 0	lhandle = CreatePolygonRgn(lpPoint(0), 9, 1)	Call SetWindowRgn(Me.hWnd, lhandle, True)End Sub

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

microsoft careers

Top Careers at Microsoft

Microsoft has gained its position as one of the top companies in the world, and Microsoft careers are flourishing. This multinational company is efficiently developing popular software and computers with other consumer electronics. It is a dream come true for so many people to acquire a high paid, high-prestige job

your company's audio

4 Areas of Your Company Where Your Audio Really Matters

Your company probably relies on audio more than you realize. Whether you’re creating a spoken text message to a colleague or giving a speech, you want your audio to shine. Otherwise, you could cause avoidable friction points and potentially hurt your brand reputation. For example, let’s say you create a

chrome os developer mode

How to Turn on Chrome OS Developer Mode

Google’s Chrome OS is a popular operating system that is widely used on Chromebooks and other devices. While it is designed to be simple and user-friendly, there are times when users may want to access additional features and functionality. One way to do this is by turning on Chrome OS