Important alert: (current site time 7/16/2013 2:54:11 AM EDT)
 

winzip icon

Alert Window

Email
Submitted on: 4/1/2004 1:43:38 PM
By: Morgan Haueisen  
Level: Advanced
User Rating: By 56 Users
Compatibility: VB 6.0
Views: 35784
 
     (Update 5/11/04 - added another display type) This is an alert window that rises up from the taskbar or fades in/out. I had no intentions of posting this but after seeing Todd Tanner's MSN style alert window, and having my comments deleted, I decided to post it for education purposes only. NO VOTING PLEASE but comments are welcome. (Update 4/7/04 - Added options for border style, background color, and Close by code only.)

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 28 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
4/1/2004 6:43:30 PMHassan Sameh

nice .. just like Msn Masseger

(If this comment was disrespectful, please report it.)

 
4/1/2004 7:44:20 PMKenneth Foster

fade does'nt work on Win 98,but everything else works fine.
(If this comment was disrespectful, please report it.)

 
4/1/2004 8:17:38 PMMorgan Haueisen

Fade only works on Win2000/XP. Check out the code and you will see the operating systems supported.
(If this comment was disrespectful, please report it.)

 
4/2/2004 8:15:15 AM

5 from me.

You get a very nice effect just by pressing the Auto Close Alert button a few times in quick succession.

Nice!!
(If this comment was disrespectful, please report it.)

 
4/2/2004 10:27:10 AM

this is an exellent tool !
5 globes for me.
(If this comment was disrespectful, please report it.)

 
4/2/2004 10:27:51 AM

my name never appears !
why ?????
(If this comment was disrespectful, please report it.)

 
4/2/2004 1:30:19 PM

First Guy who doesn't want any votes.
(If this comment was disrespectful, please report it.)

 
4/2/2004 5:30:54 PMMorgan Haueisen

Voting is to arbitrary to have any meaning but a comment may be something that helps me be a better programmer
(If this comment was disrespectful, please report it.)

 
4/2/2004 6:16:18 PMKernon Dillon

Looks better than MSN version. Simple and clean-looking.
(If this comment was disrespectful, please report it.)

 
4/2/2004 6:19:48 PMKernon Dillon

To get your name to show up in your comments, you have to go to your profile and fill in the field for your name. Wait about a day before expecting the changes to take effect. I had the same problem.
(If this comment was disrespectful, please report it.)

 
4/3/2004 3:50:52 AM

this code was horible, it didnt do anything i awnted, it crashed windows, ALL MY SYSTEM FILES WEERE DELETED AND I HAD TO REFORMAT
(If this comment was disrespectful, please report it.)

 
4/3/2004 7:16:58 AMCodeClub

how about a pure api version without timer control and preset form?
(If this comment was disrespectful, please report it.)

 
4/3/2004 7:42:25 AMMorgan Haueisen

If you have a virus, it is not because of this program. VB code files are all text and there is no place to hide a virus. Someone could write some code to hurt a system but it would be easy to find by examining the code before you run it.
(If this comment was disrespectful, please report it.)

 
4/4/2004 2:58:24 PMHaLi_MaW

and for sure, if you are connected to internet, you should have your anti-virus installed and a firewall either.
(If this comment was disrespectful, please report it.)

 
4/5/2004 6:21:35 AMManimaran

Excellent work to share...cannot leave without voting for you. 5 Globes from me.
(If this comment was disrespectful, please report it.)

 
4/5/2004 7:06:38 PMCodeFester

I really like this submission. It was easy to make this a DLL to use it in multiple projects. I know you didn't want any but I can't stop myself from bestowing 5 nuts upon your work...
(If this comment was disrespectful, please report it.)

 
4/8/2004 8:55:16 PM

Codes good hate the author though i got 4 and 5 globes and he sent me a message saying if u ask for votes u wont get votes and voted 1 glob bringing the average down because he don't like me(I bet hasn't even looked at the code) :(
(If this comment was disrespectful, please report it.)

 
4/9/2004 8:55:16 AMMorgan Haueisen

Andrew Green - I found out who you are and you are right I did not download your code, but I also did not vote (see the voting log). The person who gave you one vote was Guy Moreau and not me.

Just for the record, you also misquoted me. What I said was that if you are submitting code just for votes, you are always going to be disappointed. It is because of people like you that I think very little about votes.

(If this comment was disrespectful, please report it.)

 
4/10/2004 1:02:32 PMpazos

A great idea.

Thanks for this.
(If this comment was disrespectful, please report it.)

 
4/12/2004 8:42:09 AM

My apologeis Morgan i was just really having a bad day and u were the first person to say something bad so i kinda wanted to attack someone. But i'm ok now i changed my vote. i would like to talk to u though an instant messenger just so u know i can try and redeem myself, and just to learn off. cause u sound like a pro :) and all the people i know know jack about comps they all have consoles so like i said before i've never really had any input on my code or to be able to learn with anyone.
(If this comment was disrespectful, please report it.)

 
4/13/2004 5:44:45 AMManimaran Subramanian

5 from me too.........
(If this comment was disrespectful, please report it.)

 
4/17/2004 6:44:18 AM

this is better than the popups in msn. actually, if you have a replacement shell (ie. you don't use explorer.exe as your shell), the msn popup thingys are always in the top-left hand corner and not at the bottom-right lol
(If this comment was disrespectful, please report it.)

 
4/19/2004 9:34:19 AM

very cool!
(If this comment was disrespectful, please report it.)

 
5/2/2004 9:34:41 PM

When autosize is on, if you open a second box it does not autosize and there is a space between it and the original box.

Other than that, very, very nice. 5*
(If this comment was disrespectful, please report it.)

 
5/2/2004 9:58:47 PM

I commented out 'If m_iWindowCount = 1 And bAutoFit Then and changed it to If bAutoFit Then

Was there reason for this?
(If this comment was disrespectful, please report it.)

 
5/2/2004 11:39:27 PMAlpha Binary

OMFG CONTEST WINNER !!!


btw
ALL MY SYSTEM FILES WEERE DELETED AND I
HAD TO REFORMAT
>> this was hilarious
(If this comment was disrespectful, please report it.)

 
5/4/2004 8:19:15 AMEdward Catchpole

Nice, also known as
(If this comment was disrespectful, please report it.)

 
5/4/2004 8:19:51 AMEdward Catchpole

Got cut off...

Nice, these popups are also known as Toast
(If this comment was disrespectful, please report it.)

 
5/8/2004 2:47:01 AMMaxAndrews

this isn't anything like messenger popup
(If this comment was disrespectful, please report it.)

 
5/10/2004 12:11:49 PMGilzean

Am I the only one who can't get the auto size to work?
Alter your sample message to something longer - doesn't autosize?
(If this comment was disrespectful, please report it.)

 
5/11/2004 12:37:52 PMMorgan Haueisen

Autosize only works for the first alert window displayed (if the autosize option is set to True).
(If this comment was disrespectful, please report it.)

 
5/22/2004 4:10:32 AMRobert Kaltenbach

whatfor is this "if m_iWindowCount = 1"?!?
its much better if you delete it. then every popup autosizes.
(If this comment was disrespectful, please report it.)

 
5/25/2004 10:37:01 AMspyral_productions

test
(If this comment was disrespectful, please report it.)

 
5/26/2004 2:38:42 AMAlin Haidau

Can u add a caption to make it more like Office2003 popup alerts? Very nice, thou! Thanks for the posting! *****(*)
(If this comment was disrespectful, please report it.)

 
5/26/2004 9:26:07 PMTom Wildes

Excellent code! I dont need it more any projects as yet, but i will certainly be keeping this one for a reference!
(If this comment was disrespectful, please report it.)

 
5/27/2004 1:07:14 AMShane M Croft

downloaded the code, tried it, it works. Good job. By the way I would like to use this for my CS Fire Monitor program on my web site. it is a free program. email me and let me know please webmaster@croftssoftware.com
(If this comment was disrespectful, please report it.)

 
5/27/2004 12:15:35 PMskansoft

Excellent. 5* from me
(If this comment was disrespectful, please report it.)

 
6/8/2004 8:01:25 AM

This is a Very Excellent code i never found in any other sites
thank u for the author
my best wishes for the author
(If this comment was disrespectful, please report it.)

 
8/6/2004 8:07:42 AMPrashanth SC

Amazing...Just Superb...Nice Work..Really Coooooooooooooool... Congrats on your Good Work...
(If this comment was disrespectful, please report it.)

 
8/6/2004 11:06:26 AMEmiliano Garcia

I just added this following code to show the window without focusing it (like MSN):

Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_SHOWNOACTIVATE = 4

ShowWindow hWnd, SW_SHOWNOACTIVATE

(If this comment was disrespectful, please report it.)

 
8/6/2004 12:23:25 PMjames kahl

Excellent piece of work, very well coded
(If this comment was disrespectful, please report it.)

 
8/6/2004 5:15:47 PMteeyester

Geeeeeez! You don't want a vote ?
5 Globes anyway........Very NICE !
(If this comment was disrespectful, please report it.)

 
8/18/2004 3:57:39 PMMike Douglas

two issues when opening more than one window at the same time; 1) there is a space between the first two windows, 2) if enough windows are opened to reach the top of the screen, they begin overlaying each other.

Otherwise, kudos.
(If this comment was disrespectful, please report it.)

 
4/12/2005 2:31:54 PMShooBee MC

YO MAN DISSIZKOOL:)
(If this comment was disrespectful, please report it.)

 
5/14/2005 1:15:24 AMAjay Rana

Great work Morgan Haueisen, Keep it up 5 Globe from me,
(If this comment was disrespectful, please report it.)

 
8/8/2005 12:21:15 AMLiveDeviL

uh?? no votes wanted?
well... I insist! =)
5 globes from me [LiveDeviL]
(If this comment was disrespectful, please report it.)

 
9/25/2005 9:36:00 AMcool

Great code! thanks for this, I dont care if ya dont want um 5 blobs from me too
(If this comment was disrespectful, please report it.)

 
12/9/2005 7:03:45 AMEdinilson

the link is broken
(If this comment was disrespectful, please report it.)

 
12/17/2005 10:51:15 PMSteppenwolfe

Hi Morgan
Define 'educational purposes'.. do you mind if I use this?
(If this comment was disrespectful, please report it.)

 
6/18/2007 5:39:15 AMRob C

I display all of my forms VbModal
I have a lot of forms.
I pre-load frmPopUp (not VbModal), and it has a Timer, which decides when to show a PopUp.
The user could be anywhere amongst all the Modal forms, so it is not easy to get those forms to show a PopUp.
I load frmPopUp to be off the screen (-9000), and can show it by moving it on-screen.
Showing frmPopUp is no good as it is always behind the current Modal form.
frmPopUp calling your Msgbox submission was a pleasanr surprise, as it does show on Top.
However frmPopup calling Alert Window, gives an error 'Can't show non-modal form whilst a Modal form is displaying'

Any possibility of getting around that problem ?
(If this comment was disrespectful, please report it.)

 
7/1/2007 10:16:21 PMRob C

Hi Morgan,
Is there a way to position the form center screen ?
I don't need multiple instances, and I could live without the 'shrink away'
(I am not using Fade as the Modal trick you gave me crashes if I try Fade. However I don't need Fade.)
A user click would just unload the Form.

Thanks,
Rob
(If this comment was disrespectful, please report it.)

 
10/20/2008 11:50:59 AMJuned Chhipa

Great Code, as usual...
Also very easy to understand.
Thank you...
My shinu ***** globes for u..
(If this comment was disrespectful, please report it.)

 
1/8/2009 12:12:56 PMGary

Excellent code! It's an imaginative spplication of API of which we are all familar. Good example of using a window as an object.
(If this comment was disrespectful, please report it.)

 
12/20/2010 5:11:21 AMififth

I give you 5/5.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.