winforms

how to integrate module developed in separate winform application ?

Hello all, i need to integrate modules that are developed in separate win form application.Application can run and test individual and in the integrated.i required to create a set up and deploy at client site.My two biggest challenges are keep assemblies in one place and reference them in application. For Example Module 1. A stand...

Want to send the text to the Active Window

Want to send the text from my current vb application to the Active Window and that text should be displayed in the text area of the active window can anyone help me? ...

NotifyIcon behaviour on Windows 7 with MouseClick, MouseDoubleClick events

I have strange behaviour with my app after run it on Windows 7. It's connected with NotifyIcon while app is minimized. What should happens: 1) Click once on icon with mouse left button then Balloon with some text should appears 2) Double click on icon will show again app window On Windows 7 MouseDoubleClick is also fired but window i...

How to assign shortcut key (something like Ctrl+F) to text box in windows form?

Hi, I am builing one tool using C#. Its an windows application. I have one text box on a form and I want to assign focus to that text box when user presses Ctrl+F or Ctrl+S. I dont know how to do this. Can anyone please tell me how to do this? ...

How to prevent Visual Studio setting my default font sizes in an inherited control

I have a base class for all my textboxes and I want to set the default font in that class. So I started with this: public partial class MyTextBox : TextBox { public WmlTextBox() { InitializeComponent(); //Font for the whole application can be altered in the Appearance class Font = new Appearance().TextBoxFo...

Preventing a dialog from closing in the button's click event handler

I have a dialog that I show with <class>.ShowDialog(). It has an OK button and a Cancel button; the OK button also has an event handler. I want to do some input validation in the event handler and, if it fails, notify the user with a message box and prevent the dialog from closing. I don't know how to do the last part (preventing the cl...

How to let parent control know that its child got focus?

Hi there, imagine that I have a Form with 9 controls (TabbedStuffControl) in a 3x3 tile, and these controls contain TabControls containing another control (StuffControl) with ListBoxes and TextBoxes. I'd like to know a proper way to let TabbedStuffControl that its child has received a focus? e.g. user clicks into a textbox of StuffCont...

How to disable edit mode on cells but checkbox column?

My checkbox column doesn't respond when ticked, apparently it was set to read only, so changing state back to false again will make it possible to tick. However, that will turn the whole edit mode to true. I tried to set edit mode to programatically while setting ReadOnly mode to false, but that will disable the checkbox back again. How...

WPF Tree doesn't work

Could you tell me why I can't see subItems? I've got winforms apps and I added my wpfusercontrol:ObjectsAndZonesTree ServiceProvider is my webservice. Adn method to get listofcountires with subitems works properly (i get countires, regions from this countires, provinces etc...) ElementHost elementHost = new ElementHost ...

DockPanel Suite : Open Document-tab Location?

We're revamping our winforms user interface to use the Weifen Luo DockPanel Suite and since our old UI didn't have tabs, we would like to show a ballon tooltip when a new window is docked to the document area, informing users that they may rip-out the document and float it wherever they would like. I figure to do this I need to be able ...

WinForms Menu Toolstrip Get Status

So I have a project where there is some automatic initialization going on through some classes that are created automatically as global variables (yeah they are static instances). At a point inside this (it has no relation with the C# GUI for the user, so it isn't derived from any C# class) I need to see if a flag is set or not. I use ...

AutoScaleMode.Inherit does not inherit

I have a user control contained in a tabpage. The Form has set AutoScaleMode = AutoScaleMode.Font and the UserControl has set AutoScaleMode.Inherit. Now when I enlarge the font size of the form then the font is enlarged in the user control too, but the controls contents are not scaled. If I explicitly set AutoScaleMode.Font on the user ...

.NET Thread Pool - Unresponsive WinForms UI

Scenario I have a Windows Forms Application. Inside the main form there is a loop that iterates around 3000 times, Creating a new instance of a class on a new thread to perform some calculations. Bearing in mind that this setup uses a Thread Pool, the UI does stay responsive when there are only around 100 iterations of this loop (100 As...

Need to get back form controls' information externally

Are there any tutorials or guides out there that anyone knows of that will show me how to read forms from an external program and get back information about the controls on the form? Currently, I can get the handle to the form, and I can get the class name, but I need to get more information such as a persistent name and contained data....

event handling for button click in visual c++

i am new to this platform and i want to retrive the data from textfield on the click of a button ,how to do this please help me ...

Sliding in Winforms form

Hi, I'm making a form at the bottom of the screen and I want it to slide upwards so I wrote the following code: int destinationX = (Screen.PrimaryScreen.WorkingArea.Width / 2) - (this.Width / 2); int destinationY = Screen.PrimaryScreen.WorkingArea.Height - this.Height; this.Location = new Point(destinationX, destinationY + this.Height)...

How do I make a form modal in Windows Forms?

I'm trying to create a child form that helps the user to enter data for a field in the parent form. I want this child form to be modal, but I don't know what I need to do to make this form modal. Perhaps there's a different type of item I need to use; if so, let me know. ...

How to get characters read from the keyboard?

Hi, I am trying to get the characters read from the keyboard into some variable for further manipulation. I have the following list that I wish to recognize if entered by a user. List of keyboard entries: letters [ ] ~ ^ numbers Part of the code: void HookManager_KeyUp(object sender, KeyEventArgs e) { string test = e.KeyC...

Updating DataGrid From a BackGroundWorker

I hava a Background Worker and a DataGrid in my c# Application. In do work of my Backgroundworker which will call an Api in my dlls which will enter some Data in a SQLite Database. After the Completion of my Api call I report a progress and In progress event of my Backgroundworker I get the contents from Db and assign it as a DataSourc...

How to override event on a UserControl

Hello! I have a WinForms application (OwnerForm) with some UserControl. When textbox of UserControl is changed, I want to filter content of a OwnerForm. But how can I make it? I don't want to specify OwnerForm inside the user control. I know a solution to add manually handlers for MyUserControl.tb.TextChanged to some functions on a o...