Hello every one,
I've main form when I press btn I open new form with showDialog() function,
I need to move two forms together when I press on main form, because they share in
design.
how can I move them together either I press on main form and move it or I press on form2 and move it?
Thx alot for any suggestion.
...
Hi, I have been unable to figure out how to keep a context menu open after handling a click event past the first level. Here is an example of where I have a context menu with a menu of checkable menus. I open up the context menu after handling the click event, but I have to manually return to the inner menu. Is there a way to open up the...
How do I show a PropertyGrid instead of a context menu, so when the user clicks somewhere else, it will hide (like a context menu)?
...
I want to maintain session on a windows application.
How do I maintain the session of a user like we use in as.net to track the user information?
...
I have several WinForms .NET programs that are started using ClickOnce. The user logs into one application and is given a logon ID. I need to be able to get a copy of this ID from the other programs. Could anyone tell me how to do this using remoting, reflection or something! If you could point me at an example that would be great.
The ...
hi all , i am writing a small app to manage code snippets , so i want a component to display the code (keyword coloring , lines numbering ...) , so where to get this component and if it doesnt exist how to implement it .
edit : i dont want to write a code editor , only a component to display code with last features (keyword coloring , l...
In a Winforms form, I want to provide visual cues to the user when an input field contains an invalid value. To that end, I want to bind the ForeColor property of a input field's label to the (boolean) IsPropertyValid property of the underlying model such that the label turns red when IsPropertyValid == false.
What I currently have is a...
I have in a panel a GDI drawing with some objects.
When the user clicks on one object, this object should be selected, if doubleClicks on it, a new pop-up (properties) window should open.
Now, I overrided
OnMouseClick => obj.Selected = Not obj.Selected
OnMouseDoubleClick => (New Properties(obj)).ShowDialog()
The problem is that when t...
I am looking for suggestions on how to, on Windows, execute a windows form and/or WPF application, and force it's display to always be shown within the grahpic context of another completely separate process (basically as if the "child" process were simply another form control).
As a little bit of background, we have a legacy 32 bit ap...
It seems like the elevation of privileges is a common thing most developers fight with as most of the time they simply do not have it. I for one do but am fighting with a massive Background Worker routine and I'm trying to keep my code local to the class that will be employing it. Given the amount of code and references my background wor...
Hello everyone,
I am new to windows.forms programming. I started making an application that has the following flow of events:
click a button that opens a file - extract its contents in some list of strings - visit some websites - parse their content - etc.
So because everything in my app happens after i click a button to open a fil...
Some sample code:
var psi = new ProcessStartInfo();
psi.FileName = "path to update.exe";
psi.Arguments = "arguments for update.exe";
psi.Verb = "runas";
var process = new Process();
process.StartInfo = psi;
process.Start();
process.WaitForExit();
Ref: 0xA3.
Programmatically in code what type of objects if possible could you pass ...
I have added a tool strip to my form. In this tool strip i had some buttons with the help of add toolstrip button. These buttons are by default of the size 22, 20. But i want to change the size of the button to 25, 50. I made changes in designer by changing the size property but it is not reflected in my form. Even if i change the height...
My DataGridView is read-only - the user cannot enter data into it, so that empty row at the end (the "new" row?) just looks ugly.
How can I prevent it from displaying?
...
You know in Visual Studio and other Microsoft products such as Word and Excel, there is that little question/exclamation mark symbol that appears, and if you click on it something drops down to tell you something about what's been entered at that point.
What is that, and could I put it in a cell in a DataGrid?
...
In C# (VS2005), how can I have extra information that pops out from a cell in a datagrid?
In one column of the grid, there are "YES" or "NO" values, but for the "NO" values I need to offer an explanation for why it is "NO". Is there something obvious that can do this?
...
Based on the definition of classic MVC pattern, Controller is responsible for handling user inputs and interacting with Models and also determining which View to be rendered.
Wikipedia definition of MVC:
"The controller receives input and initiates a response by making calls on model objects. A controller accepts input from the us...
I am trying to do something when double clicking an item in a ListBox. I have found this code for doing that
void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
{
int index = this.listBox1.IndexFromPoint(e.Location);
if (index != System.Windows.Forms.ListBox.NoMatches)
{
MessageBox.Sh...
I'm working an a form with a progressbar, which is meant to have certain colors (foreground and background). On my XP machine, the colors are correct. On my Windows 7 machine, the form looks all sexified (just like all the other windows 7 windows) and the color is not what I had set in the designer.
Is there some sort of style option th...
I'm re-working a Winforms application and would like to employ a variation of the Presentation Model pattern for the UI. Could someone tell me from the following explanations if I'm doing it correctly?
I have decided to set up dependencies as follows:
Model <---- Presentation Model <---- View
That is:
The model is not aware of...