Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to refresh WindowList after manually changing Form.Text

Posted on 2007-11-23
11
Medium Priority
?
354 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 64

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 64

Expert Comment

by:Fernando Soto
ID: 20341875
Can you post the code?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 64

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 64

Accepted Solution

by:
Fernando Soto earned 750 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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

604 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