|
-
Sep 26th, 2008, 09:43 PM
#1
Thread Starter
Addicted Member
[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.
-
Sep 26th, 2008, 10:41 PM
#2
Thread Starter
Addicted Member
Re: [2008] vb.net html fade-in message box
Is this something I can accomplish using the NotifyIcon
in VB 2008?
Chris
-
Sep 27th, 2008, 02:46 AM
#3
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.
-
Sep 27th, 2008, 11:48 AM
#4
Thread Starter
Addicted Member
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
-
Sep 27th, 2008, 12:25 PM
#5
Frenzied Member
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...)
-
Sep 27th, 2008, 05:33 PM
#6
Thread Starter
Addicted Member
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.
-
Sep 27th, 2008, 06:43 PM
#7
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
-
Sep 27th, 2008, 06:46 PM
#8
Thread Starter
Addicted Member
Re: [2008] vb.net html fade-in message box
Thanks tg. I will try that.
Chris
-
Sep 27th, 2008, 07:00 PM
#9
Thread Starter
Addicted Member
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
-
Sep 27th, 2008, 07:23 PM
#10
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.
-
Sep 27th, 2008, 07:28 PM
#11
Thread Starter
Addicted Member
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
-
Sep 27th, 2008, 07:54 PM
#12
Re: [RESOLVED] [2008] vb.net html fade-in message box
 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.
-
Sep 27th, 2008, 08:02 PM
#13
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
-
Sep 27th, 2008, 08:45 PM
#14
Thread Starter
Addicted Member
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
-
Sep 27th, 2008, 08:48 PM
#15
Re: [RESOLVED] [2008] vb.net html fade-in message box
 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.
-
Sep 27th, 2008, 09:13 PM
#16
Thread Starter
Addicted Member
Re: [RESOLVED] [2008] vb.net html fade-in message box
That code constantly fades in and out.
Chris
-
Sep 27th, 2008, 09:25 PM
#17
Re: [RESOLVED] [2008] vb.net html fade-in message box
 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...
-
Sep 27th, 2008, 09:49 PM
#18
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|