Ask the Doc Detective: Menu that Allows Switching Between Child Windows, and More

Ask the Doc Detective: Menu that Allows Switching Between Child Windows, and More

inding what you need in the Microsoft? Visual Studio? .NET documentation, which has over 45,000 topics, can be a daunting task. The Doc Detective is here to help, utilizing his investigative skills to probe the depths of the documentation.

Can’t find what you’re looking for? Just ask?if it’s in there, I’ll find it for you; if it isn’t, I’ll let you know that as well (and tell you where else you might go to find it).

Have a question for the Doc? Send your questions for future columns to me at [email protected].

Dear Doc Detective,

I’m working on a MDI application that could potentially display many (several dozen) child windows. I need to provide a menu that will allow users to switch between child windows, but adding each form as a menu item is a tedious process. I’ve seen this done in a number of MDI applications and I can’t help but think there’s an easier way to do this?can you help?

– Menuless in Minneapolis

Dear Menuless,

You are correct, sir; there is a much easier way to do this for a MDI (Multiple Document Interface) application. What you want is a Window list?and the MenuItem object has an MDIList property that allows you to do this in one step.

At design time, you just add a MenuItem, usually under a top-level Window menu, then set the MDIList property to true. At run time, a list of all open child windows will magically appear; if more than nine child windows are open, a “More Windows” item is added that launches a Select Window dialog box.

For an example of how to create a Window list, look for the topic “Creating a Window List for an MDI Form” in the MSDN library. Before you know it, your application will look and act just like the big boys?and you don’t have to tell your boss how easy it was.

Doc D


Dear Doc Detective,

I need to create a setup for a C# application for installation onto Windows 98 clients. I used a Visual Studio Setup project to create the setup, but when I try to install on a Windows 98 machine, the installation fails with a message saying that the .NET Framework is required.

How can I combine the .NET Framework and my application together in the setup application so that it automatically detects the .NET Framework, and if not found, installs it first and then my application?

– Framed in Fremont

Dear Framed,

I have some bad news and some good news. The bad news is that according to the Visual Studio documentation it can’t be done. The good news is?the documentation is wrong, at least if you are using Visual Studio 2003.

The recently released Visual Studio .NET Framework Bootstrapper Plug-in makes it possible to deploy the .NET Framework as a part of your Setup project. Once installed, the plug-in modifies the behavior of the Setup project’s Bootstrapper property to include the .NET Framework bootstrapper as well as the Windows Installer bootstrapper. The .NET Framework redistributable and the appropriate Language pack are then packaged with your application; a launch condition checks for the correct version of the .NET Framework at install time and if necessary, installs it before installing your application.

To learn more about bootstrapping the .NET Framework, look for the recently updated article “Using Visual Studio .NET 2003 to Redistribute the .NET Framework” in the MSDN online library (you won’t find it in the product documentation). You can download the Visual Studio .NET Framework Bootstrapper Plug-in for free from the Microsoft Download center.

Doctor D


Dear Doc Detective,

I’ve noticed that when I open a Visual Studio command prompt from the Programs menu, it always opens to a directory in my Documents and Settings path. I would prefer for it to navigate to my Visual Studio .NET directory instead?it’s a pain to have to change directories every time.

Also, on a different note, I use both Visual Basic 6 and Visual Basic .NET on a regular basis. Is there a way to run VB 6 from a menu in VB .NET?

– Changeling in Cheboygan

Dear Changeling,

As for your first question, this isn’t actually Visual Studio-specific, it applies to any Windows program. To change the startup path for a program:

  • In the Start menu, right-click on the Visual Studio Command Prompt icon and choose Properties.
  • In the Properties dialog box, select the Shortcut tab.
  • In the “Start in:” field, enter the path to Visual Studio, i.e. “c:program filesvisual studio.net2003”.
  • Click OK.

The next time you run the application, the command prompt will default to the path that you entered.

As for the second question, that’s an easy one too?you can add Visual Basic 6 (or any other program) to the Tools menu via the External Tools dialog box. Look for the topic “Launching Tools from Visual Studio” for step-by-step instructions. Personally, I think I’ll add Solitaire to my Tools menu….

the Doc


Doc’s Doc Tip of the Day
Meet the neighbors! If you find a topic using the Index or Search windows, don’t forget to use the “Sync Contents” button (the double-ended arrow) to see where you are in the table of contents. You can often find lots of useful related topics that way, plus it helps you learn your way around the table of contents.

Found a topic in Help that doesn’t help? Tell the Visual Studio documentation team about it at [email protected].

devx-admin

devx-admin

Share the Post:
Poland Energy Future

Westinghouse Builds Polish Power Plant

Westinghouse Electric Company and Bechtel have come together to establish a formal partnership in order to design and construct Poland’s inaugural nuclear power plant at

EV Labor Market

EV Industry Hurting For Skilled Labor

The United Auto Workers strike has highlighted the anticipated change towards a future dominated by electric vehicles (EVs), a shift which numerous people think will

Soaring EV Quotas

Soaring EV Quotas Spark Battle Against Time

Automakers are still expected to meet stringent electric vehicle (EV) sales quotas, despite the delayed ban on new petrol and diesel cars. Starting January 2023,

Affordable Electric Revolution

Tesla Rivals Make Bold Moves

Tesla, a name synonymous with EVs, has consistently been at the forefront of the automotive industry’s electric revolution. The products that Elon Musk has developed

Poland Energy Future

Westinghouse Builds Polish Power Plant

Westinghouse Electric Company and Bechtel have come together to establish a formal partnership in order to design and construct Poland’s inaugural nuclear power plant at the Lubiatowo-Kopalino site in Pomerania.

EV Labor Market

EV Industry Hurting For Skilled Labor

The United Auto Workers strike has highlighted the anticipated change towards a future dominated by electric vehicles (EVs), a shift which numerous people think will result in job losses. However,

Soaring EV Quotas

Soaring EV Quotas Spark Battle Against Time

Automakers are still expected to meet stringent electric vehicle (EV) sales quotas, despite the delayed ban on new petrol and diesel cars. Starting January 2023, more than one-fifth of automobiles

Affordable Electric Revolution

Tesla Rivals Make Bold Moves

Tesla, a name synonymous with EVs, has consistently been at the forefront of the automotive industry’s electric revolution. The products that Elon Musk has developed are at the forefront because

Sunsets' Technique

Inside the Climate Battle: Make Sunsets’ Technique

On February 12, 2023, Luke Iseman and Andrew Song from the solar geoengineering firm Make Sunsets showcased their technique for injecting sulfur dioxide (SO₂) into the stratosphere as a means

AI Adherence Prediction

AI Algorithm Predicts Treatment Adherence

Swoop, a prominent consumer health data company, has unveiled a cutting-edge algorithm capable of predicting adherence to treatment in people with Multiple Sclerosis (MS) and other health conditions. Utilizing artificial

Personalized UX

Here’s Why You Need to Use JavaScript and Cookies

In today’s increasingly digital world, websites often rely on JavaScript and cookies to provide users with a more seamless and personalized browsing experience. These key components allow websites to display

Geoengineering Methods

Scientists Dimming the Sun: It’s a Good Thing

Scientists at the University of Bern have been exploring geoengineering methods that could potentially slow down the melting of the West Antarctic ice sheet by reducing sunlight exposure. Among these

why startups succeed

The Top Reasons Why Startups Succeed

Everyone hears the stories. Apple was started in a garage. Musk slept in a rented office space while he was creating PayPal with his brother. Facebook was coded by a

Bold Evolution

Intel’s Bold Comeback

Intel, a leading figure in the semiconductor industry, has underperformed in the stock market over the past five years, with shares dropping by 4% as opposed to the 176% return

Semiconductor market

Semiconductor Slump: Rebound on the Horizon

In recent years, the semiconductor sector has faced a slump due to decreasing PC and smartphone sales, especially in 2022 and 2023. Nonetheless, as 2024 approaches, the industry seems to

Elevated Content Deals

Elevate Your Content Creation with Amazing Deals

The latest Tech Deals cater to creators of different levels and budgets, featuring a variety of computer accessories and tools designed specifically for content creation. Enhance your technological setup with

Learn Web Security

An Easy Way to Learn Web Security

The Web Security Academy has recently introduced new educational courses designed to offer a comprehensible and straightforward journey through the intricate realm of web security. These carefully designed learning courses

Military Drones Revolution

Military Drones: New Mobile Command Centers

The Air Force Special Operations Command (AFSOC) is currently working on a pioneering project that aims to transform MQ-9 Reaper drones into mobile command centers to better manage smaller unmanned

Tech Partnership

US and Vietnam: The Next Tech Leaders?

The US and Vietnam have entered into a series of multi-billion-dollar business deals, marking a significant leap forward in their cooperation in vital sectors like artificial intelligence (AI), semiconductors, and

Huge Savings

Score Massive Savings on Portable Gaming

This week in tech bargains, a well-known firm has considerably reduced the price of its portable gaming device, cutting costs by as much as 20 percent, which matches the lowest

Cloudfare Protection

Unbreakable: Cloudflare One Data Protection Suite

Recently, Cloudflare introduced its One Data Protection Suite, an extensive collection of sophisticated security tools designed to protect data in various environments, including web, private, and SaaS applications. The suite

Drone Revolution

Cool Drone Tech Unveiled at London Event

At the DSEI defense event in London, Israeli defense firms exhibited cutting-edge drone technology featuring vertical-takeoff-and-landing (VTOL) abilities while launching two innovative systems that have already been acquired by clients.

2D Semiconductor Revolution

Disrupting Electronics with 2D Semiconductors

The rapid development in electronic devices has created an increasing demand for advanced semiconductors. While silicon has traditionally been the go-to material for such applications, it suffers from certain limitations.

Cisco Growth

Cisco Cuts Jobs To Optimize Growth

Tech giant Cisco Systems Inc. recently unveiled plans to reduce its workforce in two Californian cities, with the goal of optimizing the company’s cost structure. The company has decided to

FAA Authorization

FAA Approves Drone Deliveries

In a significant development for the US drone industry, drone delivery company Zipline has gained Federal Aviation Administration (FAA) authorization, permitting them to operate drones beyond the visual line of

Mortgage Rate Challenges

Prop-Tech Firms Face Mortgage Rate Challenges

The surge in mortgage rates and a subsequent decrease in home buying have presented challenges for prop-tech firms like Divvy Homes, a rent-to-own start-up company. With a previous valuation of

Lighthouse Updates

Microsoft 365 Lighthouse: Powerful Updates

Microsoft has introduced a new update to Microsoft 365 Lighthouse, which includes support for alerts and notifications. This update is designed to give Managed Service Providers (MSPs) increased control and

Website Lock

Mysterious Website Blockage Sparks Concern

Recently, visitors of a well-known resource website encountered a message blocking their access, resulting in disappointment and frustration among its users. While the reason for this limitation remains uncertain, specialists