|
I'm guessing your loop is preventing you main window from processing messages. You could identify this by putting an Application.DoEvents() line into the loop which should resume processing. However, this is bad and should not be seen as a solution only a test to see if it is message processing.
The better approach would be to have your okay button start a timer rather than wait in a loop. You can use a timer control which should be able to do what you require.
|
|
|
|
|
I've tried the timer, but it still doesn't work. Could you give me a sample code that works for you using a timer (or a loop) and a NotifyIcon? Thanks.
|
|
|
|
|

public partial class MainFrm : Form
{
Timer MyReminder = new Timer();
public MainFrm()
{
InitializeComponent();
btnOK.Click += new EventHandler(btnOK_Click);
Resize += new EventHandler(MainFrm_Resize);
TB_Icon.Icon = Icon;
TB_Icon.MouseDoubleClick += new MouseEventHandler(TB_Icon_MouseDoubleClick);
ContMenuStrip.Click += new EventHandler(ContMenuStrip_Click);
MyReminder.Interval = 2000;
MyReminder.Tick += new EventHandler(MyReminder_Tick);
}
void MyReminder_Tick(object sender, EventArgs e)
{
Console.WriteLine("You have been reminded at " + DateTime.Now);
}
void btnOK_Click(object sender, EventArgs e)
{
WindowState = FormWindowState.Minimized;
}
void MainFrm_Resize(object sender, EventArgs e)
{
if (WindowState == FormWindowState.Minimized)
{
Hide();
MyReminder.Start();
}
else
{
MyReminder.Stop();
}
}
void TB_Icon_MouseDoubleClick(object sender, MouseEventArgs e)
{
Show();
WindowState = FormWindowState.Normal;
}
void ContMenuStrip_Click(object sender, EventArgs e)
{
Show();
WindowState = FormWindowState.Normal;
}
}
Dave
|
|
|
|
|
Thank you, thank you!
Solution is above.
Thanks to DaveyM69.
|
|
|
|
|
I would like to speed up my processing with visual studio and or other programs. Does anyone know of free distributed computing software that I can run with Visual Studio 2005 to speed up processing? Does anyone know of free distributed computing software that I can run other programs with (Run Visual Studio 2005 on my computer and SQL Server 2005 on another computer which is accessed on my computer)? It doesn't have to be over the internet but through a LAN.
|
|
|
|
|
Not sure exactly what you are doing, but BOINC is an amazing distributed computer framework. A simple Google search will find you loads of information.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
chris175 wrote: Run Visual Studio 2005 on my computer and SQL Server 2005 on another computer which is accessed on my computer
What are you going on about. SQL Server and every other Database natively support remote connections and have like forever.
led mike
|
|
|
|
|
led mike wrote: SQL Server and every other Database natively support remote connections
I guess sql server is a bad example. Maybe if I had 3 Visual Studio 2005 instances running. I would want one working on my computer and the other two computing on another computer.
|
|
|
|
|
chris175 wrote: I guess sql server is a bad example. Maybe if I had 3 Visual Studio 2005 instances running. I would want one working on my computer and the other two computing on another computer.
As far as I am aware, Visual Studio is NOT a distributed application. If you have found information to the contrary perhaps you could supply a link to it? I seems so far you've done a very poor job either understanding distributed computing or explaining your question.
led mike
|
|
|
|
|
led mike wrote: As far as I am aware, Visual Studio is NOT a distributed application.
Thanks you for the answer to my question. I was simply asking if it was possible to have distributed computing for Visual Studio 2005.
The other part of my question involves something entirly different. I was wanting to know if I could have an ENTIRE application (Ex: VS2005) running on another computer but being controled from my computer.
|
|
|
|
|
chris175 wrote: The other part of my question involves something entirly different. I was wanting to know if I could have an ENTIRE application (Ex: VS2005) running on another computer but being controled from my computer.
Yes there are various technologies for doing just that. They are NOT equal.
http://en.wikipedia.org/wiki/Remote_control_software[^]
led mike
|
|
|
|
|
If you want to know if you can spread a large projects compile over multiple machines to speed it up there's 3rd party software to do so. IIRC the one I've heard of before is called incredibuild.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop.
-- Matthew Faithfull
|
|
|
|
|
|
I am populating my Dropdownlist using dataset
DataTable t_table = new DataTable();
SqlDataAdapter adapt;
SqlCommand cmd = new SqlCommand("SELECT distinct ID from TBL1",conn);
adapt = new SqlDataAdapter(cmd);
adapt.Fill(t_table);
dsProj.Tables.Add(t_table);
The staement does populate as expected but I want to insert a Blank Line First.
How can I do this?
|
|
|
|
|
This was asked over here[^], roughly.
|
|
|
|
|
Hi Guy
This is easy just use insertAtRow() method to table, u can insert a blank row after bind to Combobox.
thanks
Cheers
RRave
MCTS,MCPD
|
|
|
|
|
I dont have much knowledge about System.Drawing namespace,
I want to print a particular text in Bold letters with in printed page.
Its an window application, having a form similar to standard mail interface. like having fields
From:
To:
Subject:
Now user can print this form contents.
What I want to do feilds like From, To, Subject, should print in bold letters.
|
|
|
|
|
The Font that you use has a FontStyle property. When you create the font, set FontStyle.Bold. If my memory serves correctly, the call would look like this:
Font myFont = new Font("Verdana", 12, FontStyle.Bold);
|
|
|
|
|
|
What part of Pete's code wasn't clear and easy to understand?
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
Hi Guy
i told not like that meaning man, i told when we are give a full code or example for that , easilly he can better than one line code.
Thanks
Cheers
RRave
MCTS,MCPD
|
|
|
|
|
So which bit of my example didn't tell him how to create a bold font. One line that's all it takes. Anything else is just padding and wasting his time. He asked for information on how to put a bold font in, and that's exactly what I told him. How he draws that to the screen is up to him - because there are so many different ways he can do this.
|
|
|
|
|
Hi Guy
You are exactlly correct.OK but i gave additiional information to he, because of if we suugest a help more than he asked details, that's must eb help better than one line code. But ur one code not given a cooerct result
see what is he is asking?
I dont have much knowledge about System.Drawing namespace,
I want to print a particular text in Bold letters with in printed page.
But u given this line only
Font myFont = new Font("Verdana", 12, FontStyle.Bold);
So please explian how can do ONLY ONE LINE CODE with his work
Hey i'm also designer and developer all kind of applciations.
if u want to more come to vrrave@gmail.com
thanks
Cheers
RRave
MCTS,MCPD
|
|
|
|
|
Ok if you're being picky then he also needs this line:
myLabel.Font = myFont;
But I'm sure he can work it out for himself.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
Hi Guy
Cool,Now see this line "I dont have much knowledge about System.Drawing namespace,"
I think we can stop.
Thanks
Cheers
RRave
MCTS,MCPD
|
|
|
|