winforms

Win forms, log all clicks?

Hi All, Is there a way to log all of the clicks in a Win Forms application? I'd like to intercept clicks and record the action and the name of the control that caused it. Is this possible? Thanks in advance. UPDATE: I'm looking for an application wide solution, is there no way to add a listener to the windows event queue (or what ev...

Which substring of the string1 matches with the string2.

There are two strings. String str1="Order Number Order Time Trade Number"; String str2="Order Tm"; Then I want to know that str2 matches with which substring in the str1. string regex = Regex.Escape(str2.Replace(@"\ ", @"\s*"); bool isColumnNameMatched = Regex.IsMatch(str1, regex, RegexOptions.IgnoreCase); I am using regex because...

Is NoSQL an appropriate data solution for Desktop Applications?

I'm looking at building an application that needs to be run on a user's local (usu. Windows) desktop, which will not have Access or any other database application installed and which needs to be able to replicate its data to a web instance (probably via a web service). Given NoSQL databases are document-oriented (and this application is...

.Net Designer assemblies, C++\C# error

I'm working on an designer-heavy application (using Visual C++ 2.0, but a C# solution should still be relevant). My setup is this: I have a UserControl named "Host" I'm attempting a UserControl named "Child" Child contains a property to a class whose type is defined in a different dll entirely, named "mytools.dll" Child works just fi...

how to added a GUI to my class

hi i have a class that runs, it does the following backups a sql, zip, encrypts, ftp to an ftp server. what i want to do is add a GUI. Need to add a 2 buttons start and finish and progress bar for the procedure. my class is called backup.cs. i have tried creating a form but doesn't seam to work. any help would be great full Ta Gerard ...

Can I close a Windows Form from a link in a WebBrowser control?

Okay, I have a WebBrowser control in my VB.NET application that loads a PHP page inside it. On the PHP page I have a 'Log Out' hyperlink. What I'm trying to do is close the VB.NET form when that hyperlink is clicked. Can anyone tell me how to accomplish this - assuming it's even possible? ...

Rendering a random generated maze in WinForms.NET

Hi I'm trying to create a maze-generator, and for this I have implemented the Randomized Prim's Algorithm in C#. However, the result of the generation is invalid. I can't figure out if it's my rendering, or the implementation that's invalid. So for starters, I'd like to have someone take a look at the implementation: maze is a matrix ...

ASP.NET MVC vs Winforms MVC

Why does MVC work so well in ASP.NET but not in (.NET) winforms? There isn't an explicit MVC for winforms offered from Microsoft. However, I see people attempting to use one but they are a bit of a mess compared to ASP.NET MVC. ...

Cannot add rows when the DataGridView control is in virtual mode?

When I try to add a new row to a DataGridView in virtual mode like this: dataGridViewX1.Rows.Add(new string[] { "Parker", "Seattle" }); The following exception occurs: Operation is not valid when the DataGridView control is in virtual mode? ...

controls in runtime

i have a textbox array using that i create 20 text boxes in runtime, i need to get the focus if a particular text box(if i press downarrow in keyboard how to get the key down of a particular text box it can be 3rd text box). ...

WebBrowser created dynamically doesn't work

I'd like to create WebBrowser control programically in my code and then read page content. I think I'm doing the same thing as designer does but control dynamically created doesn't work (DocumentText return empty string) What I'm doing wrong ?? EDIT-2: Code change after @Axarydax suggestion (working) Main block code: WebBrowser brows...

How can we extract substring of the string by position and separator.

How can we divide the substring from the string Like I have string String mainString="///Trade Time///Trade Number///Amount Rs.///"; Now I have other string String subString="Amount" Then I want to extract the substring Amount Rs. with the help of second string named subString not by any other method But it should be extracted ...

Question about WinForms TrackBar control in .Net

Does anyone know the millisecond interval, used by the framework trackbar, between calling the ValueChanged event when moving the grip with a mouse? I've implemented my own trackbar and I'd like the behaviour to be consistent with what the user expects. I've had a look in reflector but it's one of those controls where most of the imple...

How can we copy the column data of one datatable to another,even if there is different column names of different datatable ?

I have two datatables. First is DataTable NameAdressPhones = new DataTable(); with Three columns Name,Adress and PhoneNo.But I want only two columns Name and Adress data so I am copy those columns (with data) to the new datatable DataTable NameAdress = new DataTable(); For that I do foreach (DataRow sourcerow in Nam...

How do I draw a graduated border on a polygon using GDI+ via C#/WinForms?

I have polygons of various shapes and sizes. They have a solid fill and currently a solid border. I would like to give the polygons a gradient on their edge to soften them. So far I've tried using a Pen with a LinearGradientBrush and whilst the effect it produces is very interesting it's most definitely not what I want ;) I've looked ...

C# Windows Form :Strict some fields according to the logged in user

Hi, I am working on Windows Form (C#) visual studio and .net 3.5, my program is a database-based, with multi-user, database store info about devices and contract, what I need is a way to restrict specific fields to (Modify,ReadOnly,Hidden) receptively to the logged-in user privileges, I don't want to use windows users, I want my use...

how to execute console application from windows form?

I want to run a console application (eg app.exe) from a windows form load event. I'v tried System.Diagnostics.Process.Start(), But after it opens app.exe, it closes it immidiately. Is there any way that I can run app.exe and leave it open? ...

How can I get a websites favicon when using the WebBrowser control?

I have a Windows Forms WebBrowser control embedded in my application. Is there any way to get a web pages favicon using either the WebBrowser or HtmlDocument API? Even obtaining it from the local file system would suffice. Downloading the icon as a separate operation would be a last resort... Thanks. ...

C# - Common way to format listview controls on forms?

In a C# Winform application (3.5) there are numerous forms each with different listview controls. While each listview control uses different datasets the basic formatting of each remains the same. Basic formatting takes this form: /* appearance */ this.lstA.View = View.Details; this.lstA.AllowColumnReorder = true; this.lstA.Ch...

Questions about .NET CollectionEditor type

Who can tell me the internal working mechanism of a CollectionEditor in plain English? I have implemented every virtual function and step into each of them. Still got no clue of its intended algorithm. I searched the web and found tons of compaints about the CollectionEditor type, and even bugs. I am kind of thinking of the Collection...