|
gauthee wrote: Maybe permissions of the file!
Then why didn't the error message say that? The error message did mention that another process was using the file already.
|
|
|
|
|
Asalam o Alaikum:
I have made a desktop applicatioon in c# which captures all running instances of VB6 forms and retrive the data of their control.
when i deployed this project,on some machines it is working very fine but on some machines it is error when application calls the funcltion SendMessage()
can anybody help me
thanx
|
|
|
|
|
When you post a problem like this, you need to be a little bit more specific. What error message/code are you getting? Without this vital piece of information, you're on your own.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
i have one number and i want to transform in one string but with one fixed format:
EX:
if i have
int x=10;
int y=999;
my string must be
string sForX="0010";
string sForY="0999";
(i want to do that without to format the string manual (with for, while or.....) )
|
|
|
|
|
You can use String.Format:
int x=10;
int y=999;
string sForX=String.Format("{0:0000}", x);
string sForY=String.Format("{0:0000}", y);
|
|
|
|
|
This is what i want!!!!
Tks
|
|
|
|
|
Hi all, just want to find out what the best method would be.
I have a dataset with a datatable and values, now I want to write that to a xml file. Is it better to use xmlDocument for that or xmlwriter?
Thanks in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
DataSet dset = new DataSet();
dset.WriteXml(path,null);
//this is the better idea
|
|
|
|
|
I knew there had to be an easy way
He who laughs last is a bit on the slow side
|
|
|
|
|
|
What I have done is to set up constraints on the dataset, but how do I catch any exception that are thrown? Which event do I need to check?
He who laughs last is a bit on the slow side
|
|
|
|
|
Hi,
I have two classes A and B, A will have subclasses A1 and A2, B will also have subclasses B1 and B2.
A1 and B1 will reference each other, as will A2 and B2. Think Controller and Window, where we have some commonality in the base classes but the subclasses will almost certainly have distinct behavior.
I wanted to design my classes so that the associations where declared in A and B (and inherited by the subclasses), putting the common properties (accessors etc) in the base classes, and initialising my derived classes with the necessary references. So A would contain a data member of type B with Property accessors, B would contain a data member of type A with Property accessors. When I created an instance of A1 I would supply it with an instance of B1, and supply B1 with a reference to A1.
As I now know/remembered this will not work seamlessly because I will only see the base class's members (not the derived class's). Virtual/Override kind of help but only to see methods that are defined on the base AND derived. My derived classes will have methods that should not have to appear on the base class in order to be seen.
So I am looking for the accepted C# best practice approach to implementing the above scenario.
Regards
|
|
|
|
|
Hello,
An interface will help you.
Search here on CP for Articles about the usage of interfaces!
All the best,
Martin
|
|
|
|
|
first - what is your problem , be more Specific.
if you don't know how to connect to a data base
then bye a book or use google
second - delete the previous posts before they kick your a**
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Butt kicking mode activated.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
jus i want code for accessing MS- Access tables from windows forms in c#. dont excite ok?
|
|
|
|
|
mind ur language. ok?
|
|
|
|
|
easy easy.......
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
How to monitor an object in program ? When that object changes, I want to receive an event to do something.
Thank a lot.
imagic
|
|
|
|
|
Hello,
Make an property out of your object and fire your event in the properties setter, if the value changes.
private object _yourobject;
public object YourObject
{
get
{
return _yourobject;
}
set
{
if(value!=_yourobject)
{
_yourobject = value;
}
}
}
All the best,
Martin
|
|
|
|
|
One idea is to use the property (set and get)
EX:
public class testClass
{
public int s1 = 0;
public int s2 = 0;
public int s3 = 0;
}
private testClass Mumu=new testClass ();
public testClass mumu
{
set
{
MessageBox.Show("bingo");
Mumu = value;
}
get
{
MessageBox.Show("bingo");
return Mumu;
}
}
................
private void button2_Click(object sender, EventArgs e)
{
mumu.s1 = 10;
}
|
|
|
|
|
Sorry, my question isn't clear.
I have 2 programs A and B: program A monitors program B. When value of object in that program B changes, program B will receive event to do something.
Thanks a lot.
imagic
|
|
|
|
|
Hello,
What do you mean with "program"?
A class or an project?
All the best,
Martin
|
|
|
|
|
Martin# wrote: What do you mean with "program"?
A class or an project?
An independently running process is the general meaning of "program"
|
|
|
|
|
That's what I thougt, but I whanted to make sure if the question is asked correct.
Asking a question in a foreign language is often very difficult, as I know from myself.
But thank's for your statement.
All the best,
Martin
|
|
|
|