Click here to Skip to main content
15,924,452 members
Home / Discussions / C#
   

C#

 
QuestionHow to monitor an incoming TCP/IP connection in C#? Pin
adeeeljan31-May-07 11:14
adeeeljan31-May-07 11:14 
AnswerRe: How to monitor an incoming TCP/IP connection in C#? Pin
Dave Kreskowiak31-May-07 13:21
mveDave Kreskowiak31-May-07 13:21 
QuestionForm Opacity and OnClose() Pin
Wraith Lunati31-May-07 11:01
Wraith Lunati31-May-07 11:01 
AnswerRe: Form Opacity and OnClose() Pin
Christian Graus31-May-07 11:10
protectorChristian Graus31-May-07 11:10 
GeneralRe: Form Opacity and OnClose() Pin
Wraith Lunati31-May-07 11:31
Wraith Lunati31-May-07 11:31 
GeneralRe: Form Opacity and OnClose() Pin
Christian Graus31-May-07 11:50
protectorChristian Graus31-May-07 11:50 
GeneralRe: DummyClose Pin
Wraith Lunati31-May-07 12:22
Wraith Lunati31-May-07 12:22 
GeneralRe: Form Opacity and OnClose() Pin
Wraith Lunati31-May-07 11:58
Wraith Lunati31-May-07 11:58 
OMG That is sooo cool!!! Now I will attempt to make this into an abstract class library I can use as a base for forms.

This is made from a Windows Application template...try it out!!!
If you copy and paste it won't work I hope most of you know that :P

WARNING: This code is just an example. I assume most of you know what to do or you wouldn't even try.

<br />
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
<br />
namespace WindowsApplication1<br />
{<br />
    public partial class Form1 : Form<br />
    {<br />
        public Form1()<br />
        {<br />
            InitializeComponent();<br />
            FadeIn.Enabled = true; // Timer 1<br />
        }<br />
<br />
        private void FadeIn_Tick(object sender, EventArgs e)<br />
        {<br />
            Opacity += 0.005;<br />
            if (Opacity > 0.995)<br />
                FadeIn.Enabled = false;<br />
        }<br />
<br />
        private void FadeOut_Tick(object sender, EventArgs e)<br />
        {<br />
            Opacity -= 0.0025;<br />
            if (Opacity < 0.0025)<br />
            {<br />
                FadeOut.Enabled = false;<br />
                this.Close();<br />
            }<br />
        }<br />
<br />
        private void DummyClose(object sender, FormClosingEventArgs e)<br />
        {<br />
            if (Opacity > 0)<br />
            {<br />
                FadeIn.Enabled = false; // If this timer is still going<br />
                                        // they will fight and it will<br />
                                        // take longer to close.<br />
                FadeOut.Enabled = true; // Timer 2.<br />
                e.Cancel = true;<br />
            }<br />
        }<br />
    }<br />
}<br />

GeneralRe: Form Opacity and OnClose() Pin
Christian Graus31-May-07 12:43
protectorChristian Graus31-May-07 12:43 
GeneralRe: Article? Pin
Wraith Lunati31-May-07 13:11
Wraith Lunati31-May-07 13:11 
GeneralRe: Article? Pin
Christian Graus31-May-07 13:32
protectorChristian Graus31-May-07 13:32 
GeneralRe: Article? Pin
Wraith Lunati31-May-07 14:05
Wraith Lunati31-May-07 14:05 
Questionkill proccess with C# Pin
crash89331-May-07 10:06
crash89331-May-07 10:06 
AnswerRe: kill proccess with C# Pin
Tarakeshwar Reddy31-May-07 10:41
professionalTarakeshwar Reddy31-May-07 10:41 
GeneralRe: kill proccess with C# Pin
crash89331-May-07 11:19
crash89331-May-07 11:19 
GeneralRe: kill proccess with C# Pin
Christian Graus31-May-07 11:26
protectorChristian Graus31-May-07 11:26 
GeneralRe: kill proccess with C# Pin
Tarakeshwar Reddy31-May-07 12:37
professionalTarakeshwar Reddy31-May-07 12:37 
GeneralRe: kill proccess with C# Pin
crash89331-May-07 19:24
crash89331-May-07 19:24 
GeneralRe: kill proccess with C# Pin
crash89331-May-07 20:01
crash89331-May-07 20:01 
AnswerRe: kill proccess with C# Pin
Martin#31-May-07 20:20
Martin#31-May-07 20:20 
GeneralRe: kill proccess with C# Pin
crash89331-May-07 20:46
crash89331-May-07 20:46 
GeneralRe: kill proccess with C# Pin
Martin#31-May-07 21:02
Martin#31-May-07 21:02 
GeneralRe: kill proccess with C# Pin
crash8933-Jun-07 14:58
crash8933-Jun-07 14:58 
AnswerRe: kill proccess with C# Pin
Martin#10-Jun-07 20:07
Martin#10-Jun-07 20:07 
GeneralRe: kill proccess with C# Pin
crash89311-Jun-07 1:13
crash89311-Jun-07 1:13 

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.