Results 1 to 18 of 18

Thread: [RESOLVED] [2008] vb.net html fade-in message box

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2008
    Posts
    159

    Resolved [RESOLVED] [2008] vb.net html fade-in message box

    I'm looking for a solution for this and can't figure it out. What I am looking for is a way to generate a small html message box that will fade in on the lower right hand corner of the users screen with any message that I choose.

    Similar to this:

    http://img517.imageshack.us/my.php?i...messagevs9.jpg

    Does anyone know how to do something like this?

    Chris
    Last edited by cmmorris1; Sep 26th, 2008 at 10:17 PM.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    May 2008
    Posts
    159

    Re: [2008] vb.net html fade-in message box

    Is this something I can accomplish using the NotifyIcon
    in VB 2008?

    Chris

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2008] vb.net html fade-in message box

    I don't quite understand what HTML has to do with this but you can follow the Form Animator link in my signature. It was written in VB.NET 2003 but it will still work in VB 2008.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    May 2008
    Posts
    159

    Re: [2008] vb.net html fade-in message box

    Thanks buddy! What I am trying to accomplish is a notification window that can display full on html ad in the lower right hand corner of the end user screen.

    Chris

  5. #5
    Frenzied Member
    Join Date
    Jan 2008
    Posts
    1,754

    Re: [2008] vb.net html fade-in message box

    So is your thread resolved? If so Mark it as Resolved
    (Basicly what my signature says...)

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    May 2008
    Posts
    159

    Re: [2008] vb.net html fade-in message box

    Well that does give me the message box style I was looking for but doesn't give me any idea on how to make the window similar to a browser so I can use full html in the box.

  7. #7
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: [2008] vb.net html fade-in message box

    create a form.... put a webbrowser control on it.... use Navigate2 to point to the html file.... on the form load event, set the form's opacity to 0 (that makes it transparent) move the form where you want it and size it. Then in a loop, increase the opacity by a factor until it reaches 1. pause, then reverse the process decrementing opacity until it reaches 0.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    May 2008
    Posts
    159

    Re: [2008] vb.net html fade-in message box

    Thanks tg. I will try that.

    Chris

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    May 2008
    Posts
    159

    Re: [2008] vb.net html fade-in message box

    I will mark this resolved now, I think I can work with this!

    Thanks for your help tg!

    Chris

  10. #10
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [RESOLVED] [2008] vb.net html fade-in message box

    My FormAnimator class will work with any form. If you want to display a Web page on a form you just put a WebBrowser control on it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    May 2008
    Posts
    159

    Re: [RESOLVED] [2008] vb.net html fade-in message box

    Thanks guys, I marked it resolved but still have a small problem getting form opacity to get to 100% in loop. I've used a timer to handle it but only gets about 50% and quits.

    Chris

  12. #12
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [RESOLVED] [2008] vb.net html fade-in message box

    Quote Originally Posted by cmmorris1
    Thanks guys, I marked it resolved but still have a small problem getting form opacity to get to 100% in loop. I've used a timer to handle it but only gets about 50% and quits.

    Chris
    1. Like I said, my FormAnimator class will work with no need for a loop.

    2. If you do want to use a loop then, if you want us to be able to work out what you're doing wrong. we'd have to know what you're doing, i.e. see your code.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  13. #13
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: [RESOLVED] [2008] vb.net html fade-in message box

    don't use a timer.... jsut use a simple for loop.... that's what I've done.... and then use 0.02 as the increment

    Here's some code that I use...
    Code:
        Public Sub FadeFormIn()
            For FormOpacity As Decimal = 0D To 1D Step 0.02D
                Me.Opacity = FormOpacity
                Me.Refresh()
                Thread.Sleep(10)
            Next
        End Sub
    
        Public Sub FadeFormOut()
            For FormOpacity As Decimal = 1D To 0D Step -0.02D
                Me.Opacity = FormOpacity
                Me.Refresh()
                Thread.Sleep(5)
            Next
        End Sub
    needs some tweaking, but for the most part it works

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  14. #14

    Thread Starter
    Addicted Member
    Join Date
    May 2008
    Posts
    159

    Re: [RESOLVED] [2008] vb.net html fade-in message box

    Thanks, but I get name 'thread' is not delared. where do I declare thread?

    Chris

  15. #15
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [RESOLVED] [2008] vb.net html fade-in message box

    Quote Originally Posted by cmmorris1
    Thanks, but I get name 'thread' is not delared. where do I declare thread?

    Chris
    You don't. It's the Thread class. You have to either import the System.Threading namespace or else qualify the class name in code, i.e. Threading.Thread.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  16. #16

    Thread Starter
    Addicted Member
    Join Date
    May 2008
    Posts
    159

    Re: [RESOLVED] [2008] vb.net html fade-in message box

    That code constantly fades in and out.

    Chris

  17. #17
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [RESOLVED] [2008] vb.net html fade-in message box

    Quote Originally Posted by cmmorris1
    That code constantly fades in and out.

    Chris
    That code does exactly what it says it does. The FadeFormIn method fades the form in and the FadeFormOut method fades the form out. I've already told you once that, to see what you're doing wrong, we need to see what you're doing. Still we see no code.

    Of course, if you'd just used my FormAnimator class in the first place...
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  18. #18

    Thread Starter
    Addicted Member
    Join Date
    May 2008
    Posts
    159

    Re: [RESOLVED] [2008] vb.net html fade-in message box

    Works Perfectly!

    Cheers and Thank You!

    Chris
    Last edited by cmmorris1; Sep 27th, 2008 at 09:53 PM.

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