Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
GeneralRe: Mappath Pin
AB77716-Mar-06 23:02
AB77716-Mar-06 23:02 
GeneralRe: Mappath Pin
A.Grover7-Mar-06 18:58
A.Grover7-Mar-06 18:58 
QuestionLinks in RichTextBox Pin
Beringer6-Mar-06 20:50
Beringer6-Mar-06 20:50 
AnswerRe: Links in RichTextBox Pin
AB77716-Mar-06 21:03
AB77716-Mar-06 21:03 
QuestionRegarding Taskbar popup Pin
A.Grover6-Mar-06 19:35
A.Grover6-Mar-06 19:35 
AnswerRe: Regarding Taskbar popup Pin
AB77716-Mar-06 19:42
AB77716-Mar-06 19:42 
GeneralRe: Regarding Taskbar popup Pin
A.Grover6-Mar-06 22:47
A.Grover6-Mar-06 22:47 
GeneralRe: Regarding Taskbar popup Pin
AB77716-Mar-06 23:08
AB77716-Mar-06 23:08 
Even i have used the TaskBarnotifier class from the same link
then i created a form and a button on that form
on the click of the button the taskbarnotifier is displayed

the code for the form that i created is below here


using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Runtime.InteropServices;
using CustomUIControls;

namespace WindowsApplication7
{
///
/// Summary description for Form1.
///

public class Form1 : System.Windows.Forms.Form
{
///
/// Required designer variable.
///

private System.ComponentModel.Container components = null;
TaskbarNotifier taskbarnotifier;

int x,y;
bool bMouseDown = false;
private System.Windows.Forms.Button button1;
ArrayList arlist = new ArrayList();

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
taskbarnotifier = new TaskbarNotifier();
taskbarnotifier.MouseHover += new EventHandler(taskbarnotifier_MouseHover);

//
// TODO: Add any constructor code after InitializeComponent call
//
}

///
/// Clean up any resources being used.
///

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(88, 96);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(72, 32);
this.button1.TabIndex = 0;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 273);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseDown);
this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseUp);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseMove);
this.ResumeLayout(false);

}
#endregion

///
/// The main entry point for the application.
///

[STAThread]
static void Main()
{
Application.Run(new Form1());
}

private void Form1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
bMouseDown = true;
x = e.X;
y = e.Y;
arlist.Add(new Point(x,y));
}

private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(bMouseDown)
{
Graphics gr=this.CreateGraphics();
if (x == -1 && y == -1)
{
x=e.X;
y=e.Y;
}


gr.DrawLine(new Pen(Color.Blue),e.X,e.Y,x,y);
x=e.X;
y=e.Y;
arlist.Add(new Point(x,y));


}
}

private void Form1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
bMouseDown = false;
}

private void button1_Click(object sender, System.EventArgs e)
{
taskbarnotifier.BackgroundImage = Image.FromFile(@"C:\WINNT\Coffee Bean.bmp");
taskbarnotifier.SetBackgroundBitmap(@"C:\WINNT\Coffee Bean.bmp",Color.White);
taskbarnotifier.Text = "Coffee Bean";
taskbarnotifier.Show("POP-UP", "",1500,1500,1500);
}



private void taskbarnotifier_MouseHover(object sender, EventArgs e)
{
taskbarnotifier.Show("POP-UP", "",1500,1500,1500);
}
}
}


Regards,
Pramod
GeneralRe: Regarding Taskbar popup Pin
A.Grover6-Mar-06 23:49
A.Grover6-Mar-06 23:49 
GeneralRe: Regarding Taskbar popup Pin
AB77717-Mar-06 1:05
AB77717-Mar-06 1:05 
GeneralRe: Regarding Taskbar popup Pin
A.Grover7-Mar-06 18:47
A.Grover7-Mar-06 18:47 
GeneralRe: Regarding Taskbar popup Pin
AB77717-Mar-06 18:53
AB77717-Mar-06 18:53 
GeneralRe: Regarding Taskbar popup Pin
A.Grover7-Mar-06 19:13
A.Grover7-Mar-06 19:13 
GeneralRe: Regarding Taskbar popup Pin
AB77717-Mar-06 23:19
AB77717-Mar-06 23:19 
QuestionHelp Me with "Directory" Pin
hackerhcm6-Mar-06 19:01
hackerhcm6-Mar-06 19:01 
AnswerRe: Help Me with "Directory" Pin
DigitalKing6-Mar-06 19:09
DigitalKing6-Mar-06 19:09 
GeneralRe: Help Me with "Directory" Pin
hackerhcm6-Mar-06 19:47
hackerhcm6-Mar-06 19:47 
AnswerRe: Help Me with "Directory" Pin
Maqsood Ahmed6-Mar-06 19:10
Maqsood Ahmed6-Mar-06 19:10 
Questionmonthcalendar Pin
nassimnastaran6-Mar-06 18:47
nassimnastaran6-Mar-06 18:47 
AnswerRe: monthcalendar Pin
JacquesDP6-Mar-06 18:56
JacquesDP6-Mar-06 18:56 
GeneralRe: monthcalendar Pin
nassimnastaran6-Mar-06 22:29
nassimnastaran6-Mar-06 22:29 
GeneralRe: monthcalendar Pin
Drew McGhie7-Mar-06 9:31
Drew McGhie7-Mar-06 9:31 
QuestionArrayList Problem Pin
AB77716-Mar-06 18:40
AB77716-Mar-06 18:40 
AnswerRe: ArrayList Problem Pin
DigitalKing6-Mar-06 19:03
DigitalKing6-Mar-06 19:03 
GeneralRe: ArrayList Problem Pin
AB77716-Mar-06 19:11
AB77716-Mar-06 19:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.