|
zinzineti wrote: VB :
Dim WithEvents theCL As TOMListenerCall
C# :
TOMListenerCall theCL;
|
|
|
|
|
I do
TOMListenerCall theCL;
And in my form.cs at InitializeComponent() i put this code :
this.theCL.onEstablished +=new ITOMListenerCallProxy_onEstablishedEventHandler(theCL_onEstablished);
but I have this error : La référence d'objet n'est pas définie à une instance d'un objet.
Thanks for your answer
|
|
|
|
|
You should not be changing InitializeComponent manually. This is where autogenerated code goes and will be re-generated by the IDE.
The code you posted does not create a new instance of TOMListenerCall, it simply declares a variable (WithEvents) of that type. That is exactly the same as the code I translated to C# for you.
In order for you to use an Instance of that object (ie, to subscribe to events) you must create a new instance using the new keyword. As I do not know whhat constructors TOMListenerCall defines, ill assume it has a parameterless constructor:
<br />
TOMListenerCall theCL = new TOMListenerCall()<br />
theCL.onEstablished +=new ITOMListenerCallProxy_onEstablishedEventHandler(theCL_onEstablished);
|
|
|
|
|
hi
is there any way to keep an array list of points in an area? i need to do this to use the points for checking if the mouse click event is in the area.
thanks
|
|
|
|
|
What are you doing here?
You posted the questions three times now, and allways provide a little less information.
And now this, no information at all!
All the best,
Martin
|
|
|
|
|
I'm sorry, i don't intend to be rude. i thought i gave enough informations. I'm just trying my best to learn, sorry...
|
|
|
|
|
F*** U...
If U don't want to answer his question, then U must shut Your f***Mouth
|
|
|
|
|
I really like the combination of, marking a post as "Joke" and all the f words in it.
I also wish you a nice day and thank you for your nice words!
All the best,
Martin
|
|
|
|
|
Point number 8 in all forums' administrative post reads like this:
<big>Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.</big>
|
|
|
|
|
Hmmm. lets review your contribution of 3 whole posts to CodeProject:
UglyxXXx wrote: f*** U...
Hei U buy by your self a**hole
UglyxXXx wrote: f*** U...
f*** U Christian...
If U dont want to answer his question, then dont answer it
UglyxXXx wrote: f*** U...
If U don't want to answer his question, then U must shut Your f***Mouth
Can I be the first top invite YOU to get lost?
|
|
|
|
|
I'm just curious who is hiding behind this name.
I think he is also active with an other name and just wants to play the "bad boy"!
All the best,
Martin
|
|
|
|
|
Hi All,
i m using the following code but this code is write on mdi form
any can give code to write on the child form.
<code>Stock childform = null;
foreach (Form f in this.MdiChildren)
{
if (f is Stock)
{
childform = (Stock)f;
break;
}
}
if (childform == null)
{
childform = new Stock();
childform.MdiParent = this;
childform.StartPosition = FormStartPosition.CenterScreen;
childform.sStock = sMdi;
childform.Show();
childform.Focus();
}
else
{
childform.Show();
childform.Focus();
}</code>
i all ready have a mdiparent with many children they all are working well. now i want to create a new form which is displayed wen the one of child form is clicked and i want this new form as a child.
-- modified at 5:04 Thursday 26th July, 2007
Nikesh Kr. Yadav
CSS Infotech
Sec- 31
Gurgaon,
Haryana(India)
|
|
|
|
|
make yo ur child as a IsMdiContainer as true , it will become mdi child
Ashish Kasma
|
|
|
|
|
Thankx for reply,But its not the solution.
there is a particular code is use for this because i all ready have a mdiparent with many children they all are working well. now i want to create a new form which is displayed wen the one of child form is clicked and i want this new form as a child.
Nikesh Kr. Yadav
CSS Infotech
Sec- 31
Gurgaon,
Haryana(India)
|
|
|
|
|
dear what you need is not clear ,
because ur subject says you want to "make a mdi form?"
please elaborate in more detail.
|
|
|
|
|
hi
i have an asp.net page in which some control like "textbox" are present,this page is inherited from a master page and does not allow any "form" tag in the markup.
i want to get all the controls present in this page .
any solution for this.
thank you
Farhan Ali
|
|
|
|
|
To access all controls of a page use the Controls property of the Page.
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
|
Which development tool do you use?
|
|
|
|
|
I think, you can use osql command to run SQL script file from setup..
check-out this ...
http://www.thescripts.com/forum/thread476966.html
|
|
|
|
|
|
What is the good point of using this attribute?
this said,[^],
1. Code a new assembly (A2).
2. Move type T1 to from A1 to A2.
3. Remove T1 from A1. // Note by Michael Sync: We can't change the original namespace.
4. Reference A2 from A1
5. Add a TypeForwardedTo attribute to A1, pointing at T1 (now in A2)
6. Recompile A1 and A2.
7. Replace the original A1 with the new A1 and A2 (in the locations used by APP)
Since we have to reference A1 and A2, I didnt see any advantage of using this attribute..
Did I miss something here? It would be great if anyone explain me about the advantage of using this attribute with some examples.
Thanks in advance.
|
|
|
|
|
only use is when you have some legacy application (no source available, or cannot recompile for any other reason) referencing the type T1 originally located in A1 and for whatever reason you need to move the type out from that assembly.
Then you can do that mumbo-jumbo and you'll have your type happily moved out of A1 to A2, legacy binary still referencing the A1, but using type T1 from A2.
At least that's the reason for the attribute from my understanding.
Modify: Yes! And you need to know it for MS exams (the second reason why this attrib exists ).
|
|
|
|
|
thanks a lot for reply. geo_m.
geo_m wrote: some legacy application (no source available, or cannot recompile for any other reason)
We need to add A2 as a reference in Window Application after moving T1 from A1 to A2. isn't it? So, how to do that if that window application has no source code..
I think it can be done without this attribute.. right? We will move T1 from A1 to A2. Then, we will add A2 as a reference in window application. so, it's not necessary to have this attribute..
geo_m wrote: Modify: Yes! And you need to know it for MS exams (the second reason why this attrib exists ).
haha.. Yeah...
|
|
|
|
|
Okay. geo_m. I got you..
The main advantage having this attribute is that it's easy to move the type without recompiling the main application.
1. Code Class1 in (ClassLibrary1) assembly.
2. Add this ClassLibrary1.dll to Window application
3. Use ClassLibrary1.Class1 in window application
4. Code a new assembly (ClassLibrary2).
2. Move type Class1 to from ClassLibrary1 to ClassLibrary2. // Note by Michael Sync: We can't change the original namespace. So, we have to keep "ClassLibrary1.Class1" in ClassLibrary2
3. Remove Class1 from ClassLibrary1.
4. Reference ClassLibrary2 from ClassLibrary1
5. Add a TypeForwardedTo attribute to ClassLibrary1, pointing at ClassLibrary2(now in A2)
eg: in assembly.cs under properties of project view
[assembly: TypeForwardedTo(typeof(ClassLibrary1.Class1))]
6. Recompile ClassLibrary1 and ClassLibrary2 .
7. Copy new ClassLibrary1.dll and ClassLibrary2.dll. Replace the old ClassLibrary1.dll. Paste ClassLibrary2.dll
We dont need to touch Window application for adding ClassLibrary2.dll. Window application keep using ClassLibrary1. ClassLibrary1 will forword to ClassLibrary2. So, it's not necessary to recompile the window application..
Yeah. That's great...
Thanks again. geo_m
|
|
|
|