Solved

How to refresh WindowList after manually changing Form.Text

Posted on 2007-11-23
11
334 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…

726 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