This will open the URL in the default browser (see below for how to use IE specifically). The former is not as easy, but also not difficult.
In your project, add a reference to %WINDIR%\System32\shdocvw.dll. This will create an interop assembly which defines the InternetExplorerClass class. This represents either a new or running instance of IE. You can use either Nagivate or Navigate2 to direct the user to a URL using IE. You can use the LocationURL to get the current URL for the top-level instance of IE.
Does anybody know how to add custom items&values into this dialog? I mean custom attribute classes defined like in AssemblyInfo.cs (e.g.: AssemblyVersion) whose are visible in this dialog.
Thank u for help.
I mean "version" tab on "properties" dialog (after right-click on .dll or .exe file and selecting "properties" from pop-up menu). There is frame labeled "other version information". I want to add item there. And i want to do it throught attributes in c# (or by other way). Do u know now? Thanks for ur response.
btw i don't have english version of windowsXP so i asked my friend how are these things called. I hope he told me the truth
Besides the attributes you already mentioned, there is only the AssemblyFileVersionAttribute (so that you can make the file version different from the assembly version, which is often good when performing upgrades to an existing code base for minor bugs).
Also, these are used by the compiler / assembler to create a VersionInfo block in the .rsrc section of the PE/COFF executable. If you wanted to do this using attributes, you'd have to write your own compiler.
If you want to extract information from custom attributes in your assembly, you could create a property tab by implementing the necessary COM interfaces (like IShellPropSheetExt), load the CLR and your AppDomain using the unmanaged hosting APIs for .NET, then extract information from your assembly-level custom attributes, but I doubt that's what you're after.
Ohh... so you say :"If you wanted to do this using attributes, you'd have to write your own compiler. "
cool idea! maybe in future, who knows...(i am ) but create property tabs sounds quite better. I will try it.
I am planning the design of a small app (read: a few hundred lines, fast execution). The app will run behind the scenes with no user I/O. I am looking into configuration files and I was considering using a local .ini or .xml file. Question: Which should I use? (Subquestion: should I use one?). The settings would probably only include a few crucial settings and due to the nature or the beast, a few of those would need to be encrypted (password fields or so.) Looking at the problem now I'm thinking it may be far simpler to just hard-code the user names and passwords into the file, but I hate doing that. XML would be fast and easy but it's large and unnecessary while .ini files would be the proper size but I don't know about any facilities for encryption at the field level. Any suggestions? Thanks.
"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." - Douglas Adams
Use a .config file - the standard configuration file for .NET applications. Besides including all sorts of runtime configuration, key/value app settings, and what not - it's also an extensible system. See the IConfigurationSectionHandler interface in the System.Configuration namespace in the .NET Framework SDK for more information.
This is best, IMO, because it keeps an application's configuration in a common place and works with the .NET configuration model, which also includes general settings using the machine.config file.
While the documentation I mentioned should mention this, a .config file is either Web.config for ASP.NET or MyApplicationName.exe.config (obviously, replace "MyApplicationName" with the actual exec name) and is in the same directory as the application. This is all default, anyway.
I have a form, and on this form is a Panel control. When the form is inherited, I want the developer to be able to click on the form itself, or on the panel, and have a set of DesignerVerbs appear. What Designers and Base Designers should I use with the Designer attribute?
Thanks in advance for any ideas.
Kyosa Jamie Nordmeyer - Cho Dan
Portland, Oregon, USA
The form should use a derivative ParentControlDesigner. As far as the internal panel goes, you'll need to make it public so that the developer can actually select it, IIRC, otherwise the designer treats it as just part of the form that can't be selected individually. For that, you could either extend the Panel and attribute your derivative class with a ControlDesigner or ParentControlDesigner, or use the methods of the ParentControlDesigner attributed on the Form to add menu items to the ContextMenu.
Thanks Heath! That did the trick. I played with all sorts of designer and root designer patterns, but never thought to change the access level of the Panel. I changed it to 'protected', actually, and that worked great.
So second question. This one's not a huge deal, just an eye sore in my opinion. Can you make the Panel control NOT show up in the property browser? I.E. Even though the Panel is there, the property browser should still show 'Form1', or whatever.
Thanks again! This has been kicking me for some time. D'oh!
Kyosa Jamie Nordmeyer - Cho Dan
Portland, Oregon, USA
You said you were working with Office XP components. If you only want Office XP-looking components, there are several articles here on CodeProject that show many different ways to achieve that. See the Menus and Toolbars Windows Forms Controls[^] section.
Quality? No. We've been looking into SharePoint for quite some time. The best you can do is find typical "Hello, world!"-type examples. MSDN[^] has a few, and you can always google which is how we found as little as we did.
Welcome to the hell that is SharePoint documentation!
I have to agree 100%. I was put on the task of looking into coding some custom sharepoint webparts for our company and after finding virtually no documentation on it we concluded it would be cheaper just to purchase some pre-made web parts.
Last Visit: 31-Dec-99 19:00 Last Update: 2-Mar-24 22:46