winforms

Loading image data from xml file.

Hi All. I have the following code that loads data from an xml file. I've done this quite a while back but don't have that code anymore, and this isn't working. (I can successfully write image data to file. But loading it and converting to image object isn't working): p.Image = Base64ToImage(controlTag.Attributes("Content").First().Value...

Get calling thread

Is there a way to get the information of the main thread (the application thread) from a second thread? My problem is that I have to set the currentprincipal in the main thread, but the authentication is done in another thread because it's a long and complex task, but when I set the currentPrincipal in the second thread, the main thread...

Possible to Change TextBox Style When Input Changes? (Stylesheet/Macro?)

Is it possible to create a macro or stylesheet so that when a TextBox text area is empty, it is yellow per se and when it has data it is white. I would like to accomplish this without having to explicitly call the TextChanged event. ...

Pop out menu for any control?

I have a couple places where a menu would be a better choice than display a dialog box and asked the user a question. Problem is I don't know how to do this. Here's the scenario: Current Situation: I have a picture box that is functioning like a button. The user clicks on the box and a dialog box pops up asking them to select a categor...

How to attach a system scrollbar to my control

I have a control & I want to attach a vertical scrollbar to my control. Please don't suggest me to use Panel control. Actually. I want to know how to program Windows by C#. Please help me with code in C#. Thanks. ...

How to write a Large WinForms application?

I'm going to write a rather big/complex WinForm application such as Paint.NET, SharpDevelop, etc. I think one of the most important things to build such an application is to structure the project properly to increase maintainability and control the complexity. So what kind of patterns or practices show I use? Any blog posts, papers, op...

how to set vertical scroll bar in win form

I am very new to win form. I want to develop a form which has a height of around 992*1403. i tried to give the size of the win form as 992*1403, but its taking only 992*876. i am setting an image of size 992*1403 as the background. i need to put a vertical scroll bar. i put that scroll bar but i dnt know how to write the code when the us...

Disable certain nodes of a tree control.

Hello i have a treeView control with checkboxes: checkbox LEVEL1 checkbox Child1 checkbox Child2 checkbox LEVEL2 checkbox Child1 I shloul not allow checking and unchecking of Child2 of Level 1 and Child 1 of Level 2? is that possible in a tree View control? ...

Help finding a Memory Leak cause

I have the following Leak situation in a VB.NET (.NET2) application: a form - DetailTache (TaskDetails) - in my MDI application is not garbage collected is not collected ofter open/close. I did the following profiling root: any idea how this leak could be fixed? thanks. EDIT: Result search from projet of WinComboRowSelected Event....

Custom Designer for a Control

I've got a custom class which derives from SplitContainer: namespace Builder.Components { public partial class ProjectSidebar : SplitContainer { public ProjectSidebar() { InitializeComponent(); } } } Now when I right-click and select View Designer I'd like to see the SplitContainer and e...

How can I make second-level child forms prompt on close?

The problem: A dialog's FormClosing() event is raised if it's a child, ie it's Owner property is set to the parent form, but NOT if it's a child-of-a-child. So closing the main form does not call the closing event on any grandchildren dialogs. The Details: A dialog prompts to "Save Changes?", with YesNoCancel buttons, in the FormClosing...

"Wait Please" form hides main form

I have some long processes in my app, so I've created a WAIT PLEASE form and I call on another thread like this: public void ShowWait() { continueWait = true; ThreadPool.QueueUserWorkItem((x) => { using (frmWait espera = new frmWait()) { espera.ShowInTas...

Check for entered text in WinForm App

I have a WinForm App(.Net 3.5) that we use in house for data entry...ish, like things. Member Plans, Demographics, etc. The App has a Shell Form with all the navigation and then embeds a UserControl based on there navigation choices. I need to be able to tell if they have made any changes in any of the controls so that I may pop up ...

How can I lift the requirement to uninstall before installation of a .NET application built with Visual Studio?

Is it possible to build an installer in Visual Studio that will not require the application to be uninstalled prior to installation? (Assuming the application was already installed.) I use a Setup project in Visual Studio to create an installer for my Windows Forms (.NET) application. If the application has already been installed then t...

Application environment guidelines

I am looking for Windows applications guidelines, related to configuration, log files and other issues not related to user experience - like Store your configs in Foo directory Put temporary files in Baz one Default directory for open/save has to be Bar etc Thanks ...

Binding 2-dimensional collection to DataGridView

There is a two-dimensional array of double: private double[,] RecipesMatrix; I want to bind it to DataGridView. How can I do this? If it is better, I can change array to some other collection. ...

Question about Windows Events

I was talking with an employee the other day and I remember them mentioning a tool that we use that enables you to see what messages the OS sends/receives when an event occurs (for example, when a link is clicked in Internet Explorer (or another browser)). Can somebody please tell me what this app is called? ...

Passing param to delegate method running on new thread .. Am I crossing UI/Thread bounds?

I have a delegate for a method. I start it in a new thread that has a parameter in it in which I pass a DataView into. The new thread is obviously not running on the UI thread so I should not be accessing any UI controls. The dataview I am passing into the delegated method however I got the reference from ComboBox.DataSource where Com...

Administer asp.net website (create new users, assign users to roles, etc.) from a windows app

I have an asp.net web app that uses forms-based authentication, a SqlMembershipProvider (using an encrypted password format), and a SqlRoleProvider. I need to know if it's possible to administer the users (create new users, assign them to roles, etc.) from a windows application - the powers that be don't want any administrative functiona...

Text Box Databinding in a Winform App, what am I missing

I am trying to implement some very simple Data Binding in my User Control that runs in a WinForm app. The User Control is extended like so --> public partial class ucDiagnosis : XtraUserControl, INotifyPropertyChanged Then on that User Control I have this Property --> private string m_Pets; public string Pets { ...