winforms

How to compare two struct lists?

I have a small struct and I have to compare the values to find which ones have the same FreeFlow text, and then grab that struct ENumber. public struct Holder { public string FreeFlow; public int ENumber; } and here is how I add them foreach(Class1.TextElement re in Class1._TextElements) { ...

C# - Windows 7 taskbar shows AssemblyTitle instead of Form.Text

I have a Windows Forms application that does not include a title bar, and on Windows 7, the taskbar shows the value from AssemblyTitle, rather than the value from the form's Text property. How can I change this value dynamically? Thanks! ...

.Net Application Settings - Property Binding OnPropertyChanged()

I have a property on a label bound to a Setting in my App Setting file. What I am wondering, Can I hook a OnPropertyChanged() up to this some how? I know there are other ways I may accomplish this but this got my curiosity up so I thought I'd ask. EDIT The reason I am asking is when the bound property of my label - Tag(bool) chan...

Drag and Drop Windows Forms Button

I create a new Windows Forms Application. I drag a button on to the form. I need to drag and drop this button to another location within this form at run time. any code snippets or links are appreciated. I spent half an hour searching before coming here. ...

Refreshing ComboBox Data Binding in C# and .NET 4.0

I have a ComboBox (Windows Forms) that is bound to a List. It is created at design time. When the List contents are changed my code calls a function to refresh the data binding. This works fine for .NET 3.5: BindingData.SuspendBinding(); DataSource = null; DataSource = BindingData; BindingData.ResumeBinding(); I have switched to .NET ...

HTML2RTF. Easy way to convert HTML to RTF. Is there any?

I found this nice article about Writing Your Own RTF Converter. It converts rtf into html But there is nothing about backward conversion. How can I do that without any third-party components and additional libraries? ...

Showing items in listview similar as in MS Access in C#

Is it possible to create ListView in C# (in Details View) just like in MS Access where when you can show in ListView things that are connected with particular item by some ID so you can clearly see those items are binded together. Currently I'm using colors so that when 3 items in same table are connected with same ID they are marked wit...

Running Code From A Particular Context After A Form Closes?

I want to run some code in this context after the form created here closes. Form1 Form1 = new Form1(); Form1.Show(); //<-After this closes, I want to run code from this context, using ShowDialog() is not an option ...

Opening a WinForm with TopMost=true but not having it steal focus?

I have a form that pops up on a user's screen and has TopMost=true, but it steals the focus. How can I get it to not steal focus when it first appears? ...

Show form from another form

Hi. I have 2 forms Form1 and Form2. How can I, inside code (Form1.h) show Form2 (something like Form2::Show()) ...

puremvc on winform ?

I cannot find any mvc framework that can cover both the web and the desktop, mobile (including iphone) except puremvc. It seems great for Winform http://www.pathf.com/blogs/2009/07/winforms-development-made-simple-with-puremvc/ But apart from samples for silverlight, I cannot find a real example for Winform just a 10 line snippet. I c...

setting ToolStripSplitButton.DropDownButtonWidth to 0

I want to use ToolStripSplitButton as a button only (no drop down menu) in my StatusStrip. For this reason i want to not display the little arrow, but i can't do this. Tried do this with setting ToolStripSplitButton.DropDownButtonWidth to 0, and it works successfull in windows 7 but not in windows xp. how to get rid of the little arro...

Question about WinForms development environment in the workplace

I'm from an AS/400 (iSeries) background and have no idea about how a team of programmers work within the .Net environment. Lets say a company purchases a new button control. Now, in that company they'll have 5 or 10 developers working with that new control. Its my understanding that even if the control is in the GAC, it must still be co...

how to call wpf user control from winfrom

I have a winform 'form1' and a wpf usercontrol 'wpfuser1' i set 'wpf user1' as a splash screen with progress bar in form1 i would like to call that splash screen to indicate the form is loading. how can i do that in form1? public Form1() { this.Hide(); UserControl1 wpfuser1 = new UserControl1(); ...

When you set Checked property in a RadioBox, can you suppress the CheckChanged event?

I'm new to C# and Windows Form but if I have a radiobutton and I call radiobutton1.Checked=true, is there a way for it to not fire the CheckedChange event? I want to distinguish between the user clicking on the radiobutton and me setting the radiobutton programmatically. Is this possible? ...

camera application in windows form

Hello; Basically, i want to write a windows form program like any other webcam's control program in c++ for a custom camera. this camera has some API like grab pictures and etc. i have never done a camera application before, so i am a bit confused. for the "preview" function like other webcam softwares, is it like just polling the...

What is the difference between System.Drawing.Point and System.Drawing.PointF

What is the difference between System.Drawing.Point and System.Drawing.PointF. Can you give an example between this two. Thanks in advance. ...

Handling cleaning up on process termination

Hello Am curious.. whether can i handle the cleaning up of an object. If i kill my application from Task Manager. public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { if ...

Problem with date type

hi i receive this date: 9/20/2010 3:32:32 PM i need to convert to datetime. i try: DateTime DateFrom = DateTime.ParseExact("9/20/2010 3:32:32 PM", "dd/M/yyyy", CultureInfo.InvariantCulture); but i get error: String was not recognized as a valid DateTime. in my computer the region is: Hebrew (Israel) dd/MM/yyyy for short date and ...

Do not see MessageBox

Why do I not see the MessageBox with exception details when I run my program by executing exe fine in bin debug folder? I do see the exception when I debug (run) the program from Visual Studio. [STAThread] static void Main() { try { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(...