winforms

Textbox dispose not working

I am using C# and Visual Studio 2005. I have created multiple Texboxes at runtime in FlowlayoutPanel. It works fine, but when I am trying to dispose null textboxes and put message like below. void tbb_KeyPress(object sender, KeyPressEventArgs e) { if ((Keys)e.KeyChar == Keys.Enter) { listBox2.Visible...

c# how to deal with events for multi dynamic created buttons

Hello, I have created a WinForm and I added to it dynamic Buttons, how I can deal with it's events public static void Notify() { var line = 3; Form fm = new Form(); fm.Text = "Hello!"; fm.ShowInTaskbar = false; fm.ShowIcon = false; fm.MinimizeBox = false; fm.MaximizeBox = false; fm.FormBorderStyle = Fo...

Owner draw TextBox for use in WinForms

I need a lean & mean TextBox solution. A RichTextBox proves too slow, so I want to go the way of owner drawing, or custom control building. My need is for a textbox that can handle large text content and offers simple highlighting by drawing colored backgrounds around words or single characters. Important is, that the text string itself...

Where can I find Codesmith templates?

I am new to Codesmith. Are there any templates for Windows Forms and WPF? Please Help. ...

How to get the text value out of a radio button list

So I have two group boxes, what I am wanting is to get the selected radio button value from both of them. If it was just a text box you can go: thisValue = textbox1.text But I have no idea how to do it for a radio button ...

Adding up choosen values from radio buttons

Hey guys, well I have figured out how to get the value from a radio button. but what I need to do now is add up all the selected amounts, so for example, chooses 1, then chooses 4. So the total will be 5, but then he chooses 3, so total is now 8. This is the code I have to get the selected value: int valueinfo101 = 0; int ...

How to allow users only interactive with my program?

I'm writing a software for a call-center. It's somewhat like a ATM program: user can only interactive with it, not with underlying Windows. It takes controls when user logs in to Windows, and when user exits, it logs off Windows. How can I do that in .NET? A demo will be much appreciated. Thank you. ...

How to protect data on datagrid?

I have a datagrid contains sensitive data, which is, only allows user to read, nothing more (no modifying, no copying,...). How can I archive that? Datagrid has Readonly property, but I think it does not prevent user from copying data. EDIT: I don't need to prevent user completely from copying data, just not allow them to copy easily ma...

Convert solution to multi language

What's the best practice for converting very large windows solution to multi-language . There are hundreds of windows a lots of labels, combo etc. We are using devxpress components (not layout) . ...

Filling a huge object in winforms

Hi there, I have a large domain object (Data only) that follows a strict .xsd schema for validation. I'm trying to let the user edit/create this huge object using winforms but I'm not sure what's the simplest way to do so. I thought about 2 ideas: The first one is to bind the entire object to the different controls. The second one is to ...

ASP.net and JQuery UI Datepicker

Given: <input id="datepicker" type="text" /> Where the id = datepicker tells the javascript to attach all the datepicker code to the form element, how do I turn this into a server control? For example: <input runat="server" id="datepicker" type="text" /> Doesn't work because ASP.net generates it's own ID's. Edit <asp:TextBox run...

win forms architecture c#

what would be the recommended way for my main window to communicate with his children when my motivation is that when an action is being made on one child another one action is invoked so who should know who ? shold the children get thier father interface and then on thier on_click give make an action from the given interface 2.shou...

How can i append the new string builder that was in other class

Hi all i am having a form namely addbatch and i will have some textboxes and 3 buttons namely save cancel addentry. When i given some sort of values on my form i will check for a condition as if(file.Length<95) { // I will raise an error } When the user clicks on Addentry button i would like to show a new form and if t...

Open Microsoft Outlook from winforms C# (.net 3.5) application in reply mode.

I open outlook from my Winfoms application. I want to open outlook in reply mode. How can I do this. Thanks. ...

adding to its self in c#

adding value together. so: 1 + 0 = 1 3 + 1 = 4 4 + 4 = 8 How do I get this, so that it starts off at 0, and i type in 1 into a txtbox, so it adds 1 to the total, next i type in 3, so it adds 3 to the total, which eqauls 4, now i type 4, and it adds 4 to the total, which means its at 8 now. How do i write the code to keep adding to ...

ASP.net access a master page variable through content page

I have a master page: <%@ Master Language="C#" AutoEventWireup="true" Codefile="AdminMaster.master.cs" Inherits="AlphaPackSite.MasterPages.AdminMaster" %> Then I have a public variable: public partial class AdminMaster : System.Web.UI.MasterPage { protected bool blnShowDialogue = false; In my content page I would like to set th...

How to do validation while databinding?

How can I do validation and stop databinding when validation failed? for example, if a user type 1234 for a firstName texbox which has the following binding: this.textBoxFirstName.DataBindings.Add("Text", personObj, "FirstName"); Thanks! ...

Windows Form not resizable when on LEFT secondary monitor

Hi all, I'm having the weirdest problem here with a Windows App written in c#. Although there is absolutely nothing special about it, the main window works perfectly well on the Primary monitor and on any Secondary monitor when the latter is configured to stand on the right of the Primary monitor. However, when I reconfigure the second...

DataGridView columns still automatically created even with AutoGenerateColumns = False

I have a DataGridView and have the AutoGenerateColumns property set to false, but the when I build my project the columns are Auto Generated. I can see the property set to false in the Designer.vb code for the Form. I've had this problem before and I'm not sure how to fix it. Any advise would be greatly appreciated. Thanks. ...

Is this a control? (C# Winforms)

Is there a <hr></hr> like in winforms? I just saw this line in a property window of an icon, is it a control or what? How can I add it into my form? Please see image: ...