Note:
Using Windows Forms
preferably C# .NET
Question:
Best method for implementing a drag-over-window tool, similar (or identical) to that featured in process explorer, to obtain the process ID corresponding to the selected Window
...
HI, I've a DataGridView with this setting: d
dataGridView1.AllowUserToOrderColumns = true;
(so the users can reorder columns)
My problem is that I want to know the current order of columns.
I've done this methond:
public List<int> getActualTaskOrder() {
List<int> ris = new List<int>();
int i=1;
...
the user has the option of dragging several pictureboxes around the form. when he lets go of the mouse, the picturebox will take on a new position on the form. this i have done succesfully thanks to the stackoverflow community.
i would like to implement the following:
on mouseup, if the picturebox position is within some amount maybe 5...
I found some of my winform application controls, such as DataGridView and ToolStrips, are referred to by UserPreferenceChangedEventHandlers. I have no idea what setting of the controls will generate such references and why such references keep my control alive in memory. How can I remove such references from that event? Thanks.
...
in vb.net i would like to draw a regular line on a form. is there a control to do this?
...
I want to validate the user's input and I want to inform him/her about validation error with changing background color of a standard Windows Forms TextBox control.
But instead of changing color immediately I would like to use a color fading effect, like here (click on input to see fade in effect, click again to fade out).
Is there any ...
I am using a DataGridView with a DataTable as a stack for some values. Something gets recorded into the DataTable rows and then I send them somewhere in a FIFO fashion - it would be very nice to draw the rows in a bottom->up(to stack them up) direction instead of a up->down direction.
How can I achieve this since the paint events are on...
How do I get only the Date from a DateTime Picker in C#?
...
Looking and .Net Rich Editor that generates HTML, it is important to be capable of handling Tables, merging Cells among other table stuff.
...
I am setting the width of a WinForm datagridview column to 140 and I am checking the width and it's 100. The grid is wide enough to make all columns wider. Why isn't the column accepting the 140 value? Is there a setting which controls the max width?
MyGrid.Columns["Name"].Width = 140;
int i = MyGrid.Columns["Name"].Width; //why is i = ...
for this line:
Private _allowedLocations As Point() = New () {New Point(50, 50), New Point(500, 500), New Point(700, 100)
i am getting the error "type expected for 'new ()'
whats wrong with the syntax?
...
I'm re-writing an app that is a data-entry tool. The existing app is in Access and consists of a form with multiple grids, with each grid containing many columns that requires the user to scroll horizontally in order to view columns.
The current grids on the form are layed-out heirarchically in parent-child relationships. Top grid repre...
hi i have a datagridview in a form... users by clicking the column name can sort the row data in that column either in ascending or descending orders... how is it possible to disable it? so that the data in rows of every columns stays in that order in which they were on the start of the form... thanks!
...
Hi,
I have GroupBox with its Font set to bold. If I put a TextBox or DataGridView inside the GroupBox when they are displayed all their text also appears in bold. The contained controls appear to inherit the font style of the container.
How can I stop this happening, i.e. I want the contianed controls to use the font as specified at de...
Hi, I am building a Windows form application using .NET 3.5. I would like to use the MVC design pattern. The app has two forms: a quick launch and a view showing the details. The quick launch just has a tree with 2 levels, so the tree structure looks something like
Category 1
Subcategory 1-1
Subcategory 1-2
Category 2
Subcategory 2-...
First off, I'm a real beginer at C# so please be gentle.
I'm trying to have a circle follow my cursor. I don't want any "trails" to be left behind.
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
drawCircle(e.X, e.Y);
}
private void drawCircle(int x, int y)
{
Pen skyBluePen = new Pen(Brushes.DeepSkyBlue);
...
I need to remove the focus from several textboxes; I tried using:
textBox.Focused = false;
but the property is read only. I then tried setting the focus on the form, so as to remove it from all the textboxes, but this also fails to work:
this.Focus();
and the function returns false when a textbox is selected. So; how do I remove fo...
Need to generate some financial report where the formatting is controlled by the data
haven't done reporting in a while but does any reporting support that
e.g. based on a flag in the source dataset
the row text could be bold
the row could have an underlining
the report could start a new group header etc.
...
In windows form - have a panel in which a text control were added.
On opening the form , I need the panel scroll bar to be at the TOP position.ie., near to the first control.
Now when the form is opened , the panel scroll bar is at the BOTTOM.ie., at the last control.
...
Hi all,
Having a slight problem on C#, still quite new to the language but hoping you can help. I have a program which dynamically creates tab forms and then I'm trying to add controls to the tabform (text boxes and labels), but no matter what I try it just doesn't seem to want to work. Here's the code I'm currently using (just to get o...