Click here to Skip to main content
15,917,061 members
Home / Discussions / C#
   

C#

 
Questionhow to display an image one by one Pin
tjpraveen2326-Apr-06 23:09
tjpraveen2326-Apr-06 23:09 
AnswerRe: how to display an image one by one Pin
Ed.Poore26-Apr-06 23:46
Ed.Poore26-Apr-06 23:46 
GeneralRe: how to display an image one by one Pin
tjpraveen2327-Apr-06 1:15
tjpraveen2327-Apr-06 1:15 
GeneralRe: how to display an image one by one Pin
Ed.Poore27-Apr-06 1:26
Ed.Poore27-Apr-06 1:26 
Questioncreating backup and restoring Pin
jinup26-Apr-06 22:11
jinup26-Apr-06 22:11 
AnswerRe: creating backup and restoring Pin
Ed.Poore27-Apr-06 3:43
Ed.Poore27-Apr-06 3:43 
QuestionC# com add-in integrated visio problem Pin
salman_syed_0126-Apr-06 21:55
salman_syed_0126-Apr-06 21:55 
QuestionGetting a text from a textbox Pin
praveenqwe26-Apr-06 21:19
praveenqwe26-Apr-06 21:19 
AnswerRe: Getting a text from a textbox Pin
J4amieC26-Apr-06 21:56
J4amieC26-Apr-06 21:56 
QuestionGetting a text from a textbox Pin
praveenqwe26-Apr-06 21:13
praveenqwe26-Apr-06 21:13 
AnswerRe: Getting a text from a textbox Pin
chakkara200327-Apr-06 1:11
chakkara200327-Apr-06 1:11 
QuestionPlease Help Me Pin
dayakar_dn26-Apr-06 21:11
dayakar_dn26-Apr-06 21:11 
AnswerRe: Please Help Me Pin
J4amieC26-Apr-06 21:54
J4amieC26-Apr-06 21:54 
Questiondiffrences between oledb & odbc Pin
rah_sin26-Apr-06 20:55
professionalrah_sin26-Apr-06 20:55 
QuestionPlease Help Me Pin
dayakar_dn26-Apr-06 20:52
dayakar_dn26-Apr-06 20:52 
AnswerRe: Please Help Me Pin
Rob Philpott26-Apr-06 22:49
Rob Philpott26-Apr-06 22:49 
QuestionDesign Mode Pin
smarttom9926-Apr-06 19:28
smarttom9926-Apr-06 19:28 
AnswerRe: Design Mode Pin
alexey N26-Apr-06 20:24
alexey N26-Apr-06 20:24 
QuestionRepeated : Visio 2003 Problem or my add-in problem Pin
salman_syed_0126-Apr-06 18:43
salman_syed_0126-Apr-06 18:43 
Questiondata from client into hashtable on server Pin
salman_syed_0126-Apr-06 18:36
salman_syed_0126-Apr-06 18:36 
QuestionWeb hosting in intranet Pin
Jijo BP26-Apr-06 17:07
Jijo BP26-Apr-06 17:07 
AnswerRe: Web hosting in intranet Pin
Ed.Poore26-Apr-06 23:47
Ed.Poore26-Apr-06 23:47 
AnswerRe: Web hosting in intranet Pin
Vasudevan Deepak Kumar27-Apr-06 4:04
Vasudevan Deepak Kumar27-Apr-06 4:04 
Questiona question about WebBrowser Pin
ylw6626-Apr-06 17:00
ylw6626-Apr-06 17:00 
Sniff | :^) i use .net framework1.1, i would like to double-click notifyIcon to show a webbrowser,but the webbrowser always shows in the left and top of the screen,
i want your help, the code is follow :

namespace WindowsApplication8
{
///
/// Form1 的摘要说明。
///

public class Form1 : System.Windows.Forms.Form
{
private AxSHDocVw.AxWebBrowser axWebBrowser1;
private System.Windows.Forms.NotifyIcon notifyIcon1;
private System.Windows.Forms.ContextMenu contextMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.ComponentModel.IContainer components;

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


private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.axWebBrowser1 = new AxSHDocVw.AxWebBrowser();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.contextMenu1 = new System.Windows.Forms.ContextMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
((System.ComponentModel.ISupportInitialize)(this.axWebBrowser1)).BeginInit();
this.SuspendLayout();
//
// axWebBrowser1
//
this.axWebBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.axWebBrowser1.Enabled = true;
this.axWebBrowser1.Location = new System.Drawing.Point(0, 0);
this.axWebBrowser1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWebBrowser1.OcxState")));
this.axWebBrowser1.Size = new System.Drawing.Size(292, 266);
this.axWebBrowser1.TabIndex = 0;
//
// notifyIcon1
//
this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
this.notifyIcon1.Text = "notifyIcon1";
this.notifyIcon1.Visible = true;
this.notifyIcon1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseDown);
this.notifyIcon1.DoubleClick += new System.EventHandler(this.notifyIcon1_DoubleClick);
//
// contextMenu1
//
this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.Text = "Exit";
this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.Add(this.axWebBrowser1);
this.Name = "Form1";
this.Text = "Form1";
this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.axWebBrowser1)).EndInit();
this.ResumeLayout(false);

}
#endregion


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

private void notifyIcon1_DoubleClick(object sender, System.EventArgs e)
{
this.Show();

object flags = (2 | 4 | 8);
object targetFrame = null;
object postData = null;
object headers = null;


this.axWebBrowser1.Navigate("http://www.google.com",ref flags,ref targetFrame,ref postData,ref headers);


if (this.WindowState==FormWindowState.Minimized)
this.WindowState=FormWindowState.Normal;
this.Activate();
this.notifyIcon1.Visible=false;


}

private void Form1_Load(object sender, System.EventArgs e)
{
this.notifyIcon1.Visible=true;

object flags = (2 | 4 | 8);
object targetFrame = null;
object postData = null;
object headers = null;


this.axWebBrowser1.Navigate("http://www.google.com",ref flags,ref targetFrame,ref postData,ref headers);

}

private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
e.Cancel=true;
this.Hide();
this.ShowInTaskbar=false;
this.notifyIcon1.Visible=true;

}

private void menuItem1_Click(object sender, System.EventArgs e)
{
this.notifyIcon1.Visible=false;
Application.Exit();
}

private void notifyIcon1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
Control control = new Control(null,Control.MousePosition.X,Control.MousePosition.Y,1,1);

if (e.Button==MouseButtons.Right)
{
control.Visible = true;
control.CreateControl();
Point pos = new Point(1,1);
this.contextMenu1.Show(control,pos);
}

}
}
}
Thanks
GeneralRe: a question about WebBrowser Pin
Guffa26-Apr-06 20:52
Guffa26-Apr-06 20:52 

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.