I am creating a windows:forms application. I have read some of the answers give to try to understand the concept of .h(header file) & .cpp(implementation files). As I created the GUI for my app. I noticed the code being placed in the .h file. But when I double clicked a button control to add code to the procedure, the code was created in...
The following code is taken direct from Microsoft at http://msdn.microsoft.com/en-us/library/system.windows.forms.treeview.aftercheck%28VS.80%29.aspx.
// Updates all child tree nodes recursively.
private void CheckAllChildNodes(TreeNode treeNode, bool nodeChecked)
{
foreach (TreeNode node in treeNode.Nodes)
{
node.Checke...
Hi, i want to create an info box in .net 2 (attached is an image with an example)
I wanted to use a panel, but I cannot change the color of its border.
is it possible to change this property? if so, how?
Thanks,
Shuky
...
Here is my snippet:
private void btnBrowseCInv_Click(object sender, EventArgs e)
{
ofdBrowseVInv.Title = "Locate Customer Invoice File";
ofdBrowseVInv.Filter = "Portable Document Format (*.pdf)|*.pdf|All Files (*.*)|*.*";
ofdBrowseVInv.FileName = "";
ofdBrowseVInv.FilterIndex = 0;
ofdBrowseVInv.InitialDirectory = "";
ofdBr...
I have a small windows.form that I use to present information when the mouse is over a regions on a windows.Form, however it takes the focus from the parent window when it is set to visible. Is there w way of preventing this - it causes the main form to flicker as it toggles between in focus and out.
c#, .net 2.0, system.windows.forms
...
I am building a C# application that uses GDI+ to draw images and shapes to the form but I have no idea how to delete them. Let's say I have a optional grid drawn using GDI+ and when users turns it off, I want to, well, turn it off, delete it somehow and without affecting other objects on the working canvas. What is the best approach? Tha...
This can be applied to any language/UI project. When the code is automatically generated, is there a need to name all of the UI controls? Presently I only name the ones I am referencing in code (although admittedly sometimes I get lazy and leave them). Or do you stick with the pre-generated names (textbox1, splitContainer1, menuStrip1, e...
What is the wpf equivalent to ControlPaint.Light?
http://msdn.microsoft.com/en-us/library/3wz9t9fy%28VS.80%29.aspx
Given that WinForms uses System.Drawing.Color and wpf uses System.Windows.Media.Color
...
Hi,
I want to disable the screensaver and monitor power off. At this stage there's no windows form, which I could youse. Thus I wan't to use NativeWindow.
Here's my code
sealed class ObserverWindow : NativeWindow, IDisposable
{
internal ObserverWindow()
{
this.CreateHandle(new CreateParams()
{
Paren...
I have a datagridview on a windows form. It has clolumn [EmployeeNumber, EmployeeName and EmployeeDepartment].
I want to be able to edit values directly in the grid but i want EmployeeDepartment to be a combobox column, such that on cell edit, a combobox shows up with available options for the employee department. Has any one been able...
how to change backcolor for disabled c# ComboBox for more Readablity
...
I would like to be able to set the CharacterCasing of a specified column to uppercase.
I can't find a solution anywhere that will convert characters to uppercase as they are typed.
Many thanks for any help
...
How do I change the datagridview selected row background color in C# windows applications?
...
In my window forms application, I create a Appdomain say sandBox. In this sandbox i excute some code Say TestMethod from TestAppdomain Class. This class is in Test.dll which is not loaded in the current appdomain (Default appdomain).
Now while executing TestMethod some exception occurs, then I want the sandbox domain to be unloaded and ...
We have .NET WinForms based application and it is expected to work on at least 9 languages including
English
Spanish
Russian
Simplified Chinese
Traditional Chinese
Korean
Japanese
Our application shall work on Windows XP (SP3), Vista, Windows 7 and Windows 2003 & 2008 operation systems.
We have never used Arial Unicode MS for local...
I am trying to decrease the height of DataGridView rows to allow showing as much of theme. But all my best effort produces the following result:
These are the settings used for the RowHeaderDefaultCellStyle:
aGrid.RowHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
aGrid.RowHeadersDefaultCellStyle.BackColo...
Hello,
I'm search for a method to add a custom usercontrol in a Janus GridEx with C#. In the designer I have different columntypes (link, text, image, ...) but I need something with more functionality (multiple checkboxes which must be set/saved in a seperate table).
I think this would be easiest if I could just add a custom component ...
I have this snippet:
protected void ProcessUpload(FileUpload upload)
{
if (upload.HasFile)
{
string fileName = Path.Combine(Server.MapPath("~/Uploads"), upload.FileName);
if (File.Exists(fileName))
File.Delete(fileName);
upload.S...
Hi, guys
how to make the Panel widget change it's size on Form1_SizeChanged
how to attach a console window in order to see console.writeline messages
...
I have a Windows form with a panel with several controls on it. The panel does not take up all of the form space, but only a small part. What I want to know is if there is some way to retrieve the display of the panel (with all child controls) as a bitmap. Like a screenshot but only cropped to the panel.
I am not looking into the screen...