|
I am actually making most of the code by hand, not using VS2005 to do the auto coding...
If I use VS2005 to auto code then it allows me to do it how you say. How do I do it by hand?
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
All VS does is put a member variable with that name and type in your code behind. If you do that, the framework will attach it to the control in the aspx and you can do just what I said from there.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi All,
I definition of .NET FRAMEWORK - all class object ( except int, char and ext. ) are sending to function as reference.
So in witch case i need to use ref/out in declaration of function ?
Thanks for any help.
|
|
|
|
|
Yes class objects are sent by reference.
using the 'ref' keyword would just result in the exact same thing - namely sending the object by reference.
using the 'out' keyword on the other hand is for forcing the parameter into being set within the method. So if you made a virtual class or an interface with a member class referencing a parameter with the 'out' keyword, it would force any class inhereting your class / interface to set a value to the parameter. Failing to do so would result in a compilation error.
Hope that makes it a bit clearer.
-Larantz-
|
|
|
|
|
Larantz wrote: using the 'ref' keyword would just result in the exact same thing - namely sending the object by reference.
No, it doesn't result in the same thing. It results in the reference being send by reference. What is sent is a reference to the reference to the object.
---
single minded; short sighted; long gone;
|
|
|
|
|
All parameters are sent by value, unless you specify ref or out . For a reference type that means that the value of the reference is sent.
You would use ref or out if you need to change the actual reference of the object, not just the contents of the object.
You rarely ever need to use ref or out . It's used sometimes for performance reasons.
---
single minded; short sighted; long gone;
|
|
|
|
|
value types ( that is, int/double/etc ) are not passed by reference unless you use ref. out and ref do exactly the same thing in MSIL, the difference is, the compiler won't allow any execution paths where an out variable is not given a value.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi
i am working in a parent child form environment.
i have a function in the Parent Form
publib void call_funct()
{
panel2.Visible=true;
}
now when i access this function from Child form, the code within the function is accessed(i've checked it through applying breakpoints), but there is no effect of the code.
what i mean is that panel2 doesn't become visible.
how do i correct this??
thanks for the time
Saira
|
|
|
|
|
If you have instanciated your panel2 within the parent form like:
MyChildFormClass panel2 = new MyChildFormClass();
then you'll make it show by calling the Show() method:
public void ShowChildForm()
{
panel2.Show();
}
but if it's a normal usercontrol like System.Windows.Forms.Panel then you'll
make it show by:
public void ShowPanel()
{
this.SuspendLayout();
panel2.Size = new Size(sizeX, sizeY);
panel2.Location = new Point(ptX, ptY);
this.Controls.Add(panel2);
this.ResumeLayout();
}
-Larantz-
|
|
|
|
|
ur code isn't woking for me.
anyway
thanks for ur time
Regards
Saira
|
|
|
|
|
publib ???
Is panel2 sitting inside another control that is not visible ? Is it within the visible area of the form ? How was it created ? Is it part of the forms controls collection ?
Saira Tanwir wrote: accessing control of one form from another form
You should never do this. If you want to change the behaviour of a control on another form, you should expose a property that sets what you want, such as
public PanelVisible
{
get { return panel2.Visible;}
set { panel2.Visible = value; }
}
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How to move an icon that is on the desktop at some position.
C#
|
|
|
|
|
Hi,
the easy way is using Windows desktop, i.e. interactively.
Programmatically it is a rather complex job.
It involves:
- finding the right window (the desktop icons are all inside a listview which you could access
on WinXP by finding first "Progman" then "SHELLDLL_DefView" then "SysListView32").
- finding the right icon (if you know it by name, you could enumerate them all to find its
index in the list.
- sending it an LVM_SETITEMPOSITION message using SendMessage
All of the above require calling win32 functions from user32.dll with PInvoke.
You'll have to do a lot of searching both on CodeProject and on MSDN and/or Google.
|
|
|
|
|
Hi,
I'm new in c#,
Ihava dummy question about how to termite button events.
Sample
If Usernam.text<>'' then
press "button" let me to next field
if username.text='' then
press button diable for nex field
tnx
Dani
|
|
|
|
|
You should make the buttonNext disabled as default.
Then in your textbox' "content changed" event method you could do something according to the following:
private void textboxUsername_ContentChanged(object sender, EventArgs e)
{
if(textboxUsername.Text.Equals(validUsername))
buttonNext.Enabled = true;
}
Hope it's of some help to you.
-Larantz-
|
|
|
|
|
Hy...
Can anybody tell me if it's possible to rotate a TextBox.
And if is possible if I catch right-bottom corner and resize it to negative part.
10x
|
|
|
|
|
Nope. You'd have to write you own implementation that supports this, complete with all the drawing code. Or, find a 3rd party library that supplies a textbox that does this. I don't know of one myself.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I want set password for folder in C#.net how?
and How do I know the contents of the file DLL and EXE?
I want to answer as soon as !!!!!!!!!!!!!1
yasofy
|
|
|
|
|
AL-yasofy wrote: I want set password for folder in C#.net how?
You can't. NTFS doesn't support individual passwords for folders.
AL-yasofy wrote: How do I know the contents of the file DLL and EXE?
Read it's documentation or open it using a utility like Depends.
AL-yasofy wrote: I want to answer as soon as !!!!!!!!!!!!!1
Impatient little snot, aren't you? This is a forum environment. The people here answer questions for free when they can, not when you demand it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I ask how can change background folder
and how hiden folder
and
share folder
all this in C#.net
yasofy
|
|
|
|
|
AL-yasofy wrote: ask how can change background folder
"Background folder"?? What does that mean?
AL-yasofy wrote: how hiden folder
Use the File.GetAttributes[^] method to get the directory attributes, than you modify them and write them back with the SetAttributes method.
AL-yasofy wrote: share folder
You'll have to use WMI classes and methods to create a new share using the Win32_Share[^] class. The .NET Framework doesn't have any support for creating and managing shares directly.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi I have made an small application in C# from the book Network Programming with C# and VB.Net for capturing packets. Now my question is that author has shown application for a single machine but what if I want to do the same for a LAN where in from the server side i can get the traffic of clients is it possible in .Net using Raw Socket Capturing or Will I have to use WinPcap ? I would be happy to see your reply thanks.
|
|
|
|
|
vighu wrote: what if I want to do the same for a LAN where in from the server side i can get the traffic of clients
In todays switched networks, this isn't really possible any more. The switch has to do the packet sniffing and forwards the captured packets to a listen specifically setup to do so.
If your case, if your sniffer is running on the server, you can only see the packets comming to or leaving the server. You can't see, without some help from the switch, any other traffic.
WinPcap supplies a ready made library to do raw packet capturing...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Where can I find the above class in the .NET framework v2? It used to be at: System.Security.Cryptography.Xml.XmlDsigC14NTransform but not on my PC or my PC at work both running VS2005?
|
|
|
|
|
Are you sure your current project references the system.security.dll that contains this class?
"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
|
|
|
|