Solved

How to refresh WindowList after manually changing Form.Text

Posted on 2007-11-23
11
340 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
11 Comments
 
LVL 63

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 63

Expert Comment

by:Fernando Soto
ID: 20341875
Can you post the code?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 

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 63

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 63

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

724 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