Hello!
I'm building a Windows Form application where I have a menuStrip and a toolStripMenuItem called Preferences, that self explainatory is for opening a preferens form.
The problem im having is that I have bound the shortcutkey for that item to Ctrl+P wich opens the printer dialog, wich i assume is defaulted in all windows forms.
I...
I have a WinForms ListView, obviously containing ListViewItems. I'd like to be able to attach a click event to each item, instead of to the entire ListView (and then trying to figure out what item was clicked). The reason for this is that I need to perform a different action based on which item was selected. The ListViewItem class seems ...
We have a WinForms application in C# 3.5 (SP 1). We would like to restrict the application to one process in memory with multiple window instances. We are not looking for an MDI approach, but to have separate main form instances without launching multiple application processes.
We are evaluating three approaches:
Windows Messages
C...
The code below demonstrates a very simple problem; I am hoping that I am just missing a setting that someone might be able to reveal.
Goal
(1) Launch main winform (MainForm).
(2) Press button to display secondary winform (ShadowForm) that is semi-transparent and should exactly overlay MainForm.
What Actually Happens
Scenario 1: Launc...
I am writing a small class for driving integration testing of a win form application. The test driver class has access to the main Form and looks up the control that needs to be used by name, and uses it to drive the test. To find the control I am traversing the Control.Controls tree. However, I get stuck when I want to get to controls i...
I've got an IntPtr marshaled across an unmanaged/managed boundary that corresponds to an Icon Handle. Converting it to an Icon is trivial via the FromHandle() method, and this was satisfactory until recently.
Basically, I've got enough thread weirdness going on now that the MTA/STA dance I've been playing to keep a hosted WinForm from ...
I have a class called Picture and that has a name and size (int) property.
I was going to sort them using size, but not the displayed file name which is the item name in the listview.
I implemented IComparer<Picture> for the Picture type, and then when I write this:
this.PicList.ListViewItemSorter = AllPictures[0];
or
this.PicList....
I have small test app which has 2 resource files (Resources.resx & Resources.de-DE.resx) with the same exact string names, but one has the strings converted to German.
For my form I set the Localize property to ture.
In my application I am getting the strings as such:
this.Text = Properties.Resources.frmCaption;
In my release folder...
Hi,
I have written a application which runs in the background. I want to write a code
so that, when "ctrl + Alt + Q" is pressed, i should prompt the user with a message box,
"Are you sure to log out?". It is a c# windows application.
Thanks.
...
This is a C# (v3.0) Winforms problem.
I have a big object that is associated with a BindingSource. When I have done with this object and the BindingSource, I want to remove the reference from the BindingSource so the object can be released. I used BindingSource.Clear(). But after that, in the memory profiler, I can still see the object ...
i would like to allow the user to play around with the size of the trackbar in vb.net. is there an easy way to do this?
i want to clarify that i would like the user to be able to just resize the trackbar by dragging it just like in design mode.
...
Hi all,
Can anyone explain me the following code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
namespace web.frmcolor
{
public class FormEx : Form
{
/// <summary>
/// Set the default color for the designer
/// </summary>
stat...
Is it possible to switch PropertyGrid to RTL layout? Seems to be that setting RightToLeft property to Yes does not do the job. There are RtlTranslateAlignments and RtlTranslateContent methods in PropertyGrid, should I use it in any way?
If this property is unsupported are there free analogues that support RTL layout correctly?
Note: I'...
I need to know is there a way to dispaly parent-child relation in a single datagrid in Windows Forms .Net C#
...
How to disable a parent form when child form is active in c# ?
...
Actually i wrote a UserControl which acts as a container for other (let's call it) NestedUserControls.
I implemented a programmatically way to add such NestedUserControls to my UserControl (through an App(string name) function). But what i actually more like would be some kind of List as a public property for my UserControl.
But the pr...
I'm writing a software component that displays on-the-fly the content of a certain log file. Think of boosted-up tail -f. It should be a part of a bigger GUI.
I was wondering which GUI componenet should I choose to implement the scrollable textarea which should display the log file output.
Three my main requirements are:
Search - let...
In C#, is there an equivalent to the Java JTable?
Additionally, I'd like to be able to have rows sorted by column when the user clicks on that column heading. Finally, I'd like to have two tabs, each with a "JTable" in it.
...
My problem is that I have a panel in panel. Inside i have the AutoScroll property set to true. When I open a new window this panel is scrolled to begining.
I do that, I save the position before open new window, and I set it after close it. It works but it jumps to the beginning and then back to my position.
...
Hi,
I have a combobox with a given width.
It may occur that one row of the data is partially hidden (the combobox might be too narrow). I'd like to show the whole line by using a tooltip or right-click context menu.
Currently I can't find how to 'catch' the row that I'm currently holding on or passing over by mouse. Please tell me.
Th...