Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello guys again,

I'm trying to make an application that has a look something like the media player.

I created the background image, which is not square it has round corners. I set it to the form as background image and set the border style as none.

The problem is that the empty areas of the background (trasparent canvas) the moment that runs are ok, but after you put it in the background by opening something else in front of it.

these areas fill with what was in the background.

 

this is what i mean

http://www.otherside2k.pwp.blueyonder.co.uk/

 

Any Ideas how to get through this problem ?

Posted

Can you explain a bit what this does ?

(Not practically, i can see that it catches the move thing)

but what these constants are etc.

 

Private Const WM_NCHITTEST As Integer = &H84
Private Const HTCAPTION As Integer = &H2
Protected Overrides Sub WndProc(ByRef m As Message)
       If m.Msg = WM_NCHITTEST Then
           m.Result = New IntPtr(HTCAPTION)
       Else
           MyBase.WndProc(m)
       End If

End Sub

 

thanks again

  • *Experts*
Posted
WM_NCHITTEST is sent to a window when it wants to know specifically what part of the window you are moving over, clicking on, etc. When you return HTCAPTION like that, it's saying "I am clicking on the caption bar", which Windows associates with dragging, so it drags the window for you.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...