Jump to content
Xtreme .Net Talk

Prelsidente

Members
  • Posts

    8
  • Joined

  • Last visited

Prelsidente's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. i didn't tried that, since i'm trying to install a control into VS.NET IDE Toolbox and i don't have access to the control, only to the .dll file. But instead i figured what i was doing wrong, or what it might be an IDE Bug, since i was using an example from MS. Anyway, only had to replace this: Dim DevEnv As DTE = New DTEClass() by this (VS.NET 2002): Dim t As System.Type = System.Type.GetTypeFromProgID("VisualStudio.DTE.7") Dim obj As Object = System.Activator.CreateInstance(t, True) Dim DevEnv As EnvDTE.DTE = CType(obj, EnvDTE.DTE) or by this (VS.NET 2003): Dim t As System.Type = System.Type.GetTypeFromProgID("VisualStudio.DTE.7.1") Dim obj As Object = System.Activator.CreateInstance(t, True) Dim DevEnv As EnvDTE.DTE = CType(obj, EnvDTE.DTE)
  2. Hello, I'm trying to add a control to the toolbox using a windows forms application. All goes well, and no errors found, but it does not appear after the application finishes (even after i restart Visual Studio.NET). Thanks in advance Here is the code: Dim DevEnv As DTE = New DTEClass() 'Get the list of toolbox tabs Dim win As Window = DevEnv.Windows.Item(Constants.vsWindowKindToolbox) Dim tb As ToolBox = DirectCast(win.Object, ToolBox) Dim tbt As ToolBoxTabs = tb.ToolBoxTabs Dim MyToolboxTab As ToolBoxTab Dim tbtTemp As ToolBoxTab For Each tbtTemp In tbt If tbtTemp.Name = "MyControls" Then MyToolboxTab = tbtTemp End If Next tbtTemp 'Adds the "MyControls" tab If MyToolboxTab Is Nothing Then MyToolboxTab = tbt.Add("MyControls") End If 'Make sure the properties window is visible. This gets around a VS.Net bug when installing toolbox icons DevEnv.ExecuteCommand("View.PropertiesWindow", String.Empty) MyToolboxTab.Activate() MyToolboxTab.ToolBoxItems.Item(1).Select() 'Add controls to the "My Controls" tab MyToolboxTab.ToolBoxItems.Add("NewButton", "E:\\Controls\\NewButton\\bin\\NewButton.dll", vsToolBoxItemFormat.vsToolBoxItemFormatDotNETComponent).Name) 'I Checked here for MyToolboxTab.ToolBoxItems.Count, and the item is there. DevEnv.Quit() DevEnv = Nothing
  3. I'm not sure if i understood your question, but what i would do next, would be: Textbox1.Text = dsAuthors.Table(0).Item(0)
  4. Hi again, No need to answer as i already discovered how to do this! If anybody would be interested i would be happy to post a code sample or a tutorial. Thanks
  5. well, for what you want to do, just don't inherit Class Widget from component. But, i must warn you, you will no longer have the functionality of code being generated like you wanted (Widget1, Widget2,...), in fact, they will only be persisted to the resources, not being added to code. After that you will only access them through 'Control.Widgets(Index)' at runtime.
  6. In the sub new (Constructor) of the Control: _Widget = new WidgetCollection Still inherit from component, but add this attribute to the top of the class: <DesignTimeVisible(False)> 'Hides the component from the tray Solved with question #1 Add this attribute to the top of the widget Class: <DefaultProperty("Index")> Also make sure you have a "Index" property. I hope this helps.
  7. Hello, I'm developing a custom control with a collection. I already made the designer for the control with the DesignerVerb, but i can't seem to get how to invoke the CollectionEditor to show my collection. Has anybody tried this? Thanks in advance
  8. If you don't want to have the trouble of owner draw it, you might want to take a loot at this product i just found: Wiseworx .NET XButton
×
×
  • Create New...