Hello, i just downloaded and installed the Visual Studio 2005 Express Edition (C#).
I want to make a small app, where a small notifyicon is the "program", it should poll XML/RSS feeds, and then show up in balloontips.
But i can't find a way to remove the form, and only startup the notifyicon.

Notifyicon with contextmenu and no form.
MmeBovary
just hide the form.
form.hide();
Jonathan Kehayias
Ok i think are two ways:
this.Showintaskbar = false;
this.showicon = false;
this.hide();
this.notifyicon.enable = true;
this.notifyicon.visible = true;
this.ballontip.show("im here if you need me");
this.tictacclock.start();
// now call the function whom made the process
this.ReadRSSCustomMethod(string something); // obviously call your own function
Please use the correct syntax, this was an example...
Nichole
this.WindowState = FormWindowState.Minimized;
this.ShowInTaskbar = false;
notifyIcon1.Visible = true;
You can set the notifyIcon1's MouseDoubleClick event to show the form if you want.
Use e.Cancel = true; under the this.FormClosing event to stop the app from exiting, and just keeping the notifyIcon.
MikeJingJing
mikael sandberg
Yes you can. I took the example from NotifyIcon and modified it to run in the Program.cs of a new windows form application. I could then remove the default Form1 that was added.
using
System;using System.Windows.Forms;
using System.Threading;
using System.Drawing;
namespace WindowsApplication9
{
static class Program
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
NotifyIcon notifyIcon1 = new NotifyIcon();
ContextMenu contextMenu1 = new ContextMenu();
MenuItem menuItem1 = new MenuItem();
contextMenu1.MenuItems.AddRange(new MenuItem[] { menuItem1 });
menuItem1.Index = 0;
menuItem1.Text = "E&xit";
menuItem1.Click += new EventHandler(menuItem1_Click);
notifyIcon1.Icon = new Icon("app.ico");
notifyIcon1.Text = "Form1 (NotifyIcon example)";
notifyIcon1.ContextMenu = contextMenu1;
notifyIcon1.Visible = true;
Application.Run();
notifyIcon1.Visible = false;
}
private static void menuItem1_Click(object Sender, EventArgs e)
{
Application.Exit();
}
}
}
Cindy_li
I think a saw some code once, which started with the notifyicon only.
Can't i do that