i want to change application settings at runtime, here part of it:
<applicationSettings>
<OPCClient.Properties.Settings>
<setting name="Client_Service" serializeAs="String">
<value>http://localhost/test/service.asmx</value>
</setting>
</OPCClient.Properties.Settings>
</applicationSettings>
i w...
I want to create some custom shapes for MS Office which we can use in house.
For example I want to create a shape named “carton box” which have three – four default places where user can add some text.
It is same as other shapes or I would say just like shapes (line, flowchart, arrow etc) in MS office 2007.
Is there any way to create a...
I'm not sure if I got my terms straight here, but I was wondering:
Is creating objects in run-time faster than adding objects to a form before running it?
In case my terms are messed up, in the load function, you add this:
lOptions.AutoSize = true;
lOptions.Location = new System.Drawing.Point(7, 75);
lOptions.Name = "lOptions";
lOptio...
I have developed a simple Windows Forms User Control. I drag and drop this user control on a form. How can I achive, that now I can put further controls from the toolbox dirctly on the user control in the form?
In other words, is it possible to use a user control like a container control?
...
Hi,
i'd like the following code to work (where this. is a MDI child form)
this.HelpButton = true;
this.HelpButtonClicked += HandleHelpButtonClicked;
this.Refresh();
this code is being called after the mdi child form is displayed.
I wonder if i need to find some way of redrawing the title bar?
David
...
In my windows forms app clients sometimes report a strange exception:
System.InvalidOperationException: Value Dispose() cannot be called while doing CreateHandle()
at System.Windows.Forms.Control.Dispose(Boolean disposing)
at System.Windows.Forms.ContainerControl.Dispose(Boolean disposing)
at System.ComponentModel.Component.Dis...
I am using MySQL with C# / Visual Studio 2008. I need to know any method so that if one user updates the database, all the logged in users over the network, are notified that a change has been occurred.
If i logged in the database through my application, at that time the serial no of the latest record in the database was 10, and then i s...
I am translating a compact framework 2.0 windows form in Visual Studio 2005. To do that, I change the language of the form to German (the target language) and edit/resize the controls on the form. This creates a resources.de.resx file containing the translated strings as expected.
However, there is a custom control on the form, which ha...
Let's say I have
Label1
Label2
Label3
I want to do something like:
for(int i=0;i<3;i++)
{
LabelArray[i].Text = "weee!";
}
To populate the array, I know I can do something like:
LabelArray[0] = Label1;
LabelArray[1] = Label2;
LabelArray[2] = Label3;
But that doesn't seem smart just because I have 50 labels, and that would be...
In the Program.cs file of the .Net CF 3.5 WinForms program I've written, I launch the app by instantiating a new instance of Form1.
Application.Run(new Form1());
When I want to close/exit the application, I override the Form1 FormClosed event so that I can ensure exiting the application.
// In Form1 code-behind
private void OnFormClo...
An exception is thrown in a user control based on a picture box, causing it to show the typical error image (red X). Since the GUI thread caught and handled the exception itself, I cannot easily find out where the exception occurred and debug.
I'm currently wrapping the whole OnPaint code in a try-catch, and was able to debug the code, ...
Hi, I have a TableLayoutPanel and every time I put a label into one of the cells, it snaps to the top left corner. How can I get to it not do this or change where it snaps.
Also, is it possible to change a specific cell's background color?
Thanks!
...
C# WinApps:
what is a tool or debugger that I can use to see the name and values of the controls that I have drawn on the form at run time - I mean when I run my program I want to be able to use that tool and hover over controls on the form and that program show me the name and value of that control.
...
I have a WinForms menuitem and I need that on menu click the new WPF dialog is loaded.
How do I do this?
Thanks
...
Hi
I am using Visual Studio 2008 targeting .net 3.5 framework. I need to add a WPF dialog to a Winforms project. I was thinking that by adding reference to PresentationCore, PresentationFramework and WindowsBase.dll and copying a WPF dialog from a test WPF project to the WinForms project in question should do the trick, but after that wh...
Hy!
I would like to make a logging system with a listbox, that highlights some of my lines, depends on my will :P
So, if I have 4 kind of reporting, like, general, warning, error, debug.
I add with somelistbox.Items.Add("Starting"); <-- I would like to drawn this as grey
somelistbox.Items.Add("Error!"); <-- I would like to d...
I'm not sure what it's called in the land of WinForms, but in web development terms, I'm looking for a frame type element that can be added to a winform.
I want a panel that is anchored top,bottom,left,right but if the form the panel is resized to a smaller size than the elements in the panel, scroll bars will appear around the panel a...
I have a Form with a DataGridView.
RMShyperlink = new System.Windows.Forms.DataGridViewLinkColumn(); //create a link column column
dataGridView1.Columns.Add(RMShyperlink); //add to my datagrid
for(int i =0 ; i < dataGridView1.Rows.Count; i++)
{
dataGridView1.Rows[i].Cells[0].Value = "http://localhost"; //i set the value
//but the...
Hi I was wondering how I can get my TableLayoutPanels to resize (height) automatically depending on how much text is inside of them. for instance, if I have 5 lines of text, I'd like my row to be 5 lines high, if I have 1 line of text, I'd like my row to be 1 line high.
This is the way tables work natively in HTML, and that's basicall...
I'm trying to solve a problem where I'm intercepting a request in Navigating and want to inject an additional request parameter into that request before passing it off.
Here are the steps:
First I make a request via WebBrowser.Navigate. I have an event handler to capture the Navigating event.
The request hits the Navigating event (be...