[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Create a blinking popup in windows

Posted on 2010-03-26
22
Medium Priority
?
281 Views
Last Modified: 2012-06-21
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
0
Comment
Question by:Wilder1626
  • 11
  • 6
  • 5
22 Comments
 
LVL 14

Expert Comment

by:VBClassicGuy
ID: 28713289
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
 
LVL 11

Author Comment

by:Wilder1626
ID: 28714084
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
 
LVL 14

Expert Comment

by:VBClassicGuy
ID: 28714626
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 new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 11

Author Comment

by:Wilder1626
ID: 28715105
well, theres about 10 pc. It's not to many. I think?
0
 
LVL 14

Assisted Solution

by:VBClassicGuy
VBClassicGuy earned 400 total points
ID: 28719095
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
 
LVL 11

Author Comment

by:Wilder1626
ID: 28720254
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
 
LVL 14

Expert Comment

by:VBClassicGuy
ID: 28720594
Set it to one minute past present time.
0
 
LVL 14

Expert Comment

by:VBClassicGuy
ID: 28720630
And remember, the first line goes into the Declarations section of the form, so times() becomes global for the form.
0
 
LVL 11

Author Comment

by:Wilder1626
ID: 28721453
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
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 28735225
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
 
LVL 11

Author Comment

by:Wilder1626
ID: 28770468
I"m really not a pro on this. I dont know what is a UDP packet also.

0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 28775725
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
 
LVL 11

Author Comment

by:Wilder1626
ID: 28799946
It sound very good.
But how can i do this please?
0
 
LVL 29

Accepted Solution

by:
nffvrxqgrcfqvvc earned 1600 total points
ID: 28815869
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
 
LVL 11

Author Comment

by:Wilder1626
ID: 28820752
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
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 28820994
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
 
LVL 11

Author Comment

by:Wilder1626
ID: 28821158
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
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 28822149
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
 
LVL 11

Author Comment

by:Wilder1626
ID: 28822774
Ok,
I will work on it. If i have another issue, i will open another topic.

I big big thanks,
0
 
LVL 11

Author Closing Comment

by:Wilder1626
ID: 31707509
THanks
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 28823172
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
 
LVL 11

Author Comment

by:Wilder1626
ID: 28823911
perfect.

Thanks again for your help.

Best regards
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month11 days, 11 hours left to enroll

640 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question