hi.
ge
tx for the site. I am not able to put the item on the table... Besides
that, i would have huge problem if I wanted to get the selected
object. Besides that, i am only changing the template that Microsoft
has "Microsoft Visual Studio 2005 Automation Samples" named
"CodeWinContextMenu"
My goal is to produce a tool for our dev. team in which developer can
select a table and the generate some type of code.
My first try was selecting it from the Server Explorer, but it seems
poorly documented and almost impossible... because after than i want a
connection string or able to get the metadata from the selected object.
Now i move to other option, there is, to popup the OLEDB connection
dialog and then select a connection string. after that, i would connect
via OLEDB and get the tables of database.
The problem is that whenever i do a Open in my connection object it
simple stops executing the Addin, without any exception or error.
Do you have any ideas why this is happening?
tx
Jo=E3o
On 23 jan, 13:53, "Carlos J. Quintero [VB MVP]"
[quoted text, click to view] <carlosqnos...@nospam.com> wrote:
> The QueryStatus should be called.
>
> See:
>
> HOWTO: Adding buttons, commandbars and toolbars to Visual Studio .NET from
> an add-in.
http://www.mztools.com/resources_vsnet_addins.htm >
> If that doesn't help, post the whole code of the OnConnection and
> QueryStatus methods
>
> --
>
> Best regards,
>
> Carlos J. Quintero
>
> MZ-Tools: Productivity add-ins for Visual Studio
> You can code, design and document much faster:
http://www.mztools.com >
> "JF" <cyberpunk...@yahoo.com> escribi=F3 en el mensajenews:1169503144.381=
004.286680@38g2000cwa.googlegroups.com...
>
> >I want to add a new command to the server explorer after creating a new
> > connection and selecting the Table Item.
>
> > I do this:
>
> > try
> > {
> > // Create a Command with name SolnExplContextMenuCS
> > and then add it to the "Item" menubar for the SolutionExplorer
> > command =3D
> > _applicationObject.Commands.AddNamedCommand(_addInInstance,
> > "SolnExplContextMenuCS", "My CS Command", "Executes My command 1",
> > true, 59, ref contextGUIDS,
> > (int)vsCommandStatus.vsCommandStatusSupported +
> > (int)vsCommandStatus.vsCommandStatusEnabled);
>
> > itemCmdBar =3D
> > ((CommandBars)_applicationObject.CommandBars)["Table"];
>
> > if (itemCmdBar =3D=3D null)
> > {
> > System.Windows.Forms.MessageBox.Show("Cannot
> > get the Item menubar", "Error",
> > System.Windows.Forms.MessageBoxButtons.OK,
> > System.Windows.Forms.MessageBoxIcon.Error);
> > }
> > else
> > {
> > command.AddControl(itemCmdBar, 1);
> > }
>
> > But the QueryStatus is never called and the item does not appear on the
> > context menu..
>=20
> > Any ideas?
> > tx