|
Hi,
I'm new of this site/forum so first of all I wanna say hello to everyone.
Then, I'm trying to develop an addin for visual studio .net but I'm having some problems due to my inexperience in c#.
What does it mean when I write:
EnvDTE.Window thisWindow = x.open(...);
Does it mean that I'm considering the current tab (the tab the user is working on) or does it mean
that it's going to create a new tab under visual studio project ??
I'd like to code something similart to the first solution...
Then I have some problems also to browse the documentation: where is the namespace EnvDTE?? I can't find it ...
thanks
|
|
|
|
|
cbiacca wrote:
I'm trying to develop an addin for visual studio .net
Sudden interest for VS.NET addins, or could it be that...;)
cbiacca wrote:
EnvDTE.Window thisWindow = x.open(...);
The best way to develop an add-in is to use a top-down design. I would recommend to use one of the wizards available when you create a new project (Extensibility projects / VisualStudio .NET add-in), which provides all the underlying code to start with.
Of course, the object model is documented. A chart is available here[^]. And the doc is here[^].
cbiacca wrote:
where is the namespace EnvDTE??
Although the add-in wizard adds the reference to it, you can add it manually to your project by adding a reference to this file : C:\WINNT\Microsoft.NET\Framework\<version>\EnvDTE.dll (C# using EnvDTE; )
Don't forget to add a reference to this assembly as well : <VS.NET install dir>\Common7\IDE\PublicAssemblies\Extensibility.dll (C# using Extensibility; )
|
|
|
|
|
First I wanna thank you to have answered me ... The reason I'm trying to develop an addin was that visual studio .net doesn't allow to highlight the braces. I'm used to develop in java where all RAD have this feature.
Anyway I had already used the wizard to get started to develop ing this addin so I had all the reference I need (I hope so :P).
Because I haven't a clear idea about how it really works, I thought I had to select the tab on what the addin should works, so I used the code:
EnvDTE.Window thisWindow = x.open(...);
Now that you gave me the documentantion's link, I'm gonna try to understand a little bit more.
In the end, regard to the questione "where is the namespace EnvDTE", now I understood not to have been clear. I meant where it is in the documentation. Actually I'd like to know what classes it includes, but I can't find it ... i.e.: I mean, is it under System. ?
I know by the code which was created by the wizard that I have to use EnvDTE so I supposed it is an apart namespace but I can't really find it ...
Maybe, because of my bad english, I can't explain my question very well, if so don't worry I'm gonna work using tips you gave me ...
Thanks
|
|
|
|
|
cbiacca wrote:
In the end, regard to the questione "where is the namespace EnvDTE", now I understood not to have been clear. I meant where it is in the documentation
One of the links I have provided is the root of the EnvDTE namespace.
cbiacca wrote:
Actually I'd like to know what classes it includes, but I can't find it
Add a reference to it in your project workspace, then add "using EnvDTE;" in your code, then you can use intellisense to see all classes...
cbiacca wrote:
I mean, is it under System. ?
Namespaces with names of the form System.xxx are "primary" assemblies. In fact, the .NET run-time is made of a collection those assemblies, plus a few things.
The assemblies related to the VS.NET IDE (EnvDTE and Extensibility for the two main you are likely to deal with) are not part of the .NET run-time. MS could have decided to name them System.EnvDTE.EnvDTE, System.EnvDTE.Extensibility, ... but they chose not to. Other than that, these are assemblies and you can use any assembly explorer to dive into the classes/methods/... (you can use the VS.NET IDE Object Browser window for instance).
|
|
|
|
|
cbiacca wrote:
The reason I'm trying to develop an addin was that visual studio .net doesn't allow to highlight the braces
It's because the CodeProject competition this month is about the best add-in that someone would submit.
|
|
|
|
|
Hi,
uhm I really don't know if this is the right place where to ask for, but I'm gonna try...
After having rebuilt the solution, it told me this error:
path\to\x.vdproj This setup does not contain the .NET Framework which must be installed on the target machine by running dotnetfx.exe before this setup will install. You can find dotnetfx.exe on the Visual Studio .NET 'Windows Components Update' media. Dotnetfx.exe can be redistributed with your setup.
I tried to do as there is written, but (and I could say obviously) It says that the framework is already installed on my machine ... What does exactly that error mean ??
Moreover, I noticed that there are error like these:
- Could not copy temporary files to the output directory.
- The file 'CopyrightAddIn.dll' cannot be copied to the run directory. This file is used by another process
- The file 'CopyrightAddIn.pdb' cannot be copied to the run directory. This file is used by another process
The problem is that It's the first time I use this system and in the tutorial I'm following the problem is not reported.
Thanks,
Francesco Biacca
|
|
|
|
|
Saga continues...
<br />
protected static ImageList toolbarImages;<br />
static Color transparentColor = Color.FromArgb(192, 192, 192);<br />
<br />
toolbarImages = new ImageList();<br />
toolbarImages.ImageSize = new Size(16, 16);<br />
<br />
Assembly Asm = Assembly.GetExecutingAssembly();<br />
Stream BmpStrm = Asm.GetManifestResourceStream("MyNamespace.ToolbarImages.bmp");<br />
Bitmap TempBmp = new Bitmap(BmpStrm);<br />
<br />
TempBmp.MakeTransparent(transparentColor);<br />
<br />
toolbarImages.Images.AddStrip(TempBmp);
I get "System.ArgumentException: Cannot add an image strip shorter than ImageSize property.
Parameter name: value"
But if I changed the ImageSize to actual bitmap size, then it works.
toolbarImages.ImageSize = new Size(160, 15);
But how do I get the individual images from that bitmap??
Don't and drive.
|
|
|
|
|
Kant wrote:
toolbarImages.ImageSize = new Size(16, 16);
Should be: toolbarImages.ImageSize = new Size(16, 15);
Since your image is 15px tall you need to make sure you tell the image list to use 15px
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
James T. Johnson wrote:
Since your image is 15px tall you need to make sure you tell the image list to use 15px
Duah...Damn... *Kant banging his head on the table*
Now I have to use the images stored in toolbarImages.Images and attach them to the toolbar.
Waah....I miss VC++
Thx James
Don't and drive.
|
|
|
|
|
Hi,
I'm trying to find out how to enumerate all top level windows in the .NET framework without using the EnumWindows() WIN32 API function. Do you know of any way such as a collection property? Thanks
(a.k.a. Wal2k) www.wal2k.com
|
|
|
|
|
foreach (Process p in Process.GetProcesses())
Console.WriteLine(p.MainWindowTitle);
Hey leppie! Your "proof" seems brilliant and absurd at the same time. - Vikram Punathambekar 28 Apr '03
|
|
|
|
|
Can i use winAPI functions in C#??
|
|
|
|
|
You can import functionality from a native dll.
For example:
[DllImport("kernel32", SetLastError=true)]
static extern IntPtr CreateFile(
string filename,
uint desiredAccess,
uint shareMode,
uint attributes,
uint creationDisposition,
uint flagsAndAttributes,
uint templateFile
);
You can then call CreateFile as you would a normal C# method.
You will need to know the basic conversion types from C++ to C#.
Or you can use [MarshalAs(UnmanagedType...)] attribute on a field.
"If you just say porn then you get all manner of chaff and low grade stuff." - Paul Watson, Lounge 25 Mar 03 "If a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong?" - Anon
Jonathan 'nonny' Newman
Homepage [www.nonny.com] [^]
|
|
|
|
|
yes, ofcourse you can use.
you can use regular static/nonstatic mfc/nonMfc dll.
+ you can use COM dll
using COM dll is easy as eating popcorn
and using other dll is hard and will need testing using marshalling etc
|
|
|
|
|
Just started C# and the compiler i am using is VS 7.0.When i try to convert a string literal to a integer my compiler is giving me problems.I have three books and i have tried all the examples on the book but they dont work.
<br />
using System;<br />
class Hello<br />
{<br />
public static void Main(string[] args)<br />
{<br />
string s1 = "123";<br />
<br />
int num = s1.ToInt32;<br />
<br />
}<br />
}<br />
Error:C:\Documents and Settings\KARANSANDHU\My Documents\Visual Studio Projects\ConsoleApplication1\Class1.cs(8): 'string' does not contain a definition for 'ToInt32'
|
|
|
|
|
You can try one of following:
int num = Int32.Parse(s1);
int num = Convert.ToInt32(s1);
i'm only pointer to myself
|
|
|
|
|
I'd like a Button to have an image on both XP themed systems and
other systems (XP w/ themes off, Win2K, Win98, etc).
I've noted and seen reported on USENET that setting Button.FlatStyle =
System disables any Image you have set. I've tried placing an ImageBox
on top of a Button with a transparent ImageBox background color, but
this does not work because the transparency is to the form behind, not
the button.
I searched everywhere for a 100% managed control, whether free or
commercial, that does what I want. I've been unable to find such a
control. I've found a ton of C++ code but I am C++ illiterate and
haven't a clue how to turn one of these into an ActiveX control.
Does anyone know of a .NET option or a fairly lightweight ActiveX
options?
Thanks,
-Jeff
JM Tilly
|
|
|
|
|
Hi Valeria. Not really. I'm looking for a button that can hold an image yet still retain the XP style when the user is on XP and has XP theme on. This commercial product:
http://www.variad.com/products/osbutton/ex_xp.asp[^]
comes close but is an ActiveX control. System.Windows.Forms.Button accepts an Image property but when XP theme is applied and you have on.FlatStyle = System the image is ignored.
Regards,
-Jeff
JM Tilly
|
|
|
|
|
Is there someone who can tell me how to start some external kind of software (ie. .EXE) from a program?
For example: I need to build a program which starts notepad and paint automatically, can I use some kind of command like: Application.Start("C:\\windows\\paint.exe")?
Thank you in advance,
Boudewijn Ector
|
|
|
|
|
System.Diagnostics.Process.Start(string filename)
"If you just say porn then you get all manner of chaff and low grade stuff." - Paul Watson, Lounge 25 Mar 03 "If a man is standing in the middle of the forest speaking and there is no woman around to hear him, is he still wrong?" - Anon
Jonathan 'nonny' Newman
Homepage [www.nonny.com] [^]
|
|
|
|
|
Does anyone know wether there is some kind of control wich can be used to display some XML\HTML pages, without starting some external program like IE or netscape.
I need this because I have to decrypt some HTML pages, show them in some kind of form and after that I need to encrypt them again.
Can someone help me with this?
Thank you in advance,
Boudewijn Ector
|
|
|
|
|
The IE Browser Control, contained in shdocvw.dll, is what is usually used.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
thank you, jdunlap
But I don't understand the way this control is working in C# --> if I place it in a form and change its properties it remains blank. How do I fix this.
|
|
|
|
|
|
I didn't know if BoudewijnEctor was wanting one that was editable or not. If he doesn't mind it being editable, FreeTextBox[^] might be good too.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|