vb.net - How to create translucent effect in visual basic windows forms? -
like image below:
![the transparency effect mean ][1]
http://i.stack.imgur.com/ststz.jpg
that effect in vb.you can see background not purely transparent .its translucent afaik.
i give ideas: can set backcolor , transparencykey color properties of form same color. assign transparent image want, through handling mybase.paint event, in way:
private sub frmlogin_paint(byval sender object, byval e system.windows.forms.painteventargs) handles mybase.paint if not me.cobjimagen nil e.graphics.drawimage(me.cobjimagen, 0, 0, me.width, me.height) end if end sub
where 'cobjimagen' system.drawing.image loaded 'form_load' event, or ' public sub new() ', example...
if need move form, help process messages correctly:
private const wm_nchittest integer = 132 private const htcaption integer = 2 protected overloads overrides sub wndproc(byref m message) if m.msg = wm_nchittest m.result = new intptr(htcaption) else mybase.wndproc(m) end if end sub
vb.net forms osx
No comments:
Post a Comment