|
How do I make it a managed DLL? Is there a step by step guide to this problem, or at least an example?
cellardoor
|
|
|
|
|
A managed DLL is a Class Library project written in a .NET language
|
|
|
|
|
search on code project, and you will find many; all kinds of bar code in all kinds of languages.
Did you see this one [^]?
Luc Pattyn
|
|
|
|
|
Hi all,
In VS2005, is it possible to set a USercontrol's property in the "Properties Window" when designing the container form? How can I make that a Usercontrol property appears in the "Properties Window"?
Thanks in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
Hi Marc,
While developping your UserControl, add a property the way you always do it.
Then add XML comments (triple slashed) if you want these
Then add attributes for the future users of your UserControl
When using your UserControl, the Designer will:
- show the description you gave as a help text (at bottom of pane)
- use "Category" to group properties (when in grouped rather than alphabetical order)
in the Properties panel of your UserControl,
An unfortunate consequence seems to be, if you want both XML and Designer help,
you end up repeating the same textual description.
like so:
[Category("MyUserControl"), Description("Gets or sets a flag to "+
"indicate ...")]
public bool SomeFlag {get {return someFlag;} set {someFlag=value;}}
Luc Pattyn
|
|
|
|
|
Helo
im trying to get MCTS exams , can anybody give me an idea about it
or any materials ,
thanks
|
|
|
|
|
And this is why the exams are useless. People pass because they get the info they need online, not because they know anything.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
Hello...
Does anyone have a problem in WebBrowser.Print() Method ?
My code is :
this.webBrowser.Navigate("http://www.microsoft.com");
this.webBrowser.Print();
It prints always 2 pages, the first page is always empty. The second page is the microsoft website.
Is that a bug from microsoft ?
Thanks...
|
|
|
|
|
What happens if you try to print that page using Internet Explorer 6?
|
|
|
|
|
I implemented same call in my program few days ago and it works nice so it must be your host have problem with IE or something...
|
|
|
|
|
Hi All,
Iam using this multi threading concept to load an xml file from web to a dataset.
Here iam generating lot of threads say around 10. In this few threads where not completed till the end, when i checked the thread status it is still alive.
So what should i do to overcome this problem.
Thanks in Advance,
Justin
Justin
|
|
|
|
|
Here are some facts:
By themselves, threads stay alive as long as they have something to do; most likely this
means they are inside a loop (could be a message loop as inside Application.Run, and
in Form.ShowDialog) or they are waiting on something that has not happened yet (such as
Thread.Join).
From outside the thread, a thread could get aborted or killed, to make it stop.
When Thread.IsBackground is true, then that thread will not prevent the app from exiting.
And some suggestions:
- watch your CPU activity (Windows Task Manager, Processes, column: CPU); if not near zero,
your app is still busy (calculating, or looping, anything that exceeds waiting)
- if CPU is near 100% you are probably stuck inside a loop that contains no wait, and also
no delay (something like a polling loop without a Thread.Sleep; a very bad idea!)
- add logging to your threads
- make sure you do not eat Exceptions; they are there for a purpose, act on them, dont
just catch and ignore them
- use Visual Studio to observe and debug your app
- try and avoid potential deadlocks (you know, the situation where multiple threads need
access to the same resources, which are protected in some way, say by locks;
thread 1 grabs resource 1 then tries to grab resource 2, whereas thread 2 grabs
resource 2 then tries to grab resource 1.). If this is too mysterious, find yourself
some articles on the subject (and again add logging to your app, with logging you pretty soon
should notice a deadlock if and when it happens.
Cheers
Luc Pattyn
|
|
|
|
|
Hi all,
I've created a usercontrol library (VS2005) and when I use one of its controls in an app I'd like to change some properties of the controls that are contained in the usercontrol. By default, when I drag a usercontrol to the app form, its controls remain locked and I just can change the general properties of the UC.
Is it possible to change the container controls properties?
Thanks in advance,
Marc Soleda
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
Hello,
If the properties are public and the ReadOnly Attribute is not set to "true", it should work.
All the best,
Martin
|
|
|
|
|
Hello,
Martin# wrote: If the properties are public and the ReadOnly Attribute is not set to "true", it should work
how do you make that control public? I mean: the control that I want to change is a Button and in some Apps I'd like to make it visible and in some others no. Can I do this in the Form DEsigner or by code at runtime?
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
You can change the attributes of a Control in Designer; look for "Modifiers"
in the Control's Properties list.
Now if your UserControl really has two states (say "simple", and "full") I think it would
be much better to make that explicit feature of your UserControl:
keep the internal Controls private, but give the UserControl one more Property
(say bool "reducedFunctionality"); with this property you can choose, either at build-time
with the Designer while putting it on your Form, or programmatically at run-time
(by assigning a value).
Luc Pattyn
|
|
|
|
|
Hello !
When an object is marshalled by ref (through .net remote client call),
all references it hold also get marshalled too--except those new inside itself.
Is this the correct statement?
Technically,
<br />
class MyService : MarshalByRefObject {<br />
MyObject myObj = new MyObject();
MyObject hisObj = someOneElse.Object;
...<br />
}<br />
Thanks,
sovann
|
|
|
|
|
I have done one desktop application in visual c#, i want to give
online updations for that software . i need .net coding for this
need.
we are in illusionary life
|
|
|
|
|
There is no .NET code for this - deploy with clickonce.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Consider the following code example
class Program
{
static void Main(string[] args)
{
StudentInfo stud = new StudentInfo();
stud.Name.FirstName = "zai";
stud.name.FirstName = "zai";
}
}
class NameInfo :ICloneable
{
private string firstname;
public string FirstName
{
get { return firstname; }
set { firstname = value; }
}
public object Clone()
{
NameInfo n = new NameInfo();
n.LastName = this.lastname;
return n;
}
}
class StudentInfo:ICloneable
{
public NameInfo name = new NameInfo();
public NameInfo Name
{
get
{
if (name != null)
return (NameInfo)name.Clone();
else
return null;
}
set
{
if (value != null)
name = (NameInfo)value.Clone();
else
name = null;
}
}
public object Clone()
{
StudentInfo s = new StudentInfo();
s.Name = this.Name;
return s;
}
} the following statement fails when accessing firstname thru Name property
stud.Name.FirstName = "zai";
while the one below is ok
stud.name.FirstName = "zai";
why??
if I was not using an IClonable interface both of them work....but im not sure its an IClonable issue...
is there any rule that says that we souldnt access inner variables through a property of that object?
|
|
|
|
|
stud.Name.FirstName = "zai"; doesn't work because of the getter for the Name property. There you clone the field name and return this newly created instance. Afterwards you assign a new first name to the clone instance, which cannot reflect in the field of your StudentInfo instance as your operating on another instance of Nameinfo.
So if you clone a field inside a getter before returning it, you actually protect it from be changed by any outside code.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi. I'm developing a client application that sends xml files as DIME attachments to a web service. I use WSE 2.0 for that.
In order to fix some bugs it is almost imperative to me to see how the whole SOAP request looks like(the SOAP envelope and the attachmets), and also the SOAP response from the server.
I did some research and found out that WSE 3.0 has just such a feature, to write incoming and outgoing SOAP messages to trace files on the disk. But unfortunatelly I am forced to use WSE 2.0 because the web service can only handle DIME attachments and WSE 3.0 has no support for DIME.
So, what other ways are there to view the SOAP request/response contents?
Any ideea would be greatly apreaciated.
Thanks.
LATER EDIT: It turns out that WSE 2.0 also has this tracing facility, but I can't use it because my project must also use WSE 3.0 and even though references to both Microsoft.Web.Services2 and Microsoft.Web.Services3 are added to my Visual Studio 2005 Project if I right click the project name in Solution Explorer, at the bottom of the context menu I only have "WSE 3.0 Settings" (no WSE 2.0 whatsoever).
Is there any way to get the SOAP request context programatically using some of the classes in WSE?
What can I say... Life is complex and has so many aspects.
-- modified at 2:25 Wednesday 10th January, 2007
|
|
|
|
|
Hi,
In Windows Application .Net2.0.
if i create a form object.
so how to check form object created or not .
arrgent.
Thannks
|
|
|
|
|
How do you mean ? If it's been shown, or if the class exists ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|