Click here to Skip to main content
15,900,378 members
Home / Discussions / C#
   

C#

 
QuestionLock Form Pin
half-life10-Jun-08 1:16
half-life10-Jun-08 1:16 
AnswerRe: Lock Form Pin
Giorgi Dalakishvili10-Jun-08 1:26
mentorGiorgi Dalakishvili10-Jun-08 1:26 
GeneralRe: Lock Form Pin
half-life10-Jun-08 1:35
half-life10-Jun-08 1:35 
AnswerRe: Lock Form Pin
jamie55010-Jun-08 1:41
jamie55010-Jun-08 1:41 
GeneralRe: Lock Form Pin
half-life10-Jun-08 2:18
half-life10-Jun-08 2:18 
QuestionHow to define object type in ArrayList ? Pin
Yanshof10-Jun-08 1:07
Yanshof10-Jun-08 1:07 
AnswerRe: How to define object type in ArrayList ? Pin
N a v a n e e t h10-Jun-08 1:22
N a v a n e e t h10-Jun-08 1:22 
AnswerRe: How to define object type in ArrayList ? Pin
#realJSOP10-Jun-08 2:51
professional#realJSOP10-Jun-08 2:51 
QuestionRegarding Activex Control Pin
Member 477486810-Jun-08 0:45
Member 477486810-Jun-08 0:45 
AnswerRe: Regarding Activex Control Pin
Arjun Marwaha10-Jun-08 0:53
Arjun Marwaha10-Jun-08 0:53 
GeneralRe: Regarding Activex Control Pin
Member 477486810-Jun-08 19:06
Member 477486810-Jun-08 19:06 
QuestionREfresging Form While process is running Pin
MumbleB9-Jun-08 23:57
MumbleB9-Jun-08 23:57 
AnswerRe: REfresging Form While process is running Pin
Giorgi Dalakishvili10-Jun-08 0:12
mentorGiorgi Dalakishvili10-Jun-08 0:12 
GeneralRe: REfresging Form While process is running Pin
MumbleB10-Jun-08 1:44
MumbleB10-Jun-08 1:44 
GeneralRe: REfresging Form While process is running Pin
Giorgi Dalakishvili10-Jun-08 1:56
mentorGiorgi Dalakishvili10-Jun-08 1:56 
GeneralRe: REfresging Form While process is running Pin
MumbleB10-Jun-08 5:44
MumbleB10-Jun-08 5:44 
GeneralRe: REfresging Form While process is running [modified] Pin
Giorgi Dalakishvili10-Jun-08 6:03
mentorGiorgi Dalakishvili10-Jun-08 6:03 
GeneralRe: REfresging Form While process is running Pin
MumbleB10-Jun-08 7:07
MumbleB10-Jun-08 7:07 
GeneralRe: REfresging Form While process is running Pin
Giorgi Dalakishvili10-Jun-08 7:35
mentorGiorgi Dalakishvili10-Jun-08 7:35 
QuestionSplash Screen Form Pin
see_seA9-Jun-08 23:57
see_seA9-Jun-08 23:57 
I'm trying to make a splash screen with the following requirements:
1) Must fade in and fade out (issues)
2) Fades in before main program form is open and fades out once it is (done this)
3) Displays an image which is not squash and has transparency (issues)

So I've looked on the net and I'm still struggling with some aspects if anyone can assist. Fading the form is trivial (by setting the Opacity), however getting a form to be transparent (to work with the pictures transparency) and then fading that in and out is a mess.

I have tried numerous methods, such as overriding OnPaintBackground, changing the style of a form to allow a transparent background and a few other things. The problems I hit are:
- When fading the transparent form, by changing the Opacity the transparent bits turn black
- When the splash screen first shows it paints properly, but when the main form is finally loaded the transparent bits of the splash screen still show what was there before the form loaded (i.e. not repainting or something).

At the moment some of the code I have looks like this:
protected override void OnPaint(PaintEventArgs e)
{
    // Do nothing here!
}

protected override void OnPaintBackground(PaintEventArgs e)
{
    Console.WriteLine("paintBackground");
    Graphics gfx = e.Graphics;
    gfx.DrawImage(global::DesktopLiveDotNet.Properties.Resources.splash_screen, new Rectangle(0, 0, Width, Height));
}


But when it starts to fade the transparency turns black:

private void timer1_Tick(object sender, EventArgs e)
{
    Opacity = fOpacity / 100;

    Application.DoEvents();
    fOpacity -= StepVal;

    if (fOpacity <= 0)
    {
        timer1.Stop();
        Close();
    }
}


Not quite sure how to proceed and any ideas would be great! Smile | :)
AnswerRe: Splash Screen Form Pin
leppie10-Jun-08 23:46
leppie10-Jun-08 23:46 
GeneralRe: Splash Screen Form Pin
see_seA11-Jun-08 0:02
see_seA11-Jun-08 0:02 
Questionproblem with output parameter Pin
Mr.Kode9-Jun-08 23:50
Mr.Kode9-Jun-08 23:50 
AnswerRe: problem with output parameter Pin
Ashfield10-Jun-08 1:25
Ashfield10-Jun-08 1:25 
AnswerRe: problem with output parameter Pin
Eslam Afifi10-Jun-08 2:30
Eslam Afifi10-Jun-08 2:30 

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.