winforms

Solution for writting a program for keep secret photos.

Solution for writing a program for keep secret photos. I have many secret photos of me and my friends and I don't want anyone to see it for now I just use Winrar and Set password feature and use some encrypt and hide folder software. But I think it isn't enough safe. As I am a C# programmer ,I want to develop an application for ...

Tab Page add a new property in C# (winform)

Hi, I need to know how could i add a new property to a tab page. Could you help?? Thanks in advance Maria ...

How do I get at the listbox item's "key" in c# winforms app?

I am writing a winforms app in which a user selects an item from a listbox and edits some data that forms part of an associated object. The edits are then applied from the object list to an underlying file. In ASP.Net assigning a different system value to a list item than the display text the user sees is trivial. In a winforms app you ...

Button image too far from top of button; too close to bottom of button

I'm working on a Windows Form in VB.NET 2005 and I would like to have some buttons with images (I'm talking about the plain, vanilla System.Windows.Forms.Button). I have everything set up the way I want it but the images are displaying too low on the button, such that the bottom of the icon is almost right on the bottom of the button an...

How do I get the Localizable property and support in my own design tool?

Overview In another question, I asked about deploying localizations for some runtime compiled UserControl's. However, before I can get to deploying the localizations, I need a way of localizing the controls. Background The controls are created by our own WinForms-style designer (using .NET's support for design surfaces, etc.) and save...

How do I catch and present conversion errors during databinding?

WinForms has great databinding support, and the ErrorProvider makes it quiet easy to display business object errors. However, the conversion errors seems to be swallowed. If I type 'aaa' into a TextBox databound to an integer property, I get nothing from the ErrorProvider. So in this case my UI tells me everything is fine, when 'aaa' is...

AccessViolationException with a webbrowser in a windows form

Hello, I have written a basic Windows Form app in C# that has an embedded web browser control. I am navigating to a page to view a camera's feed. The application works fine on Windows XP, but not on Vista. On Vista, I get a AccessViolationException. This seems to be related to Data Execution Prevention. The article at http://jts...

How do I right align controls in a StatusStrip?

I'm trying to write align a control in a StatusStrip. How can I do that? I don't see a property to set on ToolStripItem controls that specifies their physical alignment on the parent StatusStrip. ...

How to get visible row count of DataGridView after BindingSource.Filter?

I have a table with say 1640 items. I set bindingSource.Filter = "some filter query string"; and most of the rows disappear, leaving, say, 400 rows. I'd like to be able to tell the user "Showing 400 of 1640 items" as they click some textboxes which change the filter string and hence which rows are visible in the dataGridView object (m...

Programming Skill Tester (Problem)

I'm working on a program that will tell what level a programmer is at beginner, intermediate, or expert based on 32 subjects from a test in Code Complete 2nd Edition. I'm using 32 check boxes and one method to tell which ones are clicked. The problem is that when I check to see if the check boxes checked property is equal to true, it get...

Programming Skill Tester (Problem) v2.0

If you haven't read the first problem do so know to catch up to speed. Now then, how do I go about clearing these check boxes? I tried using the same approach that @colithium told me to use for checking the state of all the check boxes, but when I ran the program and clicked clear I got the following runtime error: Unable to cast object...

How to intercept a Tab key in edit control

Hi, I need custom behavior for tab keys in RichTextEdit control. Currenty the best I have is this: editBox.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.field_PreviewKeyPress); private void field_PreviewKeyPress(object sender, PreviewKeyDownEventArgs e) { switch (e.KeyCode) ...

C# issue: How do I manipulate a Textbox on one form from another form?

I'm trying to create my own error window for the project I am working on. When I show my error window I have no way to pass the error message, and user message to the Error window because the "ErrorMessage.Text" cannot be seen in the classes I make. I went into the form designer generated code and tried to make the TextBox static, but t...

C# winforms startup (Splash) form not hiding

I have a winforms application in which I am using 2 Forms to display all the necessary controls. The first Form is a splash screen in which it tells the user that it it loading etc. So I am using the following code: Application.Run( new SplashForm() ); Once the application has completed loading I want the SplashForm to hide or me sent...

How to display PDF or Word's DOC/DOCX inside WinForms window?

Hello, I'm wondering what's the best option to display a pdf/doc document inside form in my c# winforms app. This control should only allow do display preview. Edtiting documents should be forbidden. I'm looking for free solution. The best option would be to attach a few separate *.dlls to solution but it's not a requirement. ...

Execute code after dialog closed and it's not visible

I want to execute some code inside 'Form1' but after the dialog is closed and it's not visible. I know that I can do this outside the dialog after calling ShowDialog() but I don't like it. I tried in 'FormClosed' but it seems that the dialog it's still visible when this event is fired. Also if I call 'Hide()' the main dialog it's minimi...

Transparent control backgrounds on a VB.NET gradient filled form?

I'm filling the background of some VB.NET 2005 WinForms form with a nice pretty gradient fill (by overriding the OnPaint event). This works fine but the various labels etc on the form show with a solid background even after I set the BackColor to Color.Transparent. Setting the transparency key of the form itself seems to affect this but ...

How to enable Multi-Level undo/redo in mshtml & c#

I have a System.Windows.Forms.Webbrowser control hosted in a Winforms app and am loading up a html document that has various elements with the contentEditable attribute set to true. How do I enable multi-level undo and redo for the document? TIA. MB ...

Fixing the position of a form

I am starting a winform application[.NET 3.5, C#], where in the the main form of the application starts at a particular specified location. Am calling the following code in the constructor for this private void SetFormPosition() { this.StartPosition = FormStartPosition.Manual; this.Left = Screen.PrimaryScreen.Wo...

c# one Form blocking another in a winform Project

I have an application which uses 2 forms, a Main Form and a Splash Form being used in the following configuration: public class MainForm : Form { public MainForm() { SplashScreen splash = new SplashScreen(); // configure Splash Screen } } public class SplashScreen { public SplashScreen() { Ini...