Click here to Skip to main content
15,901,205 members
Home / Discussions / C#
   

C#

 
GeneralRe: Deugging Pin
Colin Angus Mackay25-Nov-04 0:49
Colin Angus Mackay25-Nov-04 0:49 
GeneralRe: Deugging Pin
Daniel Turini25-Nov-04 2:35
Daniel Turini25-Nov-04 2:35 
Generalerror Pin
fatidarya24-Nov-04 21:02
fatidarya24-Nov-04 21:02 
GeneralRe: error Pin
leppie25-Nov-04 1:36
leppie25-Nov-04 1:36 
GeneralRe: error Pin
fatidarya25-Nov-04 10:46
fatidarya25-Nov-04 10:46 
GeneralRe: error Pin
Daniel Grunwald25-Nov-04 9:41
Daniel Grunwald25-Nov-04 9:41 
GeneralTransparencyKey and Opacity Pin
kristoffersen24-Nov-04 19:40
kristoffersen24-Nov-04 19:40 
GeneralRe: TransparencyKey and Opacity Pin
leppie24-Nov-04 23:24
leppie24-Nov-04 23:24 
I found a trick to handle that. Note the Bitmap.MakeTransparent.

[edit] note my image has a white background that i make transparent [edit]

class AboutForm : Form
{
  Timer timer = new Timer();
  double STEP = 8 / 256.0;
  public AboutForm()
  {
    Opacity = 0;
    timer.Interval = (int)(1000 * STEP);
    timer.Tick += new EventHandler(timer_Tick);

    BackColor = Color.White;
    Size = new Size(512, 420);
    ShowInTaskbar = false;
    FormBorderStyle = FormBorderStyle.None;
    StartPosition = FormStartPosition.CenterParent;
    TransparencyKey = Color.Black;
    Image i = Image.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("splash.png"));

    Bitmap b = new Bitmap(i);
    b.MakeTransparent(Color.White);

    BackgroundImage = b;

    SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
    UpdateStyles();
  }

  protected override void OnHandleCreated(EventArgs e)
  {
    base.OnHandleCreated(e);
    timer.Start();
  }

  private void timer_Tick(object sender, EventArgs e)
  {
    if (Opacity >= 1.0)
    {
      timer.Stop();
      return;
    }

    Opacity += STEP;
    STEP *= 1 / 1.01;
  }
}


top secret
Download xacc-ide 0.0.3 now!
See some screenshots

QuestionHow do I get the size of a file? Pin
Rafferty Uy24-Nov-04 15:57
Rafferty Uy24-Nov-04 15:57 
AnswerRe: How do I get the size of a file? Pin
Dennis C. Dietrich24-Nov-04 16:18
Dennis C. Dietrich24-Nov-04 16:18 
AnswerRe: How do I get the size of a file? Pin
Maqsood Ahmed26-Nov-04 1:12
Maqsood Ahmed26-Nov-04 1:12 
QuestionHow can a program can be notify by a service ? Pin
Anonymous24-Nov-04 15:46
Anonymous24-Nov-04 15:46 
AnswerRe: How can a program can be notify by a service ? Pin
Stefan Troschuetz24-Nov-04 23:30
Stefan Troschuetz24-Nov-04 23:30 
Generalview control binding Pin
ppp00124-Nov-04 15:34
ppp00124-Nov-04 15:34 
GeneralRe: view control binding Pin
HahnTech25-Nov-04 4:57
HahnTech25-Nov-04 4:57 
GeneralWindows Forms Focus Pin
Alex Leshinsky24-Nov-04 15:10
Alex Leshinsky24-Nov-04 15:10 
GeneralRe: Windows Forms Focus Pin
Alex Leshinsky25-Nov-04 13:46
Alex Leshinsky25-Nov-04 13:46 
GeneralRe: Windows Forms Focus Pin
Jay Shankar25-Nov-04 16:55
Jay Shankar25-Nov-04 16:55 
GeneralRe: Windows Forms Focus Pin
Alex Leshinsky25-Nov-04 21:17
Alex Leshinsky25-Nov-04 21:17 
GeneralRe: Windows Forms Focus Pin
Jay Shankar25-Nov-04 21:26
Jay Shankar25-Nov-04 21:26 
GeneralRe: Windows Forms Focus Pin
Alex Leshinsky26-Nov-04 11:09
Alex Leshinsky26-Nov-04 11:09 
GeneralRestoring Previous Clipboard Data Pin
Jay Shankar24-Nov-04 13:49
Jay Shankar24-Nov-04 13:49 
GeneralRe: Restoring Previous Clipboard Data Pin
Heath Stewart24-Nov-04 14:33
protectorHeath Stewart24-Nov-04 14:33 
GeneralRe: Restoring Previous Clipboard Data Pin
Jay Shankar24-Nov-04 23:04
Jay Shankar24-Nov-04 23:04 
GeneralRe: Restoring Previous Clipboard Data Pin
Heath Stewart25-Nov-04 5:40
protectorHeath Stewart25-Nov-04 5:40 

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.