Krypton Form not showing up in Visual Studio Professional 2008 - visual-studio

I have just installed the Krypton Toolkit 3.0.6 from component Factory.
I find that in the create new Project Dialog Box , Krypton Form does not show up as an option. I am sure it used to show up ( and I have actually used it in an earlier version of krypton toolkit).But after the new install it does not.

For the sake of completeness and accuracy , I am posting the actual code for inheriting from a krypton form.
public partial class Form1 : ComponentFactory.Krypton.Toolkit.KryptonForm

The "New Krypton Form" used to show up not inside the "new project" dialog, but inside the "new item" dialog. (e.g. right-click on project, Add New Item)
But I don't see it there either. Phil may have removed this from the installer.
In any case, just add a regular Form, then make it derive from KryptonForm rather than Form, and voila, you have yourself a KryptonForm.

Related

Visual Studio model link not working correctly

First, let me explain what I have done:
I have installed the Visual Studio 2010 Feature Pack both on my local computer and on the TFS host.
The process is documented by Microsoft
I have a VS 2010 modeling solution with a component diagram.
I have created a work item of type Model (custom work item type).
I have created an association from a component in the component diagram, to the Model WI (using Link to Work Item)
The component diagram correctly links to the Model WI
The Model WI correctly contains a model link to the component in the component diagram
Problem: When I click the model link in the Model WI 'All links' tab, I get the following error:
Cannot find the linked model element. The corresponding diagram file or modeling project might have been renamed, moved, or deleted. To fix the link, click the Edit Link button in this work item to re-link the element
I tried to do exactly this, by re-selecting the component using the 'Select model element' dialog. The error is not resolved.
I tried to delete the link and re-create it by creating a new model link. The error is not resolved.
The link looks like this:
ModelLink: modelbus://ComponentDesignerAdapter.1.0/SystemComponentOverview/Architecture::ComponentName/$source control location/filename%comonent-guid
This works perfectly for another modeling project. The error only occurs in this specific modeling project, however it affects more than one component (I do not know if it affects all components in this project)
So my question is this. What could possibly cause this error?
Update: We just realized the error only occurs on my computer. When my colleague attempts to follow the link, the diagram opens correctly. I have tried 'Get latest version' from source control and restarting Visual Studio. Nothing has resolved the issue.
Update 2: I tried creating a new workspace, to no avail. At this point I am concidering re-installing Visual Studio, but I'll hold it off a day or so in case someone knows what might be causing this.

ASP.NET MVC Add View Dialog closing

Recently a large project I work on started having a problem with the Add View dialog. When clicking the Add Strongly-typed View checkbox, the spinner comes up the first time for about a second or two, and then the entire dialog just closes and disappears. If I open the dialog and click the button again, it just closes again quickly.
The project is using ASP.NET MVC 2, I have installed VS2010 SP1 and this problem occurs with or without the MVC3 tools update installed. It only happens with this project, and I have replicated the problem on 2 different development machines. If I create a new MVC2 or MVC3 project, this does not happen at all, nor do any other small to medium sized projects I have.
I can of create a regular view and change it to strongly typed by myself, so there is a workaround, but this is still pretty annoying. Any ideas what could be causing this or how to fix it?
Do you use version control? Make sure all the assemblies that your project depends on (i.e. referenced by the project itself or by its referenced assemblies) are in sync. I've just run into this (both "Add View" and "Add Controller" problems) after updating a bunch of projects from SVN and rebuilding some. The issue was fixed after I rebuilt several libraries that my MVC project depends on.
I had the same problem, and I could not open the Add->Controller dialog either as described here: Add Controller after recent tools update fails with dependency error. In my case, I had added models to my domain, but I had forgotten to add contexts for these new models; things like
public DbSet<Region> Regions { get; set; }
I had no error at compile time, and I was not using these models yes in the solution, so there was no error at run time either. I guess the problem can be anywhere though.

How to add a custom icon to Setup Project in Visual Studio?

I am trying to add a custom icon to setup project. So instead of standard installer logo I have my custom logo.
To make it clear, here is the icon, which I want to change:
Right-click the Setup Project in Solution Explorer and select View > User Interface.
This will display all the screens of the installer.
The picture that you want to change is the property BannerBitmap.
You can customize this for any screen of the installer.
Just to add to dhirschl's answer ... you also have the option to change the default BannerBitmap so that all your setups have your own logo automatically and you don't have to worry about fixing it every time you create a new setup.
Clear instructions on how to do this are provided by René van Bemmelen and can be found here on the Microsoft forums.

ListDefinition Error 'ctx' is undefined

I have create a DocumentLibrary list using the SharePoint UI and export it using the SharePoint Solution Generator 2008 (VSeWSS 1.3) to a Visual Studio .NET project.
Then I have made a webpart to show items from the document library using the ListViewByQuery with som input parameters. I have put the ListViewByQuery into a Ajax UpdatePanel. The list item menu rase an error 'ctx' is undefined. ctx is defined in the schema.xml file.
Any ideas?
Work-around;
Had the same problem with a document library - to work-around I dragged the standard control part onto the page and made it non-visible (the doclibrary plugin )
Make sure that in this hidden control's view the "Name (linked to document with edit menu)" field is in the view.
That field will cause the creation of a ctx to support the edit drop-down.

.NET VS2005 WinForms: How do i drop a user control onto a form?

i've written a UserControl descendant that is in an assembly dll.
How do i drop the control on a form?
namespace StackOverflowExample
{
public partial class MonthViewCalendar : UserControl
{
...
}
}
i've added a reference to the assembly under the References node in the Solution Explorer, but no new control has appeared in my Toolbox.
How do i make the control appear in the Toolbox so i can drop it on a form?
Update 1:
i tried building the assembly while the Visual Studio option:
Tools-->Options...-->Windows Forms Designer-->AutoToolboxPopulate = true
The control didn't appear when in the toolbox in a new solution.
Note: i somehow mistakenly wrote "...that is not in an assembly dll...". i don't know how i managed to write that, when it specifically is in an assembly dll. Controls have magically appeared when they're in the same project, but not now that it's a different project/solution.
Update 2: Answer
Right-click the Toolbox
Select Choose Items...
.NET Framework Components tab
Select Browse...
Browse to the assembly dll file that contains the control and select Open
Note: Controls in the assembly will silently be added to the list of .NET Framework Components.
Check each of the controls you wish to appear in the toolbox
Select OK
Normally, when you build your project, your user control will appear in your toolbox at the top. Normally, you will see a new pane with each of your Assemblies and the controls in there.
If that doesn't happen, you can also add your control by right clicking on the toolbox, selecting Choose Items, then under .NET Framework Components browsing for your assembly, adding it, then make sure your control is checked.
What I notice is that User Controls and Components are only automatically added to the Toolbox by vs2005 when your project (containing the controls/components) is located in the same folder as your solution. When this project is in a subfolder vs2005 won't add the controls and components in the Toolbox.
I stumbled upon some problems with this. In the end, just rebuild and re-reference will work. I had preferred to inherit from UserControl. It made my life simpler ;)
If for example you want to create a "rounded border" label, do something like this:
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace YourUIControls
{
[DefaultProperty("TextString")]
[DefaultEvent("TextClick")]
public partial class RoundedLabel : UserControl
{
public RoundedLabel()
{
InitializeComponent();
}
protected override void OnPaint(PaintEventArgs e)
{
//Draw your label here…
}
}
}
Compile and add a reference to the output. You'll be able to drag that to the Toolbox and later to the Designer.
You need to build the project containing the control you've created and make sure your options are set for the Toolbox to rebuild. If you haven't changed it from defaults, it should work; otherwise, go to Tools-->Options... and select the Windows Forms Designer group. Make sure the AutoToolboxPopulate option is set to true.
You don't need the ToolboxItemAttribute for it to work. If the providing assembly is in the same solution as the consuming assembly, it should appear in the toolbox. If the providing assembly is not part of the solution, you can manually add the assembly to the toolbox by selecting **Choose items...* from the toolbox context menu and adding your assembly directly. If you want the toolbox to automatically pick them up, you will need to use the ToolboxItemAttribute.
Add the ToolboxAttribute to your class.

Resources