winforms

Resize borderless window on bottom right corner

I'd like the user to resize a borderless window on bottom right corner like I can resize the autocomplete window of the combobox control. I cannot find the properties to configure a form that way. Maybe someone could help me on the problem. An image could be found here: http://yfrog.com/5fresizeborderlessformp ...

C# Get control by name

I have a ToolStripMenuItem called "myMenu" How can i access this like so: /* normally i would do: */ this.myMenu... etc /* but how do i access it like this: */ String name = myMenu; this.name... This is because i am dynamically generating ToolStripMenuItems from an xml file and need to reference menuitems by their dynamically genera...

What is the use of Tag property in Tree view control C#?

What is the use of Tag property in Tree view control C#? How can we work with it? ...

Default context menu for RichTextEdit?

There doesn't seem to be a default context menu (with copy, paste, etc.) for the RichTextEdit control in WinForms? I try right-clicking inside the RichTextEdit and nothing happens? ...

problem with ToolStripSeparator

I have a toolstrip. For this toolstrip, I am adding ToolStripSplitButton and for this ToolStripSplitButton, I am adding toolstrip items, including ToolStripSeparator. In the click event of the toolstrip items I am retrieving items from the ToolStripSplitButton dropdown using below code. ToolStripDropDown tditems = ((System.Windows.Form...

winforms - contextMenuStrip - close on clicking away.

Hi All, I have a DGV with a ContextMenuStrip. The ContextMenuStrip's default behaviour is to auto-close - i.e. to close immediately on the user interacting with it. I've turned this off to allow multiple user interactions (which is what I want), however beyond that what I really need is for the context menu to subsequently close on the...

How programmatically submit a form without a submit button in WebBrowser

I navigated to a website with a form that has no submit button but does have form. I would like to submit this form. How to do this using C# and WebBrowser control? ...

Autocomplete email address and/or names in C#

Hi, I'm looking for a solution like the one discussed here, but for C# WinForms. Link here To rephrase, is it possible to do textbox autocompletes in C# using a single data source with multiple lines? Result should be like Gmail's TO: field in creating emails, or similarly MS Outlook's TO: field. For example, the data set might be: "J...

Listview with more than one Checkbox per row?

Hi I been looking for a way to add two checkboxes per row, I'm really frustrated and need some help, do any one knows how to solve this? because I just can have a checkbox per row. I don't get why Microsoft didn't take care of this since I can think in other cases where I would need radio buttons or even combo boxes... ...

SSRS Parameter Problem

I have a Winforms application that uses the ReportViewer control to display SSRS reports. I have one report with many paramters that must be set by the user. I specifically set one of the parameters to have no default value so that the parameter prompts would display in the report viewer prior to running the report. However, when th...

How to programmatically click on text input in WebBrowser using C#

I have opened a website using WebBrowser. Now I would like to programmatically click input text (textbox) field. I can not use focus because this website uses JS to unlock this field only if it's clicked and I've tried also this: Object obj = ele.DomElement; System.Reflection.MethodInfo mi = obj.GetType().GetMethod("click"); mi.Invoke(o...

Data bind enum properties to grid and display description

This is a similar question to How to bind a custom Enum description to a DataGrid, but in my case I have multiple properties. public enum ExpectationResult { [Description("-")] NoExpectation, [Description("Passed")] Pass, [Description("FAILED")] Fail } public class TestResult { public string TestDescriptio...

How can I tell if a file on an FTP is identical to a local file with out actually downloading the file?

I'm writing a simple program that is used to synchronize files to an FTP. I want to be able to check if the local version of a file is different from the remote version, so I can tell if the file(s) need to be transfered. I could check the file size, but that's not 100% reliable because obviously it's possible for two files to be the sam...

Best way to save the state of controls of Winform forms?

If your app has 1 form, that has n group boxes each of which contain any number of controls. How would you save the settings of all these controls? A few things I am concerned are: I don't need properties like BackColor to be saved, because they aren't changed by the user. I need a way so that when I add new properties or remove some ...

How would you use the MVC pattern with Winforms when it comes to using ListViews?

My old way of handling WinForms application was throwing all the logic into the form itself. I'm trying to start utilizing MVC/MVP practices with my WinForms applications. Can someone show me an example of how I would use MVC/MVP in conjunction with say, a ListView? I use to use the Tag property of the ListView itself to store the obj...

Problem : InvokeRequired is always False when trying to show the form in c# windows application

I am trying to implement single instance of the form. Because my application is all about hiding and showing different form dynamically according to some runtime values. when i want to show the Trainee_Login form from a class file, i do this... Trainee_login ShowTraineelogin = Trainee.login.TraineeloginRef; ShowTraineelogin.ShowScreen...

Using SQLite with C# winforms application - a few basic questions??

Hi, Would be great to get some direction re trying to use sqlite for my WinForms application I'm building in VS2008. Installation - Is it just drop the "System.Data.SQLite.DLL" file into some folder in my VS2008 project (e.g. create a folder for it), and then create a "reference" to it? I've made the property of the reference CopyG...

How do I make my form transparent, but what I draw on it not?

I tried setting the opacity of my form to 50%, and then drawing a string on it. It seems that the string I draw on it also has an opacity of 50%. How would I draw a non transparent string , but let the form background show through 50%? Would also be willing to do this in WPF if it is possible, but I would need explicit instructions or a...

Class not registered Exception - Microsoft Office 2003 OCR with MODI-C# Windows Application

I am trying to load TIFF Images in my C# Windows Application. for this to work I have added reference of MDIVWCTL- MODI. I also have MicroSoft Office 2003 Installed on my machine. What could be the possible cause for this exception. ...

Intermittent Oledb connection error "Cannot open database ''."

We are occasionally seeing this error: Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt. This is a Winforms .NET 2.0 product on a Jet/Access DB using Oledb connections. This error occurs only intermittently. Make the same request a couple of minutes before/after ...