winforms

Labels in Visual Basic

In visual basic , when you create a label in form view (via click and drag) is it possible to make the label have both a string and a variable included in it? * turns=1 label1.text = ("Turn:"(turns)) * for example , so that label 1 will display *Turn 1* ...

Printing transformed XML

Due to circumstances beyond my control, I'm replacing all of our Crystal Reports with home-built XML reports, which are working beautifully. For most of the reports that pop up a Crystal Reports viewer, the following code opens them nicely in IE, transforming it to HTML via an XSLT stylesheet. ProcessStartInfo psi = new ProcessStartInfo...

How do you navigate between views in MVP using C# WinForms?

As I understand, when we use MVP we move all presentation logic to the Presenter. But we don't want to let the Presenter know about view implementation, so how can we navigate to another screen in the application? How do you manage application flow on your real application? ...

Remove title bar text of a window but keep status bar text

I am working with Windows Forms, is it possible to create a window which has text in the status bar, but has no text in the title bar at the top of the application? (Largely because the standard title text which prints on my Aero glass I have implemented looks terrible as it's too high and I am drawing my own text title and obviously don...

How to find the DataGridViewCell background color in C#?

How to find the DataGridViewCell background color in C# - windows application? ...

Adding Text to DataGridView Row Header

Does C# allow you to add a String to a RowHeader in a DataGridView? If so, how is it accomplished? I'm writing a Windows Form to displayed Customer Payment Data for the year so far. The ColumnHeaders display January, February, March, etc... and rather than have a blank column with DateTime.Now.Year I would like to put it in the RowHead...

C# add line

I want to add a line in a multiline textbox after every information that the user enters in the TextBox in Windows form. I wont be able to determine the point to draw line as I wont know how long the user will enter information. So I am thinking of adding a string "___" after a button click in the code. Is there a better way? ...

DataGridViewComboBox - Display 'InActive' value in DataGridView

I have a DataGridView that contains a combo box (DataGridViewComboBoxColumn). This combo box is populated with a set of setup values. These setup values can be inactivated such that only active values are displayed in the combo box, however, existing entries(records) that use the inactive values must still be displayed. I can successf...

Fade a color to white (increasing brightness)

I want to make a text box in .NET "glow" yellow, and then "fade" to white (basically, by incrementally increasing the brightness). I think Stackoverflow does this after you've posted an answer. I know that increasing brightness is not all that simple (it's not just uniformly increasing/decreasing RGB), but I'm not sure how to do this. P...

C# Winforms How to update toolStrip in function

I'm building a UI for a program, and I can't figure out why my progress bar won't become visible after the convert button is clicked. private void convertButton_Click(object sender, EventArgs e) { toolStripProgressBar.Visible = true; ... toolStripProgressBar.Visible = false; } I ran into a similar problem with tkinter in...

Access Version Info for Project

I would like to display what version my App is in on the UI. It looks like I set that in Properties --> Application --> Assembler Information. Is that correct? Do I manually increment that upon releases? How do I access that programmatically? Thanks! ...

Where can I find a nice .NET Tab Control for free?

I'm doing this application in C# using the free Krypton Toolkit but the Krypton Navigator is a paid product which is rather expensive for me and this application is being developed on my free time and it will be available to the public for free. So, I'm looking for a free control to integrate better into my Krypton application because t...

Form Designer Generated Code namespaces have to be corrected every form change

Hi, I have several forms with this strange behaviour. For instance I have this form generated code. namespace Sogyo.InHolland.SeriousGameFactory.GameCreator { partial class FormAvatarResourceSetEditor { this.bindingSourceAvatarResourceSets.DataSource = typeof(SeriousGameFactory.Framework.ImageResource); } } In this case when i ...

Windows VB.NET 1.1 to 2.0 Upgrade - Benefits?

We have a fairly large Windows based 1.1 .NET application that we are considering moving up to 2.0. The main reason we are considering the update is so we can utilize Visual Studio 2008 for ongoing development on the project, as well as we use the Infragistics Suite of controls and the 1.1 set is no longer being updated with new feature...

C#: In which classes are the ICommandExecutor interface used?

I found the ICommandExecutor interface in .net but cant find the classes where it is implemented. I know there is some xaml related stuff where it's used. But is there something for the winforms, too? ...

How do I programatically change printer settings with the WebBrowser control?

I finally figured out how to print transformed XML without prompting the user or showing an IE window, but now I need to specify a number of copies and possibly other printer settings. Is there a way to programatically change printer settings on a WebBrowser control? The code in question: private static void PrintReport(string report...

Is it appropriate to extend Control to provide consistently safe Invoke/BeginInvoke functionality?

In the course of my maintenance for an older application that badly violated the cross-thread update rules in winforms, I created the following extension method as a way to quickly fix illegal calls when I've discovered them: /// <summary> /// Execute a method on the control's owning thread. /// </summary> /// <param name="uiElement">Th...

How do I capture the current screen as an image?

I want to add the ability for the users to capture the current screen in my app and email it. I have a very non-technical user base so I need this to be as simple as possible. I plan to let them click a menu item called Help Me! which will then capture the current Application Screen, hopefully as a jpg or png, and then open Outlook and...

What is an interface that specifies an enumerable Windows control?

I have a method that validates a combo box control like so: Public Function ValidateComboBox(ByVal objMessageMode As Errors.MessageMode, ByVal cboInput As ComboBox) As Boolean Dim blnValidated As Boolean 'no value--invalidate' If cboInput.SelectedValue Is Nothing Then Errors.InvalidateField(cboInput, Errors.errFiel...

Attach file to Outlook

I have the below code that I harvested from MSDN. There intent there seems to have been as an Add In and as such I am having a problem with the this.Application.CreateItem(...) portion. What do I need to do differently to do this from my winform app? private void AddAttachment(){ Outlook.MailItem mail =this.Application.CreateItem(Out...