winforms

How to include help '?' in title bar of winform

Hello everyone. I am trying to add help '?' button to the title bar (along with minimize, maximize and close buttons) of my winform application (C#.NET 2.0). I have tried using the Help Button property of Form, but it does not work. Any suggestion. Regards ...

get object out of telerik radcontrol for winforms binding

Hello, I hope that someone can help me with an issue related to binding a bindable collection class to one of the Winforms Telerik list controls. If you bind to a plain ole windows list control like this... dim list as new listBox with list .DataSource=myCollectionClass 'this contains a collection of widgets. .ValueMember=...

Can't see MouseWheel even on nested Panel control in C#

I have a Panel on a TabPage on a TabControl that is on a form. I have a Mouse Event function "control_MouseWheel". If I bind that function to the MouseWheel event of just the panel, nothing happens when I scroll the mousewheel. If I bind that function to the MouseWheel event of both the panel and the TabPage or all three of the Panel...

winform: binding problem with DropDownList

Hi, all I have a table in access database file. I would like to show that table in DataGridView, i have a bindingsource which bind to the table. then DataGridView bind to bindingsource. I also have other controls(textboxs, comboboxs) which are bind to 'dataMember' of table through the same bindingsource. Everything work well. But when ...

Smoothly and quickly animate resize of WinForms image

I'm considering whether it's feasible to add a specific animation to a WinForms application. I have a user control that's typically around 500 pixels square. When part of it is clicked, the effect should be that the control resizes down to a "thumbnail" representation around 200 pixels square. The idea is to provide the user some cont...

How do I show a taskbar notification in my C# application?

Hi friend, I want to show a taskbar notification in my application. How can i achieve this in C#? ...

C# Passing values to another form

Hi all, I'm passing a bool from one form to another, I have tried declaring 'Private bool useDBServer;' at the top of my class but this create a new variable. What am I doing wrong? Thanks Form1 below: Form2 frm = new Form2(dataGridView1, _useDBServer, _useOther); Form2 below: public Form2(DataGridView dgv, bool useDBServer, ...

How to append dynamically created Windows Forms controls?

While I can easily accomplish in ASP.NET using AddAt(), I am trying to do the same thing in Windows Forms. I have a panel, and while I can do a pnlMyPanel.Controls.Add(ctl) ... it always inserts it in the 0 position, when I would rather have it appended to the end, or pnlMyPanel.Controls.Count. Am I overlooking a method or am I going t...

Undocking a ToolStrip from a ToolStripPanel

Out of the box, there doesn't appear to be any built-in support for allowing your end-users to undock the ToolStrips in your applications from their parent ToolStripPanels. Clearly it's possible because even your Visual Studio IDE allows you to undock/tear-off/float your tool strips, it's just isn't possible with the default behavior of...

C# Get a control's position on a form

Hi Is there any way to retrieve a control's position in a form, when the control may be inside other controls (like Panels)? The control's Left and Top properties gives me only it's position within it's parent control, but what if my control is inside five nested panels, and I need it's position on the form? Quick example: The button...

DataGridView.GetClipboardContent() equivalent on DataGrid

Hello, Friends. I cant find the equivalent method of DataGridView.GetClipboardContent() on DataGrid VC++.Net Framework 1.1, in case of not exists how can I achive for the same functionality, I mean copy all the rows and headers on the clipboard object and then paste it on a Excel Sheet... //code for send data to excel dataGridView1.Sele...

DIY intellisense on XPath - design approach? (WinForms app)

I read the DIY Intellisense article on code project, which was referenced from the Mimic Intellisense? question here on SO. I wanna do something similar, DIY intellisense, but for XPath not C#. The design approach used there makes sense to me: maintain a tree of terms, and when the "completion character" is pressed, in the case of C...

How to recover the INF file from an installed XP printer driver?

I am trying to build a utility to export an installed printer driver from a Windows machine. All is well and good on Vista and higher, because the InfPath entry in the driver's registry key points at the INF file. However, on previous versions of Windows, this doesn't exist. Sometimes I can find the INF file for a printer by scanning C:...

How many apps should an internal development group be building/maintaining?

I've always been of the opinion an internal development group should really only be building/maintaining three applications. An internal composite/pluggable/extendable application. The company website. (Optional) A mobile version of #1 for field employees. I'm a consultant, and everywhere I go, my clients have dozens of one-off appli...

Panel of controls over content in the form

Does WinForms have support for this? Let's say I want to show a panel containing ListView made of some results. It is shown by clicking on a button in a form corner, and the panel is shown inside the form, above all controls, preferably with shadow in the back to make it more attractive. I want this panel to be always inside the form, a...

MVP Pattern with tabbedMDI

I have seen some basic samples on WinForms regarding the MVP Pattern. If I have 5 controls on my winform than i have ONE presenter that takes logic from those 5 controls to forward of the logic to Model or something to that effect. I have a main shell and on that shell I use Tab Pages in the main content area. All the Tab Pages and cont...

Type text in arbitrary position on Form

Does anybody have an example on how to type letters onto a form, like in a graphics program? When I click in a position on the form, I want to be able to start typing and have my text show up on the form. ...

.net ContextMenuStrip with Sub-Items, MouseLeave behavior

I have a TreeView with ContextMenuStrip's on each node of the tree. This works well. I wanted the ContextMenuStrip to close when the mouse left it. I accomplished by using a sub that is triggered by CMS.MouseLeave and this works well. Now I would like to add sub-items to the items in the menu. I have this working BUT MouseLeave is ...

Printing text with different font sizes on the same page

I'm trying to determine how I would utilize a generic list to print out text with various size fonts. I know I would have to loop through the list to send the object to the Graphics.DrawString(String, Font, Brush, PointF) method. I'm just having trouble as how to set the objects in the list so I can loop through and print them. I...

Putting colors on an image in C#

I've used this piece of code to put an image in a variable. What I wanna do is draw dots on it on various places and then save the result. What I do is I open a dialog to select the file and to check if it worked, I put it in a picturebox. Using winforms offcourse. Using Visual Studio 2008 Professional. EDIT:the openImg variable you se...