Click here to Skip to main content
16,007,814 members
Home / Discussions / C#
   

C#

 
GeneralRe: Find Largest #..... Pin
Guffa27-May-06 12:21
Guffa27-May-06 12:21 
GeneralRe: Find Largest #..... Pin
Eliee28-May-06 4:39
Eliee28-May-06 4:39 
AnswerRe: Find Largest #..... Pin
Guffa28-May-06 10:37
Guffa28-May-06 10:37 
GeneralRe: Find Largest #..... Pin
Eliee28-May-06 11:11
Eliee28-May-06 11:11 
GeneralRe: Find Largest #..... Pin
Colin Angus Mackay28-May-06 12:02
Colin Angus Mackay28-May-06 12:02 
AnswerRe: Find Largest #..... Pin
Guffa28-May-06 13:08
Guffa28-May-06 13:08 
AnswerRe: Find Largest #..... Pin
Danny van Kasteel28-May-06 23:05
Danny van Kasteel28-May-06 23:05 
QuestionVS 2005 flickering problem mouse leave Pin
Phoen2527-May-06 11:50
Phoen2527-May-06 11:50 
Hello people !!. I'm developing in vs 2005 and I've a problem that may be you can help me to solve it.

I have a winform, a boolean attribute for a state and a timer. The timer see the state and if is closing then it start fading out. So the only things I have is a timer to animate fade out on mouse leave event.

The problem is this example run excelent in Visual Studio 2003, but a flick appear in VS 2005 when I leave the form. May be a problem with winfows.form or system.drawing
Any ideas??

I have this very simple code:

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace WindowsApplicationTest
{
public class Form1 : Form
{
private bool m_closing;
private System.ComponentModel.IContainer components = null;
private System.Windows.Forms.Timer timer1;

#region Windows Form Designer generated code

private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.SuspendLayout();
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Interval = 20;
this.timer1.Tick += new System.EventHandler (this.timer1_Tick);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font ;
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(292, 266);
this.DoubleBuffered = true;
this.ForeColor = System.Drawing.Color.White ;
this.Name = "Form1";
this.Text = "Form1";
this.MouseEnter += new System.EventHandler(this.Form1_MouseEnter);
this.MouseLeave += new System.EventHandler (this.Form1_MouseLeave);
this.ResumeLayout(false);

}

#endregion

public Form1()
{
this.SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer, true );
InitializeComponent();
}

private void Form1_MouseLeave(object sender, EventArgs e)
{
m_closing = true;
}

private void Form1_MouseEnter(object sender, EventArgs e)
{
this.m_closing = false;
this.Opacity = 1;
}

private void timer1_Tick(object sender, EventArgs e)
{
if (m_closing)
{
if (this.Opacity > 0)
{
this.Opacity = this.Opacity - 0.01;
}
else
{
Close();
}
}
}

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

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

Thanks a lot !!!!

AnswerRe: VS 2005 flickering problem mouse leave Pin
martin_hughes27-May-06 12:30
martin_hughes27-May-06 12:30 
GeneralRe: VS 2005 flickering problem mouse leave Pin
Phoen2527-May-06 12:32
Phoen2527-May-06 12:32 
GeneralRe: VS 2005 flickering problem mouse leave Pin
Phoen255-Jul-06 9:44
Phoen255-Jul-06 9:44 
Questioninsert image to Sql Data base Pin
v_sadeghpour27-May-06 11:46
v_sadeghpour27-May-06 11:46 
AnswerRe: insert image to Sql Data base Pin
Judah Gabriel Himango27-May-06 16:58
sponsorJudah Gabriel Himango27-May-06 16:58 
AnswerRe: insert image to Sql Data base Pin
Billah27-May-06 18:58
Billah27-May-06 18:58 
GeneralRe: insert image to Sql Data base Pin
v_sadeghpour28-May-06 11:27
v_sadeghpour28-May-06 11:27 
Questionthrow Pin
mehrdadc4827-May-06 11:18
mehrdadc4827-May-06 11:18 
AnswerRe: throw [modified*2] Pin
Judah Gabriel Himango27-May-06 11:40
sponsorJudah Gabriel Himango27-May-06 11:40 
GeneralRe: throw Pin
Graham Nimbley27-May-06 11:56
Graham Nimbley27-May-06 11:56 
AnswerRe: throw Pin
Guffa27-May-06 12:12
Guffa27-May-06 12:12 
GeneralRe: throw Pin
Graham Nimbley27-May-06 12:53
Graham Nimbley27-May-06 12:53 
GeneralRe: throw Pin
Judah Gabriel Himango27-May-06 14:11
sponsorJudah Gabriel Himango27-May-06 14:11 
QuestionShockwaveObject Pin
mehrdadc4827-May-06 11:15
mehrdadc4827-May-06 11:15 
Questionsql weird problem Pin
JelleM27-May-06 10:45
JelleM27-May-06 10:45 
AnswerRe: sql weird problem Pin
Colin Angus Mackay27-May-06 11:15
Colin Angus Mackay27-May-06 11:15 
GeneralRe: sql weird problem Pin
JelleM27-May-06 11:26
JelleM27-May-06 11:26 

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.