winforms

Third Party Tree-Grid WinForms Control

I am looking for people's experience with any of these third party controls 1) Xceed Grid for .NET 2) DevExpress XtraTreeList 3) Infragistics WinGrid 4) Infralution VirtualTree 5) 9Rays.Net Flygrid I need a very simple Hierarchical representation of my data with the grid format to display additional information about each node. Perfor...

how to get the name of the file ?

Possible Duplicates: How to get a filename from a path? How to extract file name from file path name? hi if i have this path: d:\MyDir\Tmp\MyFile.txt i need to get the name of the file (only the MyFile.txt) how to do it ? thank's in advance ...

How to invoke on the UI thread of a WinForm Component?

I'm coding a WinForm component where I start a Task to do the actual processing and trap the exception on a continuation. From there I want to show the exception message on a UI element. Task myTask = Task.Factory.StartNew (() => SomeMethod(someArgs)); myTask.ContinueWith (antecedant => uiTextBox.Text = antecedant.Exception.Message, ...

Generate a data entry form dynamically from XSD including validation rules

Is there anything around that can read an XSD schema and dynamically create a (Windows C#) data entry form? It would also need to read the type definitions and use them to validate the data entered. The data would then be save as an XML file. I would prefer it was a dynamic form since the XSD could, and probably will change. I'd rather ...

Programmatically selecting items in winforms checkboxlist

Hi, I can't figure out how to programmatically select items in checkboxlist. This method of cource doesn't compile, but I want to show you what a result I want to get. public ColumnsSelector(Dictionary<string, bool> dataPropertyNames) : this() { foreach (var item in dataPropertyNames) { ...

Best way to kill application instance

What is the best way to kill an application instance? I am aware of these three methods: Application.Exit() Environment.Exit(0) Process.GetCurrentProcess().Kill() Can anyone tell me which is better or when using each of the above would be appropriate? ...

WinForms WebBrowser control detect redirections

Is there any way to detect 302 redirects within the web browser control that I don't know of? Maybe some kind of magic with the underlying unmanaged control? ...

WYSIWYG Editor in .NET

Hi, I need a small WYSIWYG control in my application. The internal representation is some kind of xml, but I couldn't find anything in the internet concerning wysiwyg which appart from html or rtf editors. For example when the internal representation is something like "some text <ask pivot="x">name</ask> some text" I want the user...

Check List Box style Radio Button list

Hi, Is it possible to have a Radio button list, like we have a checked List box? Actually I want to load all the options from database to the list but do not want user to allow to check more than one item. Also how to read it (say item 4 of the list) I want to store its value in the variable. Thanks and best regards. Furqan ...

Run delegate method with BeginInvoke

Hi, In my class I have a staic method publis static void DoWork(int param) ... I want to run that method like: Form.BeginInwoke(DoWork, param); Is that possible? I tryed with the MethodInvoker class ... but I don't want to define the method body inline. Is there any generic delegate? Or do you know any other way of calling this ... w...

How do I load a folder of images on a visual c++ windows form application

Hello there! I have a visual c++ windows form application (empty) made on visual studio 2008 I would like to add a button so users can browse a folder. after they select the folder I would like to "scan" that folder and list all the images (JPG, PNG and GIF) in my windows form application. can anyone provide me with the steps require...

how to update cell in datagridview ?

hi i have datagridview that connect to my database (access) if i stay on any cell and change the value, a see that the value is changed but when i make refresh i see that the value is back to the original value. how i can update this cell (without sql query) i bind dataset to datagridview like this: dsView = new DataSet(); ...

Printing content of WebBrowser Control in C#

I want to print data present in Webbrowser Control. My data is loaded from datatable which contains HTML formatted text. When I tried to print it with RichTextBox it was not able to recognize HTML controls and was not able to render. But when I tried to print using webbrowser control, noting gets printed. How to achieve this. webBrowse...

LINQ to XML and DataGridView

Hi I’m trying to use a DataGridView for the first time and with LINQ. Here’s what I’m trying to do: I want to use it (although it doesn’t have to the DataGridView ) to read and display the contents of an XML file (this bit is working code below) but I want to have an add row button on the form or in the DataGridView that takes the conte...

How to drop a file from windows form(listView) to desktop(any explorer window) without temp file

I know this is normaly implemented with a temp file but this wont work here since we are dealing with pretty large files stored in a database. so far my idea is to create a small temp file that has a unique name and do a FileSystemWatcher monitoring the drop to get the path. but this doesnt seem optimal eighter. are there any other ide...

Trying to use the C# SpellCheck class

Hi, I am trying to use the SpellCheck class C# provides (in PresentationFramework.dll). But, I am experiencing problems when trying to bind the spelling to my textbox: SpellCheck.SetIsEnabled(txtWhatever, true); The problem is that my txtWhatever is of type System.Windows.Forms and the parameter this function is looking for is System...

Logging with NLog into an Isolated Storage

Hi, I use the NLog Libary (http://nlog-project.org/) within my C# Win Forms to do the logging. Has anyone some experiance if it's possible to write the Logfile into an "IsolatedStorage" with this NLogger? Thx 4 answers ...

How to find that Form is loaded or the UserControl c#

Hello, I am using a winform application c#. In the application we are using Lots of UserControls and Forms. I have a parent form, where I am using UserControl as a MainDashBoard. But for other business requirements using Forms as well. On the userControl there is a button called LoadProperties, which will load another form displaying so...

Winforms -> Visualize dragged item for Drag & Drop

Hi, I'd like to achieve the following and was looking for a sample/tutorial but couldn't really find anything: I have C# Winforms application, which has multiple Forms within the same process. I'd like to be able to drag & drop items within and between forms and would like to provide some custom painted visualization of the item being ...

DAL Datamapper persisting fat objects

Hi there, I'm in the process of rewriting our application. We are building DataMappers to work in our DAL. My question relates to the situation where I have a complex object from the BLL that get's passed to the DataMapper to be persisted. Let's say this object has a lot's of properties including lists of other objects. i.e... pub...