winforms

Menu Format is different in Windows 7 vs Windows XP for a Winforms app

I have a Winforms app that was originally created in vs 2005 and that was converted to vs 2008. When running this app in Windows 7, the menus don't look like the standard menus in Windows 7 (i.e., the formatting for the menu items is different than the formatting for other applications). This applies to menus displayed on the menu bar ...

Is it possible to add values to tree nodes?

Is it possible to add text, and a value, to a tree node? For example, a node may have the text Desktop, but the value is C:\Documents and Settings\All Users\Desktop. ...

OLE Container for .NET (C#)

I'm working on a project that requires me to load an OLE object and render it in a .NET WinForm app (C#). Unlike VB6 .NET has no built in OLE container, and the recomended approach is to use the WebBrowser control which supports displaying ActiveX content. The issue I have is the provider of the OLE object in question does not have an Ac...

Win Form app controls turn Black and app locks up when minimized too long

I have a Windows Form desktop CRUD application. The users are finding that if it sits too long minimized all the Controls turn to Black Filled Boxes and it becomes unresponsive. This is my first large app and I am having trouble even figuring out WHERE to start on this. Searching the Web for 'Black Filled Boxes' hasn't been real produ...

Hardware accelerated video in DirectShow / WinForms

Currently prototyping a Windows .NET app that needs to play back high definition WMV and H264 video. My test files are full 1080p. The target hardware has weak Atom processors but strong NVidia 9400 graphics. I know the graphics are integrated but my understanding is that they are good for video playback. Testing on Windows 7, if I pla...

C#: How can I append text to a textbox on a form from a class?

I have a form called "Form1.cs", which calls a class which we will refer to as "Class1.cs", as well as another form called "Form2.cs". A subroutine in Class1 needs to update a textbox in Form2 if that form is open. The text needs to appear after it is appended to the current text in the textbox so that is updates in real time. I can't fi...

Visual C# - What sort of form control should I use for this task?

I'm looking for suggestions as to what type of form control, or what combination of form controls I should use for the following task: I have a list of files that all need to be renamed, and the new name must be typed in manually. I essentially need to display the list of files, and provide a text box for renaming. I prefer that all f...

TreeView Control. Checkboxes. And clicking.

I've added checkboxes to my treeview, and am using the AfterSelect event (also tried AfterChecked). My tree view is like this 1 State 1.1 City1 1.2 City2 1.3 City3 2 State 2.1 City1 2.2 City2 2.3 City3 etc. I'm trying to run an event, so when a checkbox is clicked, the tag is added to an array ready for processing later. I also nee...

DataGridView - How does one hook into the event associated with a cell change?

I'm using a DataGridView with C#.NET. When a user is editing a column, I need another column in the same grid to change with every keystroke/change. How/where do I insert my own code for this type of event? ...

Where to persist some data in windows application

We are having a windows aplication(WPF .net 3.5) that client will be installing using ClickOne full trust. At first startup user enters credential which are being used to communicate with server. I need to persist those credential some where in windows app so it would be used by application to function. Where and how could i save it? ...

How to work with Oracle, .Net, Winform, Windows Vista and XP

Hi, I have an application that is a WinForm in C# that work with Oracle as database. I'm developing in Visual Studio 2008 in Vista, with Vista Oracle Client (10.2.0) and ODP.Net (2.102.2.20). The problem is that some users od this application work with Windows XP, so the Client isn't the same and the application says that it's "need" t...

WinForms databind to collection property (such as count)

I want to databind to a collection property, such as Count. in general, when I data bind I specify data member for the object property in the collection, not for the actual properties collection itself exposes. for example, I have a list of custom objects. I show them in datagridview. but I also want to show their total count using a s...

C# Flash - ExternalInterface

We are hosting the ActiveX control in a WinForms application to embed flash. Is there a good way to get the list of visible ExternalInterface functions that are available for any given swf file? We are working with a 3rd party swf file, and do not have access to source. If it's not possible from C# (or code), is there a tool out there...

Connection string security in .net desktop application

Hi, i'm developing a .net winforms desktop application intended to be run at several bank's branches as a backup application whenever the main one (a web application) is unavailable due to connection issues with the bank's central node. The branchs themselves don't count with any enterprise services besides a SQL-Server database. For tha...

How do you make height of context menu items not be fixed (ie scale to size of the particular item) in .Net?

See the two images below. I don't want each item in the menu to be the height of the largest. It should size to fit the contents. I've played around with a number of properties and haven't been able to prevent this behavior. Is it possible? ...

VB.NET - Form Placement

Hello everybody, I am making a program in vb.net (visual basic) that has two forms. I have one as a sort of "main" base which will be behind everything. Then I have another additional form which is suppose to go on top of the "main" form. Well I get this to work when I show both of the forms, but I want the smaller (additional) form to ...

winform application to launch and read from a file with custom extension

I am building a windows forms application using C# that needs to get launched when a user clicks on a file with custom extension(eg. filename.mycustomextension) I plan to put a url in the filename.mycustomextension file. when user clicks on this file, we winform application should launch and also read contents of this file. Is it possibl...

C# : Notifying window upon some event

hi. i wants to display a windows upon some event like (i received data on socket). I wants to display the windows as animated, appearing from system tray and go to top. Like mostly antivirus notifies like this. how can i do this. ...

should one pass errors as exceptions to the UI code in a winforms applicaiton?

Hi, In a winforms application where the UI code calls business methods in my business classes, is it best practice to pass errors back to the UI code as an exception? Also if there are say a couple of main types of exceptions that a particular business method may have, where would it make sense to tailor the text that gets presented ...

Why is MailMessage sent to any adress from Windows Forms application, but not from ASP.NET application, when both are using the same SMTP-server?

Hi, I'm experiencing a to me mysterious error when sending e-mails through a SMTP-server from an ASP.NET web application. I get the famous error "unable to relay for [email protected]". What's mysterious to me is that when I cut and paste the exact same code that sends the e-mail into an usual .NET Windows Forms application, send the e-mail ...