473,800 Members | 2,614 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Window Activiation Causes Controls to Disappear


I have a tiny little application that runs, and when minimized it throws
itself into the systray until the user double clicks on the systray
icon. To accomplish that first part I have this :

Private Sub frmMain_Resize( ByVal sender As Object, ByVal e As _
System.EventArg s) Handles MyBase.Resize
If Me.WindowState = FormWindowState .Minimized Then
Me.Visible = False
Me.ShowInTaskba r = False
End If
End Sub

... I hope that is correct, it does seem to work.

To show the window again on double click of the icon I have :

Private Sub NotifyIcon1_Dou bleClick(ByVal sender As Object, ByVal e
As System.EventArg s) Handles NotifyIcon1.Dou bleClick

Me.Visible = True
Me.ShowInTaskba r = True
Me.Activate()

If Me.WindowState = FormWindowState .Minimized Then
Me.WindowState = FormWindowState .Normal
End If

End Sub

However, the panel and the 2 web browser controls on the panel are
hidden and never show up again..

What am I doing (or not doing!)?

--
- Mitchell
Nov 21 '05 #1
10 1214
Hi

Thanks for using Microsoft MSDN Managed Newsgroup. My name is Peter, and I
will be assisting you on this issue.
First of all, I would like to confirm my understanding of your issue.
From your description, I understand that after minimized the app into
systray and reactive it the component on the form is invisible.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.

I think you may try the code below.
Private Sub Form1_Resize(By Val sender As Object, ByVal e As
System.EventArg s) Handles MyBase.Resize
If Me.WindowState = FormWindowState .Minimized Then
Me.Visible = False
Me.ShowInTaskba r = False
End If
End Sub
Private Sub NotifyIcon1_Dou bleClick(ByVal sender As Object, ByVal e As
System.EventArg s) Handles NotifyIcon1.Dou bleClick
Me.ShowInTaskba r = True
Me.Visible = True
Me.Activate()

If Me.WindowState = FormWindowState .Minimized Then
Me.WindowState = FormWindowState .Normal
End If
End Sub

Also I think the Me.Visible = False is not necessary you may try to comment
out it to see if that met your request.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #2
Peter Huang [MSFT] wrote:
Also I think the Me.Visible = False is not necessary you may try to comment
out it to see if that met your request.

Best regards,

Peter Huang
Microsoft Online Partner Support


Yes, Peter, you understood my question exactly and your suggestion
worked! The Window now appears normally when it is restored. However,
this seems to have caused another problem. When I set ShowInTaskBar to
false, it still shows some kind of "ghost" window on the taskbar. It
does not react when clicked but every time the app is minimized (and an
icon put in the systray) it appears. Is there some other trick to
getting it to not show in the taskbar other than me.ShowInTaskba r = False ?

THANKS!

--
- Mitchell
Nov 21 '05 #3
Hi

Thanks for your quickly reply!

So far the ShowInTaskbar is the managed way to do control if the windows
showed in taskbar.
Also can you provide a simple reproduce sample, compress to a zip file and
add it as an attachment in the newsgroup so that I can do further
troubleshooting and try to find how to workaround the problem.

Thanks!

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #4
Hi

Thank for your reproduce sample.
I can reproduce the problem with your code.
So far as a workaround I think we may try to set the ShowInTaskBar property
to false in the design time and change the code as below.
Dim loginURL As String = "http://www.google.com"

Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
AxWebBrowser1.N avigate2(loginU RL)
End Sub

Private Sub frmMain_Resize( ByVal sender As Object, ByVal e As
System.EventArg s) Handles MyBase.Resize
'If Me.WindowState = FormWindowState .Minimized Then
' Me.Visible = False
' Me.ShowInTaskba r = False
'End If
End Sub

Private Sub NotifyIcon1_Dou bleClick(ByVal sender As Object, ByVal e As
System.EventArg s) Handles NotifyIcon1.Dou bleClick
If Me.WindowState = FormWindowState .Minimized Then
Me.WindowState = FormWindowState .Normal
End If
Me.Activate()
End Sub

If you still have any concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #5
Peter Huang [MSFT] wrote:
Hi

Thank for your reproduce sample.
I can reproduce the problem with your code.
So far as a workaround I think we may try to set the ShowInTaskBar property
to false in the design time and change the code as below.


Thanks Peter, I appreciate you looking at this.. However, I would really
like to keep the software in the taskbar until it is minimized, just to
keep the "standard". That is the simplest example I could find and it
doesn't seem to work. Is no one using .NET to do this? Seems like a
pretty big bug to me!

Thanks again!

--
- Mitchell Vincent
- kBilling - Invoices Made Easy!
- http://www.k-billing.com
Nov 21 '05 #6
Hi

Thanks for your quickly reply!

So far we are researching the issue, and we will update you with new
information ASAP.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #7
Hi

I reviewed the thread and find that there is a similar issue in the
newsgroup below.Now our colleague has replied to you, you may go and take a
look.
Subject: ShowInTaskBar = False just doesn't work?
Newsgroups: microsoft.publi c.dotnet.genera l

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #8
Peter Huang [MSFT] wrote:
Hi

I reviewed the thread and find that there is a similar issue in the
newsgroup below.Now our colleague has replied to you, you may go and take a
look.
Subject: ShowInTaskBar = False just doesn't work?
Newsgroups: microsoft.publi c.dotnet.genera l

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


They've pointed me in the right direction for sure! I'm waiting on some
additional information on that thread. I might have to leave .NET for
this because of the lack of control for ActiveX controls, but we'll see..

Thanks Peter!

--
- Mitchell Vincent
- kBilling - Invoices Made Easy!
- http://www.k-billing.com
Nov 21 '05 #9
Hi

You are welcome! :)

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
4993
by: Justin Koivisto | last post by:
Is there a way to create an alert-like message box that uses a custom image? Basically, I want to replace the default ! image with something else. -- Justin Koivisto - spam@koivi.com PHP POSTERS: Please use comp.lang.php for PHP related questions, alt.php* groups are not recommended.
4
1937
by: Brad Jones | last post by:
<Previously posted in microsoft.public.dotnet.framework.windowsforms> Hi all. Any suggestions here would be appreciated. Thanks for reading. I'm primarly a C++ developer but I've been trying to complete development on a C# application with the following basic requirements: - The app runs in the background is initially hidden from the user, including the Windows Taskbar. - The app needs to receive a registered Windows message - The app...
9
3913
by: Rathtap | last post by:
I want to popup a window from my codebehind. The reason is that during the postback the code needs to do some validations and to build the arguments that are passed in the url. How can I achieve this functionality? The reason I do not want to use Response.Redirect is because when the user comes back to the first page, all the selections that were made(which are the arguments) disappear.
2
1628
by: ari | last post by:
I have a small form that comprises a toolbar, a treeview and a status bar. Everything was working fine until I decided to add a new button to the toolbar - and I decided for appearances sake to add a separator button to distance the new button from the old ones. When I do "show" on the form (which is an mdi-child) I get the following exception: System.OutOfMemoryException occurred in system.windows.forms.dll
3
1197
by: Fred Flintstone | last post by:
I'm a bit confused about something. I have an aspx page populated with dynamic controls; textboxes, labels, radios and so on. On the page is a Yes/No radio combination and 3 textboxes. The textboxes are visible. If you click the No radio, the textboxes should disappear. In my code, I'm setting the textbox's Visible property to false. What happens is, when you click the No radio, the textboxes do disappear. But I'm left with a blank...
5
1413
by: Mitchell Vincent | last post by:
A picture says a thousand words, so here are 2! Design Time: http://www.ksoftware.net/examples/Clip1.jpg Run Time: http://www.ksoftware.net/examples/Clip2.jpg The problems started when I added that MainMenu control. It almost looks as if it is resizing to make room for a status bar at the bottom - but
37
6355
by: Jan Tovgaard | last post by:
Hey everyone:) We have a critical problem, which I can see that other people also has ran into. In Internet Explorer 7 it is no longer possible to do a window.close after opening a window, without getting a alert message that ask if u want to close the window. This did NOT happen in Internet Explorer 6, Mozilla firefox or other browsers.
15
6523
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt accept other controls. The control i drag drop on it becomes the child of my custom control's parent form and not the child of my custom control. Then i added this line "" before my custom control class (i dont know what this line does). Now
10
3509
by: themightypea | last post by:
Hi, I'm attempting to create a continuos form which allow the user to edit various fields for each item. Unfortunately, the data I need is spread over multiple tables so binding the control to the item in the underlying query prevents me from editing it. To get round this I've bound the controls to functions returning the data from an array, similar to the method described in http://www.thescripts.com/forum/thread193301.html. When the user...
0
9691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10255
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10036
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9092
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7582
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5473
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4150
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.