 |
|
 |
One of the if statements are for appearing and one for disappearing.
|
|
|
|
 |
|
 |
Do you have solved the trouble in vb.net?
|
|
|
|
 |
|
 |
I am indebted to you, sir!
|
|
|
|
 |
|
 |
Hello,
First, I would like to say thank you for this great control.
Unfortunately, I have a problem with you control on Windows Vista. Some users of my program report that they don't get a popup. They all have Windows Vista, but others with Vista have a working popup.
I cannot reproduce the problem, but have you any idea of what it could be and how to fix it?
Regards,
Thomas
|
|
|
|
 |
|
 |
Hello,
Thanks for the great stuff first of all,
I observed that edges of the bitmap based popups are little jagged, Is there a way to make them smooth ?
Thanks,
Ahmed
Ahmed
|
|
|
|
 |
|
 |
What is the license with this class? Great work!
|
|
|
|
 |
|
 |
What an awesome control, and it works like a charm! thanx again!
|
|
|
|
 |
|
 |
Hello,
I find this class is very great. I viewed the c++ verison too, but i need to use it in a thread. I saw in the comments on the C++ version that the version xmessenger.zip but all the links are dead. Does anyone has it ?
If yes please send me the archive to tipiak07@yahoo.com. I post this comment here because i saw last message for the C++ version was 1 year ago... so i hope people in this thread already used the C++ version
I will try to provide a link to share it for people who will need the archive in future reads of the article.
Best regards.
|
|
|
|
 |
|
 |
Hi John,
Thanks for the article. I was just working on popping up the toaster winodow in a scheduled manner. I was able to use Timercallback function and initiated the toast pop up function. However, it didnt worked for me. Can you give me some ideas regarding the same.
Hai This is Yesh
|
|
|
|
 |
|
 |
This is a very nice example. However, I think you will want to do some significant cleanup here. You are using many disposable objects without properly managing them. As a rule of thumb, if you create a disposable object, you are responsible for cleaning it up.
Also might want to consider running fxcop on this as well. Fxcop will help you in learning the langauage and the best uses of it.
|
|
|
|
 |
|
 |
This is great. A certain co-worker's been bugging me for this for months, and thanks to your code I was able to bang this in quickly! Kudos!
-- Jamie
|
|
|
|
 |
|
 |
please help i am getting this message Additional information: Resource 'skin.bmp' could not be found in class 'filecopy.frmBackup'. the resources(bmp files) are in the project
|
|
|
|
 |
|
 |
Would it be possible to apply the same principle in asp.net application, if so please advise of the solution
siphiwe.khuzwayo@standardbank.co.za
|
|
|
|
 |
|
 |
i have a problem "An error occurred creating the form. See Exception.InnerException for details. The error is: Resource 'skin.bmp' cannot be found in class 'task.Form1'" I tray save images in bin/debug (when in debug modE) and bin/release (when in release mode) but nothing
|
|
|
|
 |
|
 |
Try this: in "solution view" right click on the bmp -> properties -> in build action dropdown select "Embedded resource" then rebuild
KlemMax
|
|
|
|
 |
|
 |
thanks gracias!!!!!!!!, that was
|
|
|
|
 |
|
 |
Generally, the notifier works as advertised and does not steal focus. However, if I set CloseClickable to true and add a CloseClicked event which calls Hide(), the next time I display a new notifier it does steal focus from whatever window is active (system-wide). If I let the focus-stealing popup disappear on its own then the next one to come up won't steal focus - it only happens on the next one, following one that is closed through the CloseClicked handler. This is driving me crazy, I can't figure out why it's doing this!
|
|
|
|
 |
|
 |
Ah, I've got it solved! I removed TopMost from the constructor, P/Invoked SetWindowPos(), and modified the switch (taskbarState) block in Show() as follows:
int left, top, width, height;
switch (taskbarState)
{
case TaskbarStates.hidden:
taskbarState = TaskbarStates.appearing;
this.Opacity = 0.0;
left = WorkAreaRectangle.Right - BackgroundBitmap.Width - nPadding - nBaseWindowRight;
top = WorkAreaRectangle.Bottom - BackgroundBitmap.Height - nPadding - nBaseWindowBottom;
width = BackgroundBitmap.Width;
height = BackgroundBitmap.Height;
SetWindowPos(this.Handle, -1, left, top, width, height, 0x0010);
timer.Interval = nShowEvents;
timer.Start();
ShowWindow(this.Handle, 4);
break;
case TaskbarStates.appearing:
Refresh();
break;
case TaskbarStates.visible:
timer.Stop();
timer.Interval = nVisibleEvents;
timer.Start();
Refresh();
break;
case TaskbarStates.disappearing:
timer.Stop();
taskbarState = TaskbarStates.visible;
left = WorkAreaRectangle.Right - BackgroundBitmap.Width - nPadding - nBaseWindowRight;
top = WorkAreaRectangle.Bottom - nPadding - nBaseWindowBottom;
width = BackgroundBitmap.Width;
height = 0;
SetWindowPos(this.Handle, -1, left, top, width, height, 0x0010);
timer.Interval = nVisibleEvents;
timer.Start();
Refresh();
break;
}
I'm still not sure why the notifier was taking focus in such a limited way, but at least this made it stop. Now if only we had a 100% managed way to do this in WinForms, that would be excellent!
modified on Wednesday, February 25, 2009 10:34 PM
|
|
|
|
 |
|
 |
I am having the same problem you were but when i try to impliment what you stated above I just get nothing. Any chance you could post a more complete code listing of your changes? Also where did the nPadding and nBaseWindowRight variables come from, the version I have doesnt have those variables.
|
|
|
|
 |
|
 |
nPadding and nBaseWindowRight are part of Crusty Applesniffer's modification, which you can find by browsing the comments here. As for my code changes, they are as follows:
The modified constructor:
#region TaskbarNotifier Constructor
...the P/Invoke signature for SetWindowPos():
[DllImport("user32.dll")]
protected static extern bool SetWindowPos(IntPtr hWnd,
Int32 hWndInsertAfter, Int32 X, Int32 Y, Int32 cx, Int32 cy, uint uFlags);
...and the entire Show() method (modified from the stock code, without any of Crusty Applesniffer's or my own modifications previously applied):
{
nEvents = Math.Min((nTimeToShow / 10), BackgroundBitmap.Height);
nShowEvents = nTimeToShow / nEvents;
nIncrementShow = BackgroundBitmap.Height / nEvents;
}
else
{
nShowEvents = 10;
nIncrementShow = BackgroundBitmap.Height;
}
if( nTimeToHide > 10)
{
nEvents = Math.Min((nTimeToHide / 10), BackgroundBitmap.Height);
nHideEvents = nTimeToHide / nEvents;
nIncrementHide = BackgroundBitmap.Height / nEvents;
}
else
{
nHideEvents = 10;
nIncrementHide = BackgroundBitmap.Height;
}
switch (taskbarState)
{
case TaskbarStates.hidden:
taskbarState = TaskbarStates.appearing;
SetWindowPos(
this.Handle,
-1,
WorkAreaRectangle.Right - BackgroundBitmap.Width,
WorkAreaRectangle.Bottom - BackgroundBitmap.Height,
BackgroundBitmap.Width,
BackgroundBitmap.Height,
0x0010
);
timer.Interval = nShowEvents;
timer.Start();
ShowWindow(this.Handle, 4);
break;
case TaskbarStates.appearing:
Refresh();
break;
case TaskbarStates.visible:
timer.Stop();
timer.Interval = nVisibleEvents;
timer.Start();
Refresh();
break;
case TaskbarStates.disappearing:
timer.Stop();
taskbarState = TaskbarStates.visible;
SetWindowPos(
this.Handle,
-1,
WorkAreaRectangle.Right - BackgroundBitmap.Width,
WorkAreaRectangle.Bottom,
BackgroundBitmap.Width,
0,
0x0010
);
timer.Interval = nVisibleEvents;
timer.Start();
Refresh();
break;
}
}
Hope this helps!
modified on Saturday, February 28, 2009 10:45 PM
|
|
|
|
 |
|
 |
Try turning off TopMost=true (in the Constructor)
and in the Show() method, add a BringToFront() when taskbar is appearing.
E.g.
case TaskbarStates.appearing:
BringToFront();
Refresh();
break;
Then it all works beautifully. I can post my modified class if anyone needs it.
|
|
|
|
 |
|
 |
I tried using the VB.NET code in a VB.NET project and got a whole bunch of errors. For starters, TaskbarNotifier.ContentRectangle was not recognized.
Has anyone got this to work with VB.NET and VS 2008?
|
|
|
|
 |
|
 |
Has anyone modified the code to display HTML content? Wondering if it's possible to do, say with the WebBrowser control and maintaining the skin?
|
|
|
|
 |
|
 |
Hi Sir,
I am going to use that Notifier in my school project. That's pretty good.
Now i am facing with the skin problem.
I am using VS2008(C#). When I am add that TaskBarNotifier form into my project and "skin2.bmp" and "close2.bmp" to my project>images, no error in compilation. But when i run, the error comes out like
">>>Resource 'images\skin2.bmp' cannot be found in class 'MyProject.MyForm'.<<<<"
in this following line
>>> TaskBarNotifier.SetBackgroundBitmap(new Bitmap(GetType(), "images\\skin2.bmp"), Color.FromArgb(255, 0, 255));<<
I have tried to add image again and chage the Build property to "Embedded resources". But same error.
Please help me how to fix it.
Thanks
|
|
|
|
 |
|
 |
Write
string skinIamge = Path.GetDirectoryName(Application.ExecutablePath) + @"\Images\skin2.bmp";
string closeImage = Path.GetDirectoryName(Application.ExecutablePath) + @"\Images\close2.bmp";
And Insted of this
TaskBarNotifier.SetBackgroundBitmap(new Bitmap(GetType(), "images\\skin2.bmp"), Color.FromArgb(255, 0, 255));
Write
TaskBarNotifier.SetBackgroundBitmap(Image.FromFile(skinIamge), Color.FromArgb(255, 0, 255));
TaskBarNotifier.SetCloseBitmap(Image.FromFile(closeImage), Color.FromArgb(255, 0, 255), new Point(220, 8));
|
|
|
|
 |