winforms

How to convert c# winforms application to an assembly?

I have a c# winforms application which is running fine... Now i want to convert it to an assembly and use it in an asp.net web application..... WHich dll i have to refernce? http://img265.imageshack.us/img265/2272/dlls.jpg ...

hidden forms and thr handles

i am hiding the form using SetVisibleCore to false, but now i cant get the handle of this form in other application which i am retrieving using EnumWindow its giving me exception "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." an ACCESS VIOLATION EXCEPTION. so i am searching on 2 ...

how to make a textbox non selectable using c#

Im using c#.net windows form application.I have a text box. How can I make the text box unselectable. I don't want to disable the complete textbos ...

C# Winform: Full Screen UserControl

hi. i have an application with main form. the main form has menu and some toolstrip and one usre control set the dock to Fill. how can i provide full screen view so that usre control set to full screen and all menu and tooltrips hide from main form. ...

How to retrieve datas from access Database to Datagridview

I have datas as unitprice with 10 decimal places in access database. I want those decimal places to reduce when it comes to datagridview(round to 2 places). How can i achieve this. Any idea. Thanks in advance ...

How to parse date from string ?

I want to parse the date from the string where date formate can be any of different format. Now to match date we can use DateTime.TryParseExact and we can define format as we needed and date will be matched for any different format. string[] formats = {"MMM dd yyyy"}; DateTime dateValue; string dateString = "Ma...

C# winform: Floating toolstrip like visual studio toolbar

hi. how can i set the toolbar to floating toolbar. this functionality is implemented in Visual studio. when we click on grip area of toolstrip and drag it it becomes floating. how to do this using ToolStrip control of Winform ...

Windows Form - ListView - Removing lines between columns

I need to display a ListView in WinForms which should not have any lines between columns. I tried GridLines=false and also tried setting HeaderStyle to ColumnHeaderStyle.None. But this is not working. I want to remove the 2 vertical lines coming in the middle. ...

Controls resize based on screen resolution

I have panel control. More controls are in panel.I set the dock property for panel as 'fill' .The panel are resized based on screen resolution. but the controls remains same.The controls in the panel are not resized based on screen solution. i have more labels and panels and text-boxs and button in the same page. How to set the dock...

Even if there is more than one space it should be replaced by only four slashes.

I am parsing html page now any of string comes from html page I want to seprate each word with some seprator like if string comes from html page FUTIDX 26FEB2009 NIFTY 0 and I want the string like ////FUTIDX////26FEB2009////NIFTY////0. In short any of string is there I want to insert //// for each word in the string. I have tried st...

No event is firing when placing a custom data bound control in DataRepeater control in Windows forms

Hi, Custom events in a custom data bound control are not firing in DataRepeater control. When I debug it I found that the DataRepeater Control recreates the control using Activator.CreateInstance and Copies the Properties and Events. In my case copying events doesn't copy the custom events that I hooked in. For example public class My...

Docking controls in C#

hi all I have 10 controls inside my form i want to dock them efficiently inside my form. i need a free library for doing this (except Dotnetmagic). can anyone suggest me a good library. Regards, karthikeyan saravanan ...

Application disappears in the background

Hi, in my application there is a print form. When you click the print button, the windows print dialog appears, showing the printed page. When it's finished the print form is closed (this is still ok) but my application is set to the background on the z-order (this is not ok) and another application window is set to the foreground. I c...

WM_NCHITTEST, HTCAPTION and maximized window

I'm creating a custom drawn window by specifying border style NONE and custom processing of WM_NCHITTEST. I've defined some area as 'my window caption' and returning HTCAPTION result for WM_NCHITTEST in this area. When window is in normal state the behavior is expected by me. The window can be moved by dragging 'my window caption' and ca...

.NET Windows Forms - intercepting the Close X event.

This must be a dumb question, but I cannot figure it out. I also cannot use the designer because coders before me managed to throw GUI and logic all in one, so now it is confused. I've got to do it the old school way. I have a Form which can be closed in 3 ways: Close button, File / Close menu, and the X icon. I want them all to do the ...

Changing Windows Vista/7's Transparency Color

Ok, so I've heard that the color Microsoft decided to use for there Transparency is Black. Which would explain why black text is invisible when drawn/placed onto a Glass surface. Wouldn't it just make sense for us to change the transparency color (black) BACK to Magenta? Why didn't they do this again? Is it even possible to change this ...

Glowing Label Controls On A Glass Surface

Is there any way, and any tutorials, articles, samples around that allow each and every new Label Control created at runtime to have a Glow around it, just like on Vista/7? Thank you ...

Parse XML and populate in List Box

I'm a newbie to C#. I want to develop C# List box in Windows Form. I found this link to be helpful. But the input to the List box will be an XML of the following format: <LISTBOX_ST> <item><CHK></CHK><SEL>00001</SEL><VALUE>val01</VALUE></item> <item><CHK></CHK><SEL>00002</SEL><VALUE>val02</VALUE></item> <item><CHK></CHK><SEL>00003</SE...

C#: Update datagrid

I have a C# application with a datagrid in windows form. I need to monitor a directory (am using FileSystemWatcher) and refresh the datagrid with list of files in the directory. I am not sure how I can set up the interface to do so? Calling the monitorDirectory() from the windows-form Load() does not seem to work as Load is called only o...

How do include read-only formatted multi-line text in a windows form?

I have a splash screen with multi-line text with minimal formatting (font size, font color, superscript, unerline). How do I create a dialog with this multi-line text with formatting? ...