Results 1 to 7 of 7

Thread: Screen goes black.. Then goes brighter.

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2010
    Posts
    300

    Screen goes black.. Then goes brighter.

    Hey, Good day folks!

    Iv'e been looking for that a lot.. Is there a way that I can make the screen
    go black slowly, then brigther? To make sure you get me, Watch this MapleStory video and turn to 0:10.

    http://www.youtube.com/watch?v=OGSz0Q4fo7A

    You see it goes black.. and then brigther?
    How do I do that?

    Thanks!

  2. #2
    New Member GinGin's Avatar
    Join Date
    Oct 2010
    Posts
    13

    Re: Screen goes black.. Then goes brighter.

    You might wanna provide a bit more detail about what you're trying to do. Do you want your whole screen to go black, or just your form? Does it have images on it, or do you just want to dynamically change the background color fading from white to black to white? Are you using graphics, DirectX, or even GDI+?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2010
    Posts
    300

    Re: Screen goes black.. Then goes brighter.

    Quote Originally Posted by GinGin View Post
    You might wanna provide a bit more detail about what you're trying to do. Do you want your whole screen to go black, or just your form? Does it have images on it, or do you just want to dynamically change the background color fading from white to black to white? Are you using graphics, DirectX, or even GDI+?
    1. Just the form.
    2. Yes, It does. I want to do this like in the video showen on the first post.
    2. No, I'm not using any of theese.

    Thank you.

  4. #4
    New Member GinGin's Avatar
    Join Date
    Oct 2010
    Posts
    13

    Re: Screen goes black.. Then goes brighter.

    You won't be able to efficiently achieve your goal using just System.Windows.Forms, though of course you could do something like create another form, set its background color to black, dynamically locate it at the same place as your current form and increase and decrease it's opacity for the fade effect, but trust me that's not the way to go. You'll have to at least use the System.Drawing.Graphics(GDI+) class.

  5. #5
    PowerPoster kaliman79912's Avatar
    Join Date
    Jan 2009
    Location
    Ciudad Juarez, Chihuahua. Mexico
    Posts
    2,593

    Re: Screen goes black.. Then goes brighter.

    Without calling api's or some complicated rendering of alpha bitmaps or the so, If you could do with the form disapearing instead of going black, you can play with the .opacity property of the form, gradually changing it from 1.0 to 0.0 and then back again. ie:

    for value = 1 to 0 step 0.1
    Me.opacity = value
    next

    of course this would be so fast you would not see the change, put some delay between the lines.

  6. #6
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: Screen goes black.. Then goes brighter.

    Quote Originally Posted by GinGin View Post
    You won't be able to efficiently achieve your goal using just System.Windows.Forms, though of course you could do something like create another form, set its background color to black, dynamically locate it at the same place as your current form and increase and decrease it's opacity for the fade effect, but trust me that's not the way to go. You'll have to at least use the System.Drawing.Graphics(GDI+) class.
    Why do you think using a masking form isn't the way to go? I find that method can work very well -- as long as you make the main form the Owner of the masking form. GDI+ will work for fading a background image, but presents problems if there are controls on the main form. BB

  7. #7
    New Member GinGin's Avatar
    Join Date
    Oct 2010
    Posts
    13

    Re: Screen goes black.. Then goes brighter.

    Quote Originally Posted by boops boops View Post
    Why do you think using a masking form isn't the way to go? I find that method can work very well -- as long as you make the main form the Owner of the masking form. GDI+ will work for fading a background image, but presents problems if there are controls on the main form. BB
    You're absolutely right, for some reason I didn't even think of making the main form the owner.

    @OP
    You should be good to go with the mask form

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width