winforms

C# UserControl Validation

Hi, I have a UserControl with a Tab Control containing three tabs. Within the tabs are multiple controls - Datetimepickers, textboxes, comboboxes. There is also a Save button which when clicked, calls this.ValidateChildren(ValidationConstraints.Enabled) Now, I click save and a geniune validation error occurs. I correct the error and ...

JavaScript code that can enable the text on the webbrowser to blink once.

I have window application and on that there is one webbrowser control and I want to display the text on the webbrowser blinking one time and then it should not blinked more, is it possible ? I have done with one javascript but it blinks the text frequently but I want text blinking only single time or maximum two time.The java script is...

Migrating from Forms to WPF

We're considering migrating a WinForms app to WPF, but are just starting on the WPF learning curve now that 4.0 is out. What I'd like to do is migrate our application commands (cut, copy, paste, etc) to a WPF-like command-binding system, while still running as a WinForms app - but in such a way as to make the migration easy when we go a...

How should I display invalid options?

I've got a WinForms client-server app that displays various offers in a list. Every user (client) has a "rating". An offer consists of various data including a minimum and maximum rating. If a user's rating does not fall in that interval, he should not be able to take the offer. Of course I could just perform some server filtering and s...

Hiding/blocking tabs using windows forms in c#

The thing is that i have a 'log in window' and a 'mainwindow' that is called after pressing the log in button or the "VISITANT" button If pressing the log in button, the whole system will come out, and if i press the VISITANT button, one tab should disappear or be blocked or something. private void visitant(object sender, EventArgs e) ...

How can I access the controls in a Windows Forms Designer window through a VS macro?

I'm just getting started on this, so bear with me. I was looking into writing some macros to provide keyboard shortcuts in the Windows Forms Designer in Visual Studio. In particular I was hoping to create shortcuts for manipulating certain properties of the selected control in the designer. Obviously to do this I need to somehow access t...

Spell check in winforms

In my win forms c# app, I want to be able to add spell check functionality. But, I want to do it my own way, and NOT use any other components. All I need is just an online service where i can send a request or something and it tells me whether or not the word i sent was spelled correctly. Preferred but not required: The ability for that...

How do I prevent my ContextMenu from being constrained to its container (Win Forms c#)

I wrote a custom Control (an auto-complete TextBox (below)) in which a ContextMenuStrip is programmatically added to the form. My problem is that when the control generates a list longer than the height of it's parent container (Panel, GroupBox, etc) the bottom section of ContextMenuStrip is hidden. I have tried calling .BringToFront(...

How to move to a location in a web browser component?

I have a .NET windows form page and a WebBrowser component inside. I load a page inside the web browser using the Navigate method as in: webBrowser1.Navigate("http://www.stackoverflow.com"); The pages length is longer than the browsers height, so the vertical scroll bar appears. Now I want to move the scrollbar down to a specific posi...

Custom form designer loader in Visual Studio hosted Forms Designer?

The ability to host your own Windows Forms designer is well documented now, and is a great technique that we will be shipping with our application. However, we'd like to gain some control over editing a form from Visual Studio itself. We'd like to insert our own DesignerLoader derived class into Visual Studio's form editing mechanisms,...

dsoFramer, Find and replace does not highlight the searched string

I'm using DsoFramer to embed word document into winform, when using the Find and Replace window the searched strings are not highlighted, it seems that it is a paint issue. Is there someone who met the same problem, how can I avoid this. Regards. ...

Dynamic Windows Forms Components (Performance problem)

I have a problem with performance of my code under Windows Forms. Have a form, her layout is depending on constructor data, because he layout must be OnLoad or in Constructor generated. I generation is simple, base FlowLayoutPanel have other FlowLayoutPanels, for each have a Label and TextBox with DataBinding. Problem is this is VERY S...

Addding Custom Controls to Toolbox in visual studio

Hi, I am trying to add a dll that contains some custom 3rd party conrtols and some in house user controls and am getting the following error - "The Assembly "MyASsembly.dll" could not be loaded. Check that any dependencies the file requires are installed" I am using Visual Studio 2003 and the 3rd part controls are C1. Does anyone kn...

What are the requirments for ISupportInitialize code to be serialized in InitializeComponent? .Net

I need to add some code to the EndInit method of a PictureBox control but unfortunately its private and, from what I can gather, I can't shadow it and call base - at least not in VB.Net. What I can do is add a dummy property to my picture box class. The type of the dummy property is simply a class that just implements ISupportInitializ...

Visual Studio - Add a line break in a label via the designer?

I have a label that I want to use to show some text. I want to show a few paragraphs of text. Is there a way via the designer to make a line break in the text? (\n\r just shows \n\r) This is WinForms (actually it is Compact Framework.) ...

winforms - datagridview row height doesn't resize when defaultcellstyle is set to wrapmode

Hi folks, i have a datagrid that displays long text on couple columns. I have set the cells defaultcellstyle to wrap. This works but now the row height doesn't change to compensate for the wrapped text & the text is getting cut-off. What am i missing? TIA ...

Add/Edit Columns in DataBound DataGridView

I've got a datagridview that is databound from a database table. How do I: a) Edit the displayed value for a column using the values from other columns in the row? (For example, display a URL like: <a href="/url?param=columnA">columnB</a> where columnA is the value from column A and columnB is the value from columnB) b) Add an...

c# RichTextBox Tab size

Hello, I'm using System.Windows.Forms.RichTextBox and by default the tab size is 8 spaces. The RichTextBox itself is not that big and 8 spaces leads to a lot of scrolling. Is there any way to make it 4 spaces. If it matters, the control is initially blank and the user starts entering stuff and the tabs have to shorter (4 spaces) a...

How do I upload a large file (~4mb) over https from winforms with a progress bar?

Easy way how to upload a large file from winforms c# to asp.net https (web service or asp.net page), with progress bar? ...

How do I post a single file to an asp.net webform from windows forms?

How do I post a single file to an asp.net webform from c# windows forms? ...