winforms

Getting started with creating a report with Crystal Reports 2008 for winform in Visual Studio 2008?

Can you please tell me how to integrate the CR 2008 into VS 2008 Team System as currently VS doen't give me the option to create Crystal reports using a template!!! Please guide me... The data on which the reports are to be based are in SQL Server 2000. ...

How can I programmatically trigger "Reset Column Layout" event on a winforms datagrid?

When releasing the latest iteration of our winforms application there is often confusion when users cannot see changes developers have made to a particular datagrid. Perhaps we've added, resized or re-ordered columns on purpose and we'd like users to benefit from the change. Because their local settings cache the grid layouts they must ...

Sound playing program

I need to write an application C# where a list of songs is loaded and the component would play the songs in the order of the list throwing numerous events like song position and others, and basically have an automatic fader between the list's songs based say on some custom seconds... How to I build this? ...

Using BackgroundWorker in an object and updating UI

Edit: Got somewhere, I hope Here is what I've got, but I'm not so sure about how I delegate my bcLoad.ReportProgress(i) to the object created (ie how to make the delegate so it can be passed). I've created the object events which work sort of(I can call my object method and I can see a change triggered when reading in lines). I know w...

How to convert IntPtr of HIMAGELIST to Bitmap/Image

I am trying to use an HIMAGELIST from an unmanaged dll which gives me the result as an IntPtr. Is there a way for me to turn this IntPtr into a Bitmap or an Image so I can use it for Winforms buttons, as in: myButton.Image = intPtrImage ...

Transparent pictureboxes flickers when moved with mouse

I have made a card game built of pictureboxes. The empty places a card can be put in is an empty picture box with a transparent background and a 3d border. And then I have a current card which is also a picturebox which is moved by a MouseMove event. As soon as I drag a card over the transparent PictureBoxes there is a card left all ov...

Problems hosting a WPF control in a windows form

I have a Winform application and want to to use WPF inside this application. I add a WPF user control to my VS project. Then I take a ElementHost control from the toolbox and put it on a form. After that I build the solution. The problem is now, when I want to embed the WPF control with "Edit Host Content" into the ElementHost controlI...

WinForms TreeView with both radios and checkboxes

I have a case where I would like TreeView to be able to show radio buttons on multiple root nodes, and checkboxes on their children. There would only be one level of children beneath any root node. The radios should also behave like a group, ie one root is selected and the others' radios deselect. I've been trying to fake it with imag...

Events in cascading combo boxes

I have created a WinForms user control that is a set of five cascading combo boxes - the user selects something from the top combo which then populates and enables the second combo, and so on. If there is only one option in the newly enabled combo I automatically select it, causing the one below it to become active. Consequently a single...

CRUD in Winforms with linq-to-sql

I have a simple winforms application that I am connecting to my database with linq-to-sql. I have generated the classes directly from the database, and I have a DataAccess class that wraps my datacontext and can give me whatever I need. I have a view that uses an object datasource to populate a DataGridView and a set of related text fi...

Showing the values when form loaded

Hi all i have main form with a treeview control with a set of files displayed under each node. If i had my mouse over that node i will read the values that are present in the text file by using the following code private void treeViewACH_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e) { string strFile = string....

C# - Application Memory Problem

I have written a small WinForm application in C#. The EXE that is made is 74 Kb and all together with the resources and all it sizes 179 Kb. But when I run it, it takes 9.1 MBs in memory according to Task Manager. So my question is: Why is it happening? What can I do to reduce the size of this? If the size could be reduced how much r...

Problem with Deploying localized win form app in .net 3.5 C#

The Problem in Short: Localized text works perfect on my development machine(windows 7) but NOT when the app is deployed to some other machine(Win XP). Details: I am writing a small, single form app. It must display text in Hindi. Below is my form in the Default Language. couldnt post image coz im new Here it is in Hindi: coul...

How to set the background image of a TreeView Control? (VS 2008/.Net 3.5/C#/WinForms)

I have been doing some research and this seems to be not possible unless I start digging into InterOperabilty, i.e PInvoke and what not which is not really my kettle fish. I am re posting this question as I want to know if anyone has managed to do this yet? I use .png for all my images and get a professional to provide my images so I kn...

C# - Winforms Transparency Issue (i going crazy with it)

i will show you an image below but before that... if you have seen yahoo widgets or cartoony/themed windows media player skins.. i am building a titlebar less... background less... application... its looks like this the darker background you see is actually my wallpaper cuz this is a screen shot... to attain this.. the shape of b...

Create a Visual Studio 2010 like splash screen

Hello, I was intending to create a Splash screen like the one sported by Visual Studio 2010 for my desktop application (feel free to use any version of C#/VB/CLR). As per the Visual Studio blogs, the splash screen was not developed using WPF since it would involve the CLR and WPF libraries to load causing a substantial delay in app l...

VC# - Draw / Paint Outside Form...

Can we paint images and draw text... outside a form.. i mean literally outside... i know its stupid question to ask but CAN we... ...

Form is shown before controls finish being painted

Various controls (mostly labels and panels) on my fairly simple c# WinForm form are not painted when the form is shown. They finish being painted about a half second after the form is shown. Is there an easy fix to this? More details: The panel that paint the slowest displays some data read from an SQL database. The data is painted,...

Simple XOR (PHP & C#)

hey all, is it possible to have some sort of very simple reversible encryption in php that can be reversed using C# Winforms? thank you ...

Are "volatile" data bindings in Windows Forms possible?

Let's assume I'm implementing a Winforms UI where all commands adhere to the following pattern: interface ICommand { bool CanExecute { get; } void Execute(); } Buttons or menu items that trigger such a command should have the following set-up: property Enabled is bound to the command's CanExecute event Click is linked to the...