What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Visual Basic Help .. again.

Visual Basic Help .. again.
Author: Message:
TheSteve
Full Member
***

Avatar
The Man from Japan

Posts: 179
Reputation: 23
40 / Male / Flag
Joined: Aug 2005
RE: Visual Basic Help .. again.
1. If I understand your question correctly, you want to be able to remove the default system window frame right?

You can do this with a window region. Here is an example.

code:
Public Class Form1
    Private Declare Function CreateRoundRectRgn Lib "gdi32.dll" (ByVal nLeftRect As Int32, ByVal nTopRect As Int32, _
    ByVal nRightRect As Int32, ByVal nBottomRect As Int32, ByVal nWidthEllipse As Int32, ByVal nHeightEllipse As Int32) As IntPtr
    Private Declare Function DeleteObject Lib "gdi32.dll" (ByVal nGdiObj As IntPtr) As Int32

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim hRgn As IntPtr
        hRgn = CreateRoundRectRgn(ClientRectangle.Left + 5, ClientRectangle.Top + 40, ClientRectangle.Right - 5, ClientRectangle.Bottom - 5, 7, 7)
        Region = Drawing.Region.FromHrgn(hRgn)
        DeleteObject(hRgn)
    End Sub
End Class

2. To make messenger like toasts, you would need to figure out where to place the toast, then create a window/form then set a timer so that you can hide the window when it's time.  This is not a simple task for a beginner as you also need to be careful of other programs with toast so that you don't accidentally pop up out of turn.

In order to determine if it's your turn to be able to use toasts, create a mutex called "Microsoft.Messenger.ToastSemaphore".  When you want to popup a toast, Ask windows for ownership of this mutex. When you get ownership of the mutex, it's your turn. When you're done popping up your toast, release owner ship of the mutex to allow other programs to use it.
08-13-2007 10:41 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Visual Basic Help .. again. - by Ashylay on 08-12-2007 at 05:07 PM
RE: Visual Basic Help .. again. - by TheSteve on 08-13-2007 at 10:41 AM
RE: RE: Visual Basic Help .. again. - by Ashylay on 08-13-2007 at 03:30 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On