|
thats not what i mean... i can do that... at the moment it is in my solution as a seperate project, compiles as dll and is referenced on 2nd project in the same solution
what i intend is to it have there and ready for me when i make a new solution without having to add the cs file to the solution and compiling the project for it to show up in the tools window
like if you buy a set of controls from devExpress for instance, their controls are in the toolbox without having to do anything
BTW the code was just an example, i actually want to do this for a wrapper class that gives me access to a multimediaTimer...
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
HarveySaayman wrote: thats not what i mean... i can do that... at the moment it is in my solution as a seperate project, compiles as dll and is referenced on 2nd project in the same solution
If you add it to the toolbox, your project needs not to be present, just the dll (somewhere).
|
|
|
|
|
leppie wrote: add it to the toolbox
how do i do that?
the idea is to add it once and never have to worry about it again... i duno if yall are getting what im trying to say
let me put it this way...
let say ive developed a commercial control "ButtonVersionTwo", intended to sell to my "clients" for R2 id have to ship it with an installer... how would you tell the installer program to add "ButtonVersionTwo" to the toolbox? because my "clients" dont want to have to add its dll to every project they do...
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Just add the dll to the toolbox, close VS, open it again, look at the toolbox, you will notice it is still there, and will be there till you remove it manually.
|
|
|
|
|
I would like to create a method that within the method it will handle the mouse click event and after the user has input 2 points the method will return a value back to the caller.
void Test(){
/* The Drawline method should allow user to click the left mouse button 2 times to accept 2 points,after that the DrawLine method will return a true value;*/
bool isDraw = DrawLine();
}
Anyone know what should I do within the DrawLine() method? All help is appreciated. Thanks.
|
|
|
|
|
TaiZhong wrote: I would like to create a method that within the method it will handle the mouse click event and after the user has input 2 points the method will return a value back to the caller.
What has this to do with multi-threading? Anyway, return what value back to the caller? What caller? You need to handle the mouse button down/up events I expect.
Post your code for further assistance.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I am sorry, I am not sure whether its something do to with multithreading or not. You can forget about the "caller" if this terms confuse you (Caller means those who call this DrawLine() method). I just want to know how to make the program to stop at the DrawLine() method and after I have accept 2 points from the mouse down button then will return a true value back from the DrawLine method and after that the program will proceed.
void Test(){
/* The program should wait untill I accept 2 points from the mouse down event after that a true value will return by DrawLine() to "temp" variables */
bool temp= DrawLine();
}
I don't know what should I handle within the DrawLine() method.
|
|
|
|
|
The exact way describe is not possible in .NET or most languages for that matter.
To do it (exactly) like you show, your language will need to support continuations (only Ruby and Scheme does that AFAIK).
The solution to your problem is to rethink the problem, and design it so it can be handled by the platform/language.
|
|
|
|
|
I am using a third party components and it is written by C# .NET and there is a method that works exactly like what I have described previously I wonder how they did it?
|
|
|
|
|
Just handle the mouse click event and have a counter var in your class, increment it each time the click event happens and call the drawline method, in the drawline method check the counter, if it's the amount you want (2 in your case) reset it back to 0 and return true.
|
|
|
|
|
I have a question, if you want the program to stop at a method (drawLine() in my case), isn't it there must be a loop inside that method and loop untill the user have click the mouse button 2 times and only stop the loop and return a value?
|
|
|
|
|
hi.
how to give space between each section in crystal report
|
|
|
|
|
Please don't ask twice.
Have you tried google ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
And somehow you cannot do this in the designer?
|
|
|
|
|
can u be more specific with what u r looking for ???
|
|
|
|
|
hi i am using crystal report in windows appliction
i am getting output from my database as...
data data data
data data data
data data data
data data data
tell me how to extend height between these datas in crystal repor
regards,
vidhya.s
|
|
|
|
|
Is there a simple way of setting MustUnderstand in WCF?
I have a project which uses WSE to connect to a java web service. In order to get it working I had to change the mustunderstand property on the client which was a simple one line if I recall
e.g.
requestContext.Security.MustUnderstand = false
How do I achieve the same using WCF?
modified on Wednesday, June 25, 2008 9:33 AM
|
|
|
|
|
Could not find a straightforward way of doing this client side.
To fix this I had to ammend the java class to add "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" to the list of understood headers.
|
|
|
|
|
Hi, I have a question on correct usage of object composition. This is the situation I'm facing:
class Address
{
private byte _FieldA;
private byte _FieldB;
private byte _FieldC;
public byte FieldA
{
set { _FieldA = value; }
get { return _FieldA; }
}
public void SetAddress (byte fieldA, byte fieldB, byte fieldC);
public void DoStuff(...)
public void DoOtherStuff(...)
...
}
class Message
{
public Address SourceAddress = new Address();
public Address DestAddress = new Address();
}
A client which instantiates a message should only be able to access the address fields and to invoke SetAddress().
By declaring SourceAddress and DestAddress objects as public, I can write things like message.SourceAddress.FieldA , message.DestAddress.SetAddress() , with no need for additional code. However, I also expose other methods like DoStuff() etc, which a message should not be able to call.
On the other hand, if I declare SourceAddress and DestAddress as private, I can control what I expose to the client but I'm also forced to add a lot of code: public properties and methods like SourceAddressFieldA , SourceAddressFieldB , SetSourceAddress() , all duplicated for DestAddress ... this means a lot of code duplication, and less flexibility (imagine if I have to add other Address fields to Message ...).
Is there a "sweet spot"? Is there a correct (or better, preferred) way to expose the behaviour of child objects in C#?
Regards,
Andrea
|
|
|
|
|
I think the best way is to make Address use an interface which defines the methods you want the Message to have access to. Then do public IPublicAddress SourceAddress = new Address(); This means that the Message class can only access the methods you want it to.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi i created a dll in which i create a wizard
plz any body can tell me how i can run this dll using C# code
so that when dll execute the Wizard starts
wasim khan
|
|
|
|
|
You can't run a dll. You write an app that imports the dll, and calls methods in it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi Chris
then how my application run the dll that is downloaded by the System Configurator
wasim khan
|
|
|
|
|
Your app can probe any dll via reflection, or it can be built to import a dll, then it can call it directly.
Well, so long as it's a .NET dll. otherwise, you can p/invoke or call via COM, but you can't reflect, so you'd need to know about it at compile time.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
use unmanaged code to access your dll and use managed or direct call to your method
example
using System;
using System.Runtime.InteropServices
class UnmanagedAccessDll
{
[DllImport("myDll.dll")]
public static extern void StartWizard([required parameters if any]);
}
public ManagedAccessDll
{
public void Startwizard([required parameters if any]){
UnmanagedAccessDll.Startwizard([required parameters if any]);
}
}
or you can call directly in your code
...
UnmanagedAccessDll.Startwizard([required parameters if any]);
...
|
|
|
|