windows-forms-designer

Visual Studio 2013 designer trying to load wrong version of project DLL

允我心安 提交于 2019-12-04 06:07:06
问题 I have a visual studio project in a solution that references a class library project from the same solution. The project compiles and executes just fine. However, when I try to open one form in the designer I get a message: Could not load file or assembly 'MyLibName, Version=1.0.5477.26907, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. However, the current version of the DLL is: 1.0.5510.41110 Why is the designer trying to look

Unable to process powershell function with content from windows form

我是研究僧i 提交于 2019-12-04 05:48:46
问题 function CalendarShare { Add-MailboxFolderPermission -Identity ${FromUser.Text} -AccessRights Editor -User ${ToUser.Text} } When the program is running, it works until it processes the share calendar button. It states that it cannot bind the argument parameter identity because it is null. I have no idea what can cause this Full code: Add-Type -AssemblyNAme System.Windows.Forms [System.Windows.Forms.Application]::EnableVisualStyles() #Declare Functions function login { $LiveCred = Get

Texbox input, disable for keyboard, keep for barcode scanner

坚强是说给别人听的谎言 提交于 2019-12-04 05:41:47
问题 I have made a Windows Form application with a textbox. I will force users to use the barcode scanner, so the keyboard input should be disabled. The KeyPressed event does not work, because is also disabled input from the barcode scanner. I thought maybe I can set a timer on the TextChanged event, but I do not really know how it works. Have someone a good idea? 回答1: Based on your description, I assume that your barcode scanner is an HID barcode scanner. If so, there is no easy answer here

My Windows Form keeps on shrinking/resizing on build

半腔热情 提交于 2019-12-04 02:54:07
I am working on a Windows Forms project. It contains a tab controller with multiple pages and multiple controls on each. It appears that relatively recently, after some form changes, that each time I build and run the solution the form resizes/shrinks. So if I set the size of the form height to 768, once I click 'Start' to build and run it, I can actually catch a glimpse of it resizing itself during the process and then the form loads 21 pixels shorter than the height value it was at build for. If I then keep building and running my project, the form will decrease by 21 pixels each time,

User control with auto-height property

心已入冬 提交于 2019-12-04 01:56:32
问题 I want to create user control that will display text. I need a way to resize control at run-time so that it will adjust height to show all the text. I've created control that looks like this: As You can see I have icon and text drawn using TextRenderer.DrawText . Unfortunately when I resize my control (only to left or right) my text is sometimes cut, ass shown below: I'm measuring text using TextRenderer.MeasureText based on that I'm counting number of lines and then I'm drawing that text.

How to use built-in editors for a exposed properties in User Controls - Mask Property Editor Issue

血红的双手。 提交于 2019-12-04 01:34:25
问题 I think there is a simple solution for my stupid question but I just can't solve it today. I have a User Control that has a MaskedTextBox Control in itself. I have also exposed a few of its properties for the user to modify. One of these properties is Mask property which I want to expose with the ability of starting an editor with predefined values like in a normal MaskedTextBox control. So I created a public property InputMask and set up everything so that it can work but after showing the

How to avoid error “Constructor on type 'MyType' not found” when inheriting a base class

孤街浪徒 提交于 2019-12-03 22:14:38
I have a Visual Studio 2010 Windows Forms app which includes a Form base class that other classes will inherit. The base class' constructor takes a parameter that the child classes will pass to the base class. Example: public partial class BaseForm : Form { public BaseForm(int number) { InitializeComponent(); } } public partial class ChildForm : BaseForm { public ChildForm(int number) : base(number) { InitializeComponent(); } } The problem that I'm running into is, when I attempt to open the ChildForm in VisualStudio's Design View mode, I receive the following error: Constructor on type

WANT TO host Visual Studio Form Designer in my own application [closed]

自古美人都是妖i 提交于 2019-12-03 20:47:43
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm writing an application that lets the end use design a Form just the way Visual Studio lets you design a windows forms. I looked into visual studio forms designer articles in msdn and also studied open-source SharpDevelop editor. Both the examples host visual studio's windows forms designer to provide form-design service in their respective applications. My question is - Does it imply any

Automatic regenerate designer files

南笙酒味 提交于 2019-12-03 16:27:10
问题 Recently I've been making some improvements to a lot of the controls we use, for example give properties default values and making buttons private instead of protected. By making this kind of adjustments you need to regenerate the designer files of the forms which have this control on it or controls which inherit from the control. In the past this wasn't really a problem because we only had 20-30 forms. At the moment we've got more than 300 forms which would mean opening the same amount of

Play youtube video in windows form [closed]

坚强是说给别人听的谎言 提交于 2019-12-03 14:09:14
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I'm new to dot net and have a task to complete. I don't know how to start. My Question: There should be a youtube video on my windows form. As a user clicks the play button that form should get refreshed and