Solved

How to refresh WindowList after manually changing Form.Text

Posted on 2007-11-23
11
299 Views
Last Modified: 2011-10-03
Hi guys,
If I change Form.Text (using code) after the initial FormLoad the WindowList doesn't show the new value so my question is how can I (either manually or automatically) refresh the WindowList?

/Michael
0
Comment
Question by:gem56
  • 6
  • 4
11 Comments
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 20341772
If the code is doing some processing, in a tight loop, place a the statement

    Application.DoEvents()

within the loop so that the system can service some of the waiting task in the queue.
0
 

Author Comment

by:gem56
ID: 20341812
Hi FernandoSoto,
I don't have a loop at all in this case. I changed the title and the new text appears OK in the actual Form/Window but not in the WindowsList (that is part of my MenuBar).

/Michael
0
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 20341875
Can you post the code?
0
 

Author Comment

by:gem56
ID: 20341930
Hi FernandoSoto,
I'm not sure what to give you other than Me.ProjectForm.Text = _varName. I don't have anything regarding MenuBar other than to say that MdiWindosListItem property is set to the 'Windows' item that shows the list.

/Michael
0
 
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 20342353
try using refresh
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:gem56
ID: 20342647
If you mean Form reresh than I've already tried that (without success).
Is there another type of refresh that I can do?
0
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 20342749
When you say "WindowList" do you mean that you have a menu item on the menu bar which shows which windows are currently open? If you do you need to update that yourself because updating Form.Text will not automatically update that item on the menu.
0
 

Author Comment

by:gem56
ID: 20342819
Yes, I am talking about the "WindowList" on a menu bar. What do you mean by "update that yourself..."?
When I created the Window I didn't have to do anything in order for it to appear in the list so I'm not sure how would I update it manually. Can you give me an example/idea?
0
 
LVL 62

Accepted Solution

by:
Fernando Soto earned 250 total points
ID: 20343091
In Visual Basic .NET, the Menu object VB6 is replaced by the MainMenu and ContextMenu controls VB .Net 2003 and MenuStrip in VB 2005.

http://msdn2.microsoft.com/en-us/library/62aawczc(VS.71).aspx

Visual Basic 6.0      Visual Basic .NET Equivalent

WindowList            MdiList

But unless you are working on MDI project that is not a help.

What control are you using that has a property/option for WindowList name and namespace?
0
 

Author Comment

by:gem56
ID: 20344771
I am using VB 2005 and MenuStrip.
I know how to scan and change DropDownItems text so my remaining issue (seeing that I may have to update the menu item manually) is how to identify the Form that a DropDownItem refers/links to.

I ask that because potentially I can have more than one Form with the same title/text in which case I need to be absolutely sure that I'm updating the correct menu item.

How can I obtain the Form that a DropDownItem refers/links to?
0
 

Author Comment

by:gem56
ID: 20442661
Hi guys, I've got an update on this issue.
I found that when I change Form title, the change didn't get reflected in the WindowList immediately but only after I select/show an item from the WindowList. That a bit odd but will do for now and I'll follow it up later when I get a bit more time.

Thanks for your suggestions.

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now