Finding what you need in the Microsoft� Visual Studio� 2008 documentation, which has over 200,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 docdetec@microsoft.com.

Dear Doc Detective,

I recently inherited an ASP.NET Web project that uses a lot of JavaScript. I need to get up to speed with JavaScript in order to understand and maintain the code. However, when I search for JavaScript on MSDN, I get back a lot of topics that aren't very helpful. Any suggestions?

  • Learning in Lebanon

Dear Learning,

Most developers use the term “JavaScript” generically to refer to the language that's formally known as ECMAScript. The name “JavaScript” refers to the implementation of this language originally done by Netscape, whereas the Microsoft implementation is known as “JScript.” (The JavaScript name is actually a trademark of Sun Microsystems.) Because of this, most MSDN topics avoid using the term “JavaScript” in the generic sense and use the term “client script” or “client-side script” instead.

If you want to find topics in MSDN about using JavaScript in ASP.NET Web sites, the words you search for make a big difference in what you find. Try searching for “client script asp.net” and the first topic returned is “Client Script in ASP.NET Web Pages,” which is a good place to start.

  • Doc D

Dear Doc Detective,

I wrote some useful applications in Visual Basic (2003 & 2008). The applications work correctly, but display poorly on the target computers. The forms are too large, especially one that I designed to display full screen, but runs off the target computer screen.

This happens on both computers with the same size or smaller screens than the one I used to write the code. I have tried various combinations of the autoscale / autosize options, but nothing works.

How can I get the applications to display correctly?

  • Confounded in Conover

Dear Confounded,

This is an age-old problem with Windows Forms-you design a form on one computer, then deploy to another computer running a different screen resolution, and it doesn't look the same. The easy answer is to design forms for the lowest common denominator-while most newer computers run a resolution of 1280 x 1024 or greater, some older screens use 800 x 600 or even 640 x 480. Since form coordinates are in pixels, just make sure that your forms are no larger than 640 x 480 and you should be okay.

I'm guessing that you probably don't want to re-design your forms, so the other option is to use Automatic Scaling to adjust the form's resolution at run time. This feature was new in version 2.0 of the .NET Framework so your app built in VS 2003 wouldn't have used this. As far as I can tell, the only modification you might need to make is to move all of the controls on your form to a Container control, since Automatic Scaling applies to containers rather than forms. For more info, see “Automatic Scaling in Windows Forms.”

  • Doc Detective

Dear Doc Detective,

What is the trick to debugging WCF services? I wrote a WCF service, made sure debugging is turned on in the web.config file and I even set includeExceptionDetailInFaults to True. I hooked a WinForm test program up to the service, but it will not debug into the service. What am I missing?

  • Bugged in Bugtussle

Dear Bugged,

It kind of depends on where the WCF service is hosted. In your case, I'm assuming that your WinForms project is in the same solution as the Web service. If so, hitting F5 is just going to attach the debugger to the WinForms app (also assuming that it's the startup project).

To debug the WCF service, you'll need to select the Debug, Attach to Process menu item, and select the ASP worker process that is hosting the WCF service. You can see this described in the not-so-aptly named topic, “Limitations on WCF Debugging.”

On the other hand, if your WCF service is self-hosted, it's even easier. (A self-hosted service is a WCF service that does not run inside IIS, the WCF Service Host, or the ASP.NET Development Server.) In this case, you can just set both the WCF and client projects to be Startup projects using the Multiple Startup Projects option. You can read more about this in the topic “How to: Debug a Self-Hosted WCF Service.”

  • Doc D

Dear Doc Detective,

When I create a new Visual Basic Windows Forms application, an ApplicationDesigner.vb file is created for me that lets me set up a number of important options like single instancing, enabling visual styles, etc. However, when I create a C# Windows Forms app, Visual Studio doesn't create such a file. Is this file not needed in C# or is this functionality hidden somewhere else? My main concern here is consistency.

  • Questioning in Quebec City

Dear Questioning,

Yes and yes. C# has no “My” namespace and no “Application Framework” functionality, which is what that file is all about. It's not needed in C#, and it's really not needed in VB either. Microsoft implemented it to make some common tasks (such as single instance applications) easier to implement for the developer.

If you go into the Application tab in the VB Project Designer and uncheck the “enable application framework” checkbox, you will notice that the <a href="http://application.designer.vb">application.designer.vb</a> file goes blank (except for some comments and option statements). The settings that you can modify in that file are all options in the Application tab under the checkbox mentioned above. This is covered (somewhat) in the topic “How to: Change the Startup Object for an Application (Visual Basic).”

  • Doctor D

Doc's Doc Tip of the Day

The Doc frequently sees questions from users of the Visual Studio Express editions complaining about being directed to a “link not found” page when clicking on links in the documentation. This is a known limitation of the Express editions, which ship with a smaller subset of the MSDN Library.

While frustrating, you can remedy this in one of two ways. First, you can choose to download and install the full MSDN Library, which is available for free on the MSDN Download Center. The other is to use the Search feature in Help to find the topics online-just cut and paste the link text into search, and select the MSDN Online tab in the results.

Found a topic in Help that doesn't help? Tell the Visual Studio documentation team about it by clicking on the “Send feedback” link in local Help topics, or the “Click to rate and give feedback” link in online Help.

URLs

http://msdn.microsoft.com/en-us/library/3hc29e2a.aspx

http://msdn.microsoft.com/en-us/library/ms229605.aspx

http://msdn.microsoft.com/en-us/library/bb157687.aspx

http://msdn.microsoft.com/en-us/library/bb157685.aspx

http://msdn.microsoft.com/en-us/library/17k74w0c.aspx

http://msdn.microsoft.com/en-us/library/ms172574.aspx