Solved

How to refresh WindowList after manually changing Form.Text

Posted on 2007-11-23
11
326 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 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

 

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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 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