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:
Ashylay
Junior Member
**

Intermediate Scripter

Posts: 70
Reputation: 1
– / Male / –
Joined: Mar 2007
O.P. Visual Basic Help .. again.
2 QUESTIONS

---------------------------------------------
Alright well sorry for spamming the forum up asking for help on VB and I know i should search on google but i dont know what words to use for example, I didnt know a form was a form i thought it was a window so please dont blame me for creating threads instead of searching google. Im still a novice.

Well basically you know like on MessengerPlus!Live the windows arent the basic forms with the OS default border? (So say if you had windows vista the border would be the blue box with the content inside)

Just wondering is there a possible way to create my own using Visual Basic 2005 Express?
---------------------------------------------
How can I make toasts for my program (Just like MSN Toasts but for my own program)

This post was edited on 08-12-2007 at 05:08 PM by Ashylay.
08-12-2007 05:07 PM
Profile E-Mail PM Find Quote Report
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
Ashylay
Junior Member
**

Intermediate Scripter

Posts: 70
Reputation: 1
– / Male / –
Joined: Mar 2007
O.P. RE: RE: Visual Basic Help .. again.
Thanks so much! Real help!(Y)
08-13-2007 03:30 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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