Create a blinking popup in windows

Hello all,

I would like to build a pupop tool that will tell an near event on the network.

Lot's of users are working on the remote desktop on the network. But at specific time of the day, all users that are working on remote to that network, need to exit.

I would like to create a blinking popup that will appear on top of the screen, red box, written in yellow, that will tell the user to exit the remote desktop.

How can i do this please?



Thanks
LVL 11
Wilder1626Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

VBClassicGuyCommented:
Is it as simple as putting the flashing message on the PC folks are remoted into? If so, I can supply code for a flashing box, and even have if activate at a specific time of day.
0
Wilder1626Author Commented:
The flashing message could be only on the remoted PC.

What would be great also, is to be able to put 3 different time of the day for that popup.
Thanks a lot for your help.
0
VBClassicGuyCommented:
Then how about an applet on each remoted-in PC that throws up the message, or is there so many PC's to install it on that it would be a pain to do so?
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Wilder1626Author Commented:
well, theres about 10 pc. It's not to many. I think?
0
VBClassicGuyCommented:
No, not too many. This should get you started (Timer1 is to 2000ms, Timer2 is 1000ms:

Dim times() As String
Private Sub Command1_Click()
   Form1.WindowState = 1
End Sub
Private Sub Form_Load()
   ReDim times(1 To 3)
   
   times(1) = "12:00"
   times(2) = "15:00"
   times(3) = "17:00"
   
   Form1.WindowState = 1
   
End Sub

Private Sub Timer1_Timer()
   Dim RightNow As String
   
   RightNow = Format$(Now, "hh:mm")
   
   If Form1.WindowState = 1 Then
      For i = 1 To 3
         If DateDiff("s", RightNow, times(i)) = 0 Then
            Timer2.Enabled = True
            Form1.WindowState = 0
            Exit For
         End If
      Next i
   End If
   
End Sub

Private Sub Timer2_Timer()
   Static count As Integer
   
   Label1.Visible = Not Label1.Visible
   count = count + 1
   
   If count = 60 Then
      count = 0
      Timer2.Enabled = False
      Form1.WindowState = 1
   End If
   
End Sub
 
 

Image1.jpg
0
Wilder1626Author Commented:
Ok, i did exactly the same, but it doesnt popup.

I've tested it with present time, activate the form. Now it should open but it doesnt.

Did i do something wrong?
Dim times() As String
Private Sub cmdCommand1_Click()
Form1.WindowState = 1
End Sub

Private Sub Form_Load()
ReDim times(1 To 3)
 
   times(1) = "12:00"
  times(2) = "15:00"
  times(3) = "17:49"
 
   Form1.WindowState = 1
End Sub

Private Sub Timer1_Timer()
Dim RightNow As String
 
   RightNow = Format$(Now, "hh:mm")
 
   If Form1.WindowState = 1 Then
     For i = 1 To 3
        If DateDiff("s", RightNow, times(i)) = 0 Then
           Timer2.Enabled = True
           Form1.WindowState = 0
           Exit For
        End If
     Next i
  End If
  
End Sub

Private Sub Timer2_Timer()
Static count As Integer
 
   Label1.Visible = Not Label1.Visible
  count = count + 1
 
   If count = 60 Then
     count = 0
     Timer2.Enabled = False
     Form1.WindowState = 1
  End If
  
End Sub

Open in new window

0
VBClassicGuyCommented:
Set it to one minute past present time.
0
VBClassicGuyCommented:
And remember, the first line goes into the Declarations section of the form, so times() becomes global for the form.
0
Wilder1626Author Commented:
I did put the first line goes into the Declarations section of the form.

How do i change to Set it to one minute past present time?
0
nffvrxqgrcfqvvcCommented:
Just a suggestion... If the PC's are in the local network you can create winsock server that listens for a UDP packet if on the same subnet you can use the subnet mask to broadcast a message to all clients at once using the the client. This would allow you to easily update times or broadcast the message at any time if it needs to be adjusted instead of re-installing the application on all PC's.
0
Wilder1626Author Commented:
I"m really not a pro on this. I dont know what is a UDP packet also.

0
nffvrxqgrcfqvvcCommented:
Okay. I'll try to explain it better for you. There would be two parts to the application
1) Client
2) Host/Server
The Client controls how the server should respond when it recieves a message from the client. For example from the client you could issue a message like "downtime" and the server would recieve this message. The server decides what should happen when it get such a message. This could be a command to show the dialog for example.
The server is standard application with the dialog however it waits for  messages from the client. When it recieves the message it can perform any operation you programmed it to do in this example it would recieve "downtime" then you can execute specific code for that message like showing the dialog.
UDP is just a basic protocal like TCP but for the local network. The advantage is that once you write the server part you only need to install on each PC one time. You then only need to update the client rather than re-install each application on the PC. This allows you to customize at which time (if they should change in the future) the messages should be broadcasted on each PC from a cental location such as your desktop PC , laptop etc..
0
Wilder1626Author Commented:
It sound very good.
But how can i do this please?
0
nffvrxqgrcfqvvcCommented:
Yes.. I uploaded the project to ee-stuff. You can download example project here: https://filedb.experts-exchange.com/incoming/ee-stuff/7875-UDPDialog.zip
Here is some example screen shot if it helps.
 

client.jpg
server.jpg
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Wilder1626Author Commented:
Thanks,

I'm trying to open the form for Client and Server, but i have an error.

Variable not defined

 ' Set the protocal and bind port.
  Winsock1.Protocol = sckUDPProtocol

Do you know why?
0
nffvrxqgrcfqvvcCommented:
Oh yes... If it didnt automatically open with the winsock componet then you have to go to Project > Components .. checkmark Microsoft Winsock Control component. Then add it to your form. Do this for both client and server.
0
Wilder1626Author Commented:
Yesssss.

I love this.

But i will have to activate it manually?  Can we tell im to activate it at 3 different time of the day like:
06:00
13:00
21:00

0
nffvrxqgrcfqvvcCommented:
Yes of course... This is what I was trying to say you need only update the client now since the server is basically complete... Now you only need to modify the client so in the example it uses a button but all you need to do is modify it to automatically check the system time and then when it's that time just call the procedure thats in the command button...
You can create a timer then set it to 60000 ... Then in the timer check the system time if it's the specific time you want then call the ShowDialogInformatio() method..
0
Wilder1626Author Commented:
Ok,
I will work on it. If i have another issue, i will open another topic.

I big big thanks,
0
Wilder1626Author Commented:
THanks
0
nffvrxqgrcfqvvcCommented:
Np... There is only a few things to consider because it uses ports you may need to set filter for the server application if you have any firewalls running. Windows Firewall may ask you if you want to allow access to the port. If thats the case configure the any firewalls to allow list for that process. You will also need to ship and register the winsock component along with the server when you install on the 10 PC's. You could also create a setup package for the server. You should also be adding the server to the windows startup so that when any of the 10PC's shutdown the server will run when they boot back up.
0
Wilder1626Author Commented:
perfect.

Thanks again for your help.

Best regards
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.