winforms

Winforms DataGridViewColumn with Image and Text

Hi there, I am asking this question here as I could not find any conclusive results thru Google. HOw would it be possible to include an image and text in the same column in a Winforms datagridview? I have the following code handling the CellPainting event, but it does not work too well if the user adjusts the height of the row. priva...

How to access controls by Name with SilkTest?

We have an automated test suite, using Borland Silk Test 2008 R2 to carry out regression tests of a new in-house product. The test script consistently refers to controls by their index: Form.Control3 ... We've made a "minor" change to the main form of the application, and now the control that used to have index 3 has index 4. The ea...

c# WinForm: Progamatically Save an MHT without dialog using WEBFORM

Is it possible to save a file of any type bypassing the 'save as' dialog? using the WebBrowser Class WebBrowser.ShowSaveAsDialog(); Is the loaded content in a Webbrowser control serializable so it can be saved and retrieved (for redisplay)? ...

Interface issue

i added a property 'WrmVersion' in interface IResourcePolicy but i am not getting those thing in the implementation side means here it should come in the List view data. means SubItems.Add(((IResourcePolicy)Data).WrmVersion is not getting This is the interface public interface IResourcePolicy { DataVersion WrmVersion ...

What should I use instead of ping?

In my Windows Forms application (on startup) I use the ping command to check if both the Internet connection and my SQL Server are alive. Is there any "better" way-command I should use for accomplishing the above task in the .NET framework 2.0? ...

How come the getter on a property on an object fires even though no part of my form is asking for that property?

Normally a databound winform only fires the getters for the properties which match textboxes, grids etc But as I page through a collection (via BindingNavigator NextItem/PreviousItem), I'm finding that if I set a datagrid's DataSource to a property, then remove it, that property getter thereafter continues to fire even though the grid o...

How to enable row value editable in datagridview of win app?

Hi, I set the data source programmatically to datagridview of the windows application. I set the "Enable editing" to true & readonly property is also set to false. so is there any thing I'm missing? Thanks.. ...

How to get DataGridViewRow from CellFormatting event?

I have a DataGridView and handle event CellFormatting. It has a parameter called: DataGridViewCellFormattingEventArgs e With e.RowIndex in it. When i do: DataGridView.Rows[e.RowIndex] I get proper row from collection. But when I click at a header of a column to sort it by other column than default one and user DataGridView.Rows...

Dynamic Windows Forms TextBox

I am creating a TextBox dynamically and adding that in a TabPage which is itself also dynamically created. But the problem is, the TextBox is not showing text formatting correcly. For example: \t and \n are not reflected at all. I have already set property Multiline to True. But again no improvement. What to check for? ...

C# / Windows Forms - Display a PowerPoint slide-show without Office installed?

Hi guys, I know I can display a Powerpoint presentation within my own form (see here), but I'm wondering whether there is a way to get rid of Microsoft Office as a requirement? I guess basically what I'm asking for is a library which will display Powerpoint slide-shows without my users having to install MS Office on every machine. They...

Winform style issue: Windows classics style?

In one application I'm suddenly getting a style that looks like windows classics. It looks good in the Visual Studio designer (left on the image) but when I run the application it looks like windows classics style (right on the image) and I can't find it. I tried to create a new clean window and add one button to it and that also looks...

(MVVM) Model View View Model And Threading

Hello, I'm playing around with the (MVVM) Model View View Model design pattern but I ran into a problem with the pattern. In my scenario I'm using a DataTable as the View Model. This View Model is set as the DataSource of a DataGridView. Normally, when the Presenter adds a new row to the View Model, a new row is added to the DataGridVie...

In what order do .NET Windows forms events fire?

I notice that there are a number of different events I can capture when I'm working with a Windows Form in .NET (or any other control, for that matter) - on opening, there's: Load Activated Shown VisibleChanged And when closing, there's: Leave FormClosed FormClosing Disposed Plus any others I've missed. I know I could put a messa...

How to detect when an application loses focus?

I created a usercontrol in c#, Leave and LostFocus are not fired if I switch to another program. How can I detect if the app loses focus? ...

Keep window in foreground (even if it loses focus)

In my application (C', Windows Forms) I have got a telephone information screen: if there is an incoming phone call a window with additional information to the caller is shown. This window should open in foreground and should stay there even if the user is writing in another window (so the user still sees the information regarding the i...

TreeView: SelectedNode doesnt work for me

Hi, Im using following code: TreeNode i = treeView1.SelectedNode; RefillTree(); //clears the tree and rebuilt it again. treeView1.SelectedNode=i; However, SelectedNode still remains null, however "i" is correctly referencing. I would need to select and expand particular node automatically after tree refresh. Thank you ...

seting datagridviewimagecolumn image layout!!!

How can i set layout style of an image cell or entire image column's image size to stretched ...

Observe event created through an instance of a Winforms UserControl

Hi! In my winforms app, I have a UserControl that contains a DataGridView. I instantiate and load this UserControl when needed into a panel in my Main Form (frmMain). My problem is figuring out how to resond to or listen for events raised in my UC's DataGridView. For example, I want to handle the CellDoubleClick event of the DataGridV...

How to add and show win form of different module at run time menu .

Dear All, I am developing a application that of several modules, Each of module developing seprately.I have to develop a integration module the call the forms of different modules.so i have to decided that to develop dynamic menu from database where module and form name is stroed.How to acchieve this.plz help ...

How do I run a Flash exe file within a Window/Form in a VB.Net Project?

How do I run a Flash exe file within a Window/Form in a VB.Net Project? I do not have the SWF file so will have to use the exe file I have. ...