| Dart Home | PowerTCP Sockets for .NET | Custom Development | Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
| Author | Forum: PowerTCP Sockets for .NET (Secure and Standard) Topic: UDP Component Causes Multiple NotifyIcons |
| howiegoo From: Marianna, FL USA Posts: 15 Member Since: 01/09/04 |
posted January 20, 2004 4:25 PM Hi again. This one has me stumped. I have a VB.NET program that has a NotifyIcon component that is supposed to display in the system tray. In the form's load event I am sending some data to another computer using the DART UDP component. The problem is when the form loads it places two NotifyIcons in the system tray and I have no idea why. Since I need to reference the main form from other forms I have to declare a new instance of it in a module (Unless someone knows of a better way.) In Module1.vb I have this code: Module Module1 Public frmNewSysTray As New frmSysTray() End Module In the main form I have this in the load event: Private Sub frmSysTray_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Udp1.Send("Data", strServer, intPort) End Sub This causes two icons to show in the system tray. If I comment out the line in the form load event that sends the data it only show's one icon. If I comment out the line in the module that declares the new instance of the form it only shows one icon. However, I need to send the data AND declare the new instance (so I can reference it elsewhere) but I don't want two icons in my system tray. What about the UDP component would cause what seems to be two instances of my program's main form to load? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted January 20, 2004 4:30 PM We don't have anything to with systrays or NotifyIcons. This sounds like a good question for Microsoft's support department. |
| howiegoo From: Marianna, FL USA Posts: 15 Member Since: 01/09/04 |
posted January 20, 2004 4:32 PM The reason I asked here is because it's the DART UDP component that is causing the problem. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted January 20, 2004 4:54 PM That's not possible. We do not create icons or interact in any way with the systray. It's more likely the .NET environment has some threading issues. You can try sending a very simple demo program to support@dart.com if you want. |
| howiegoo From: Marianna, FL USA Posts: 15 Member Since: 01/09/04 |
posted January 20, 2004 5:22 PM AH! I think I got it! You are correct. It doesn't seem to be the UDP component but rather something bizzare about .NET itself. I was declaring the variables strServer and intPort in that module where I was also declaring the new instance of frmSysTray. When the UDP component was called in the form load event and was passed those variables it was creating a completely new instance of frmSysTray in addition to the one that was already created due to it being my startup form. I moved the form instance declaration to a new module and the problem went away. Thanks for the pointer in the right direction! |
| Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|