|
I want to make may order with each column has a color by datagrid. But I don't know how to do this. Please help me. Thanks.
|
|
|
|
|
Two things i would like to ask.
1. I would like to do something if the user cliks the x at the topright corner (thus closing the form). How can i get in contact with this click event?
2. What is the general closing event of a form?
I am pretty new, so please give clean anserws that even i can understand
R
Johan
|
|
|
|
|
Add an event handler for the closing event to the form. The easiest way is this (using Visual Studio): go to the View Designer of your form, activate the tab properties and click the Events-button. Look for the "Closing" event in the list and double-click on it. An event handler will be created for you.
When the X in the title bar is clicked, this event handler will be called. It allows you to do some clean-up or even to prevent the form from closing (in contrast to the "Close" event).
|
|
|
|
|
Look at the Form.Closing event. Technically, your event handler for the closing event should only deal with closing stuff and should be "agnostic" as to why or how the form was closed.
|
|
|
|
|
|
Hello everyone,
I was wondering how can I incorporate a classic winhelp file I made into my c# aplication
thx
|
|
|
|
|
|
Process p = Process.Start("D:\\NOVO\\novo\\c#\\DVD Tracker ver1.0\\dvd\\help file\\help.hlp");
this is solution
|
|
|
|
|
Hello,
I would like to fill my datagrid's second column based on to the value of first column.
At the first column I am selecting "OPERATION CODE".And based on the operation code the second comboboxcolumn must be filled with "STOCK CODES"
How can I do this? How can I apply the 5 data-table relationship into one datagrid?
Please help
King Regards
|
|
|
|
|
There are two simultanous.second thread executes a funtion, before first thread excutes a wait statement.
|
|
|
|
|
And, what's the problem??
|
|
|
|
|
None. Is there a rule that forces a forum post to state a problem?
--
Affordable Windows-based CMS for only 99 €: try www.zeta-producer.com for free!
|
|
|
|
|
Heh, evidently not.
Just from the vague details I would suggest reorganizing the code so that the original poster's code does not run into a state where it is asking to "wait" in a thread unsafe place. Other than that, we need more details because none of us are mind readers.
|
|
|
|
|
I try to design an database application with 3 tier,design. So is it possible to pass all the Binding Context from User Interface Layer (UI Layer) to (DATA Layer) and then update the Binding Data in Logic Layer ?
Where DATA LAYER is a data class which is collection of the Field Name and Value only.
Sorry for my poor english..
|
|
|
|
|
What is a 3 tier,design ?
|
|
|
|
|
|
Thanks for da link man ,sorry i cant answer your question !
Did you check out my question about the "ticket system"
|
|
|
|
|
kakarato wrote:
Where DATA LAYER is a data class which is collection of the Field Name and Value only.
Yes. However, in your data class you'll need to implement properties for your fields. You class needs to implement [propertyName]Changed events for all your properties, and the property setters need to check if the value has changed and, if the xxxChanged event is not null, fire the event. Also, you need to initialize your fields usually.
If you don't do the event stuff, you won't get 2 way data binding.
Like this:
public class MyData
{
protected string myText;
public event EventHandler MyTextChanged;
public string MyText
{
get {return myText;}
set
{
myText=value;
if (MyTextChanged != null)
{
MyTextChanged(this, EventArgs.Empty);
}
}
}
public MyData()
{
myText="Initial Value";
}
}
I was going to write an article on "Intro to data binding" at some point!
Marc
My website
Latest Articles:
Undo/Redo Buffer
Memento Design Pattern
|
|
|
|
|
Thanks lot. Hope to able to read your new article as soon as possible. I think it may help me to be more understand on the 2 -way binding. Again Thanks.
|
|
|
|
|
Where can I find a c# open source version of a “Web based Ticket system” using SQL SERVER 2000 and .net.
So far I found only found php and mysql versions example: BugIn is a lightweight PHP4/ADODB (MySQL and PostgreSQL tested) bug/ticket/issue tracking system.
Please help !
Thank you in advance
e-mail yaggiza@yahoo.com
|
|
|
|
|
Hi,
In C#, I can send and retrieve email in Outlook easily by use of MAPIFolder, but I would like to know how can I instruct Outlook to check email?
thx
|
|
|
|
|
I tried runnin the code below. I want it to run the Print and dowmload threads as many times as I want.
The threads r properly synchronise with monitor fxns inside the print fxn.
-2 Thread[] myThreads = {new Thread( new ThreadStart (Print)),
-1 new Thread( new ThreadStart (Download))
0 };
1 myThreads[0].Start();
2 Thread.Sleep(50);
3
4 myThreads[1].Start();
5 Thread.Sleep(50);
6
7 foreach (Thread t in myThreads)
8 {
9 t.Join();
10 }
11
12 #region Start thread again (Code not yet working)
13 int cycle = 4;
14 while (cycle-- > 0)
15 {
16 myThreads[0].Start();
17 myThreads[1].Start();
18 foreach (Thread t in myThreads)
19 {
20 t.Join();
21 }
22 }
23 #endregion
24
25 Console.WriteLine("All threads are dead");
When this code gets to line 16 it throws exception that the I can't restart a dead thread
But i want the thread to start again (repeat) it's last job and die when I want it to die. I want to control my codes not the other way round
Can any body help get around this.
|
|
|
|
|
Intead of trying to start the thread again, you can move the code inside the thread function itself. Your thread function should look like
private void Download()
{
int cycle = 5;
while (cycle-- > 0)
{
}
}
In case you want to wait for all threads to Join before beginning the next iteration, you need to implement some sort of signaling (using AutoResetEvent or related classes).
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
|
Hello,
I'm trying to send the HDM_GETORDERARRAY message to my ListView.
The problem is that it requires a pointer to an array to write the indicies in. And I don't know how to pass an array of integers, so that I can read what's been written in it.
Any suggestions?
Thanks in advance!
|
|
|
|