|
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.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
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.
Thank u.
DNH
|
|
|
|
|
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.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Duh, I should have thought about that. For some reason the standard .config completely slipped my mind. Thanks very much Heath.
Brian
"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
|
|
|
|
|
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 .
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
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
|
|
|
|
|
I highly doubt it - this is a function of the designer, i.e. VS.NET.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
That's what I figured. Thanks.
Kyosa Jamie Nordmeyer - Cho Dan
Portland, Oregon, USA
|
|
|
|
|
|
You need to add the System.Drawing.dll assembly to your project. Right-click on your project, select Add Reference, then double-click the System.Drawing.dll assembly and click OK.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
|
You don't need to draw the shadow yourself. Just add your menu item and the menu component in Office takes care of the rest.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Exactly that's my problem!
I tried to draw the image's shadow like this, but it looks not very great.
ControlPaint.DrawImageDisabled (e.Graphics,img,e.Bounds.X + 4,e.Bounds.Y + 4,Color.Transparent);
Is there any way to draw a shadow looking LIKE in Ofice XP?
|
|
|
|
|
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.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanks for the nice tip! 
|
|
|
|
|
anyone have a c game that uses a matrix and kills off char's
given a condition????
Help ME
|
|
|
|
|
All,
Can anyone direct me to some quality articles on how to create Web Parts for SharePoint with C#?
-Mabuti
|
|
|
|
|
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!
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
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.
|
|
|
|
|
Can a column in a DataTable have ArrayList as a type?
thanks
|
|
|
|
|
DataColumn.DataType supports only the base types in .NET. See the property documentation in the .NET Framework SDK for more information.
Besides, even if it could you would have problems getting/setting that from/in a database if you use a DataAdapter or anything, as well as displaying it in data-bound controls like the DataGrid , which would force you to implement your own DataGridColumnStyle making your DataSet and your data-bound controls tightly coupled.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
how do i load .tiff images into a document and print them.
i want to build the document first with all the images and just send the document to be printed
chad
|
|
|
|