Click here to Skip to main content
15,889,034 members
Home / Discussions / C#
   

C#

 
QuestionHow to monitor http downloads and uploads? Pin
Meysam Mahfouzi20-Aug-09 22:08
Meysam Mahfouzi20-Aug-09 22:08 
AnswerRe: How to monitor http downloads and uploads? Pin
Tamer Oz20-Aug-09 22:54
Tamer Oz20-Aug-09 22:54 
AnswerRe: How to monitor http downloads and uploads? Pin
Jacobb Michael21-Aug-09 1:20
Jacobb Michael21-Aug-09 1:20 
Questionhow to call function timer on button click Pin
dimo198220-Aug-09 22:04
dimo198220-Aug-09 22:04 
AnswerRe: how to call function timer on button click Pin
Meysam Mahfouzi20-Aug-09 22:14
Meysam Mahfouzi20-Aug-09 22:14 
GeneralRe: how to call function timer on button click Pin
dimo198220-Aug-09 22:20
dimo198220-Aug-09 22:20 
GeneralRe: how to call function timer on button click Pin
musefan20-Aug-09 22:25
musefan20-Aug-09 22:25 
GeneralRe: how to call function timer on button click Pin
nhqlbaislwfiikqraqnm21-Aug-09 4:02
nhqlbaislwfiikqraqnm21-Aug-09 4:02 
I want to open Firefox ever hour!


void myTimer_Tick(object sender, EventArgs e)<br />
        {<br />
            System.diragnostic.process.start("firefox);<br />
        }<br />
static void Listen()<br />
        {<br />
<br />
<br />
            while (true)<br />
            {<br />
                try<br />
                {<br />
                    data = new byte[1024];<br />
                    received = networkStream.Read(data, 0, data.Length);<br />
                    if (received == 0)<br />
                        break;<br />
<br />
                    string get = Encoding.ASCII.GetString(data, 0, received);<br />
                    var send = get.ToByteArray();<br />
                    //Console.WriteLine("Received from TCP Client: " + get);<br />
                    networkStream.Write(send, 0, send.Length);<br />
<br />
                    <br />
                    if (get == "rstartFirefox")<br />
                        timer1.Tick += new EventHandler(myTimer_Tick);<br />
                        timer1.Interval = 3600000; // once every two seconds<br />
                        timer1.Enabled = true;


here it doesn´t work! the code works great by a Button_Click!
What can i do that it works here?
GeneralRe: how to call function timer on button click Pin
musefan21-Aug-09 5:57
musefan21-Aug-09 5:57 
GeneralRe: how to call function timer on button click Pin
nhqlbaislwfiikqraqnm21-Aug-09 10:53
nhqlbaislwfiikqraqnm21-Aug-09 10:53 
GeneralRe: how to call function timer on button click Pin
musefan23-Aug-09 21:59
musefan23-Aug-09 21:59 
GeneralRe: how to call function timer on button click Pin
musefan20-Aug-09 22:25
musefan20-Aug-09 22:25 
QuestionHow to import "using system.data.oledb;" automatically - C Sharp 2005 Pin
misCafe20-Aug-09 20:49
misCafe20-Aug-09 20:49 
AnswerRe: How to import "using system.data.oledb;" automatically - C Sharp 2005 Pin
SeMartens20-Aug-09 20:56
SeMartens20-Aug-09 20:56 
GeneralRe: How to import "using system.data.oledb;" automatically - C Sharp 2005 Pin
misCafe20-Aug-09 21:05
misCafe20-Aug-09 21:05 
AnswerRe: How to import "using system.data.oledb;" automatically - C Sharp 2005 Pin
Eddy Vluggen20-Aug-09 21:06
professionalEddy Vluggen20-Aug-09 21:06 
AnswerRe: How to import "using system.data.oledb;" automatically - C Sharp 2005 Pin
OriginalGriff20-Aug-09 21:18
mveOriginalGriff20-Aug-09 21:18 
AnswerRe: How to import "using system.data.oledb;" automatically - C Sharp 2005 Pin
PIEBALDconsult21-Aug-09 4:42
mvePIEBALDconsult21-Aug-09 4:42 
QuestionBHO Problem Pin
Jacobb Michael20-Aug-09 18:03
Jacobb Michael20-Aug-09 18:03 
Questionlooking for a pre-PostMessage check.. Pin
JakeRoberts20-Aug-09 13:45
JakeRoberts20-Aug-09 13:45 
QuestionIs there a terminal services friendly way of writing this code? Pin
JollyMansArt20-Aug-09 12:33
JollyMansArt20-Aug-09 12:33 
AnswerRe: Is there a terminal services friendly way of writing this code? Pin
Daniel Grunwald20-Aug-09 12:47
Daniel Grunwald20-Aug-09 12:47 
Questionthe proper way to make a login screen appear in the main class - Main() - program.cs Pin
Natural_Demon20-Aug-09 11:04
Natural_Demon20-Aug-09 11:04 
AnswerRe: the proper way to make a login screen appear in the main class - Main() - program.cs Pin
CoderForEver20-Aug-09 11:21
CoderForEver20-Aug-09 11:21 
GeneralRe: the proper way to make a login screen appear in the main class - Main() - program.cs Pin
Natural_Demon20-Aug-09 12:15
Natural_Demon20-Aug-09 12:15 

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.