Program Question

G

Guest

Hello All,

I want to develop a program that will pop up a window to allow the user to
take an action. The window will disappear after a length of no activity. I
would like the application to act in behavior exactly the way that Outlook
2003 displays new incoming messages. I have never attempted to write an
application like this so I don't really have any idea where to begin. Does
anyone know where I could find information that would me achieve this? I
would greatly appreciate any thoughts and help.

Thanks.
 
G

Guest

Rob,
I don't do exactlies but here's some cool code to get ya rollin.
add a button and a timer to a form and put this into the class file.
Press ctrl+f5
Have fun
DWs


Public Class Form1

Private x As Double
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
x = 1
End Sub

Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Timer1.Enabled = False
End Sub

Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
Try
x = x - 0.05
If x < 0 Then
Me.Close()
Exit Sub
End If
Me.Opacity = x
Catch ex As Exception
Me.Close()
Exit Sub
End Try
End Sub
End Class
 
G

Guest

Thanks, that should get me off to a good start.

DWS said:
Rob,
I don't do exactlies but here's some cool code to get ya rollin.
add a button and a timer to a form and put this into the class file.
Press ctrl+f5
Have fun
DWs


Public Class Form1

Private x As Double
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
x = 1
End Sub

Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Timer1.Enabled = False
End Sub

Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Timer1.Tick
Try
x = x - 0.05
If x < 0 Then
Me.Close()
Exit Sub
End If
Me.Opacity = x
Catch ex As Exception
Me.Close()
Exit Sub
End Try
End Sub
End Class
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top