|
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
|
|
|
|
|
iam working in c# 2005
i have mdi form when i try to open child form in it it's open in maxmizied state instead of i chane it's properites to windows state=maxmizied
and in the form load i write this code
"this.WindowState = FormWindowState.Maximized;"
notes
the form right to left =yes "it's client requirement" even if i chane this properites the same problem occurred
what is the soulations ?!!!!!!!
ma_refay
|
|
|
|
|
I'm not sure of what you're asking. You can set the initial state in the properties in the designer.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
i initial state form windows state in the properties in the designer but it's execute it it's take the size when apper in the desgin view not maxmizied it even if i set it's properites in designer
ma_refay
|
|
|
|
|
Hello!
I am having a problem with .net remoting.
I have searched Microsoft documents, but got no hints.
When the server is accessed by remote client, it turns to be proxy : OK
All instances <b>new inside the server class</b> stay native--direct call : OK
All references <b>passed to the server class</b> turns to be TransparentProxy : Why ? Is it because the reference is outside the server object memory segment ? But they are in the same app domain--real object out there.
Technically,
<code>
class Server : MarshalByRefObject {
ListBox myList = new ListBox(); // stay native--direct call
ListBox hisList; // turns to TransparentProxy
public Server(ListBox list) {
hisList=list;
... // open port, listen to client request
}
}
class MyForm : System.Windows.Form {
public MyForm() {
...
new Server(listBox); // start the server
}
}
</code>
Your comments would be very helpful. Thanks.
Sovann
|
|
|
|
|
When you start a file conversion process in iTunes (programatically, through the COM interface), it hands you back a status object. You can poll that status object for progress data, or you can create event handlers and that object will raise progress events for you. Hence:
iTunesConvertOperationStatus itcoStatus = null;<br />
...<br />
<br />
itcoStatus = iTunesApp.ConvertFile2(strPath);<br />
...<br />
<br />
itcoStatus.OnConvertOperationCompleteEvent +=new (shortened)_OnConvertOperationCompleteEventEventHandler(itcoStatus_OnConvertOperationCompleteEvent);
My question is: once I've bound the event handler to the instance of the object, can I call:
itcoStatus = iTunesApp.ConvertFile2(strPath)
over and over without first releasing the handler? Or do I have to wait for the Complete event, release the handler, call ConvertFile2(), and rebind the handler each time?
|
|
|
|
|
As long as the iTunesApp object is instantiated and you don't create a new instance of it each time, the event handler will stay bound until you release it.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
do you mean the itcoStatus object? The event handlers (in this case) aren't bound to the iTunesApp object.
Which bring up my point: if I simply keep overwriting the itcoStatus object with a new instance (not explicitly releasing the old instance) are the handlers bound to the new instance? Or did they become defunct when the old instance was stomped?
I realize my terms aren't very technical here, which reveals my real lack of knowledge about "instances"...
|
|
|
|
|
JoeRip wrote: do you mean the itcoStatus object?
Yes, I did mean the itcoStatus object. I guess I wasn't paying close enough attention to your example code.
JoeRip wrote: if I simply keep overwriting the itcoStatus object with a new instance (not explicitly releasing the old instance) are the handlers bound to the new instance? Or did they become defunct when the old instance was stomped?
Yes, if you overwrite the existing instance of the object with a new instance (by repeatedly calling itcoStatus = new iTunesConvertOperationStatus() you will loose the event handlers. Each time you call new you are creating an entirely new instance of the object.
In your example code, the first line:
iTunesConvertOperationStatus itcoStatus = null;
defines a variable named itcoStatus whose data type is a itunesConvertOperationsStatus object. When you then run code like this:
itcoStatus = new iTunesConvertOperationStatus()
you create a specific instance of that object in memory. The itcoStatus variable holds a reference (essentially a pointer) to the memory used by that instance. Each time you call new you get a new instance, which means you potentially get a different portion of memory so the itcoStatus variable ends up with a different reference.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Dear all ,
i am making web application using C#, asp.net2.0(visual studio 2005) and sql2000, i want to know how can i securly pass password value from
client to server. PLease guide me.
Thanks
regards
imran khan
|
|
|
|
|
There is no 100% secure way. You should never pass the password around anyway, compare its hash value. There are plenty of resources here and elsewhere that cover this.
only two letters away from being an asset
|
|
|
|
|
do a search for terms like "challenge response" "salted hash" the subject is very complex and you should read as much as you can before implementing a solution as very subtle changes in the way you implement things make massive differences to security.
HTH
Russ
|
|
|
|
|
I want to get the error number when a exception occurs and i catch using the try {.. } catch {..} method.
i hav given like
catch { Exception ex}
{
}
but i didnt find any property of ex that gives me error number
Please help
REgards
Hari
|
|
|
|
|
Exceptions are string messages. You need something like ex.Message which gives the text message of the exception. Hope this helps you
|
|
|
|
|
There is no error number. .NET uses exceptions instead of error codes, with good reason. The exception defines the error, why return a code which, you hope, the user can turn back into an Exception so that it contains meaningful error. No code can give a call stack - it's a step backwards.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|