|
Hi,
Using Visual Studio 2003.
I'm calling a method located in Form1 from Form2.
I'm doing it by creating an object of Form1
Form1 myForm1 = new Form1();
myForm1.MethodToCall();
I originally made the method static (to call on it), but this method calls on another method and variables, so it seemed easier to create an object in Form2.
The problem I'm having is:
In the method I'm calling, I have code to change the text of a label control.
The label text is not changing and it looks like I need to declare
the label as "static"... is this correct? If so, is it possible to set this (label to static) in Visual Studio Properties Window, or do I need to create the label code myself in order to use static on a label?
thanks,
Ron
|
|
|
|
|
label control is on which form?
rahul
|
|
|
|
|
Hi rahul,
The label I want to change is on Form1.
Setting the label to public did not help.
Ron
|
|
|
|
|
there doesn't seem any problem in ur code. just try to set the label as public.
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
Hi sAqib,
Yes, the label is set to public. Could the problem be that label properties are placed in the constructor by default? It only seems to work if "static" is used and the label properties are set in the FormLoad event. What you think?
Ron
|
|
|
|
|
Please read this from MSDN.
In .NET Compact Framework applications, the following options are supported but not working and are currently reserved for future use: AcceptConnection, ReceiveLowWater, ReceiveTimeout, SendLowWater, SendTimeout, and Type.
I am trying to set ReceiveTimeout using SetSocketOption, but throwing exception.
Pls advise the alternate way to set socket receive timeout.
Thanks
Aruna
|
|
|
|
|
My project has to run a Setup.msi. The Setup.msi includes many steps and it require click NEXT for every step. Now, I want it automated, it means Setup.msi still run and install but I needn't to click any thing. I don't know how to coding in C#. Please help me.
Thanks.
|
|
|
|
|
you need to cast the dataitem to it's correct type, VB.NET does that for you automagically.
|
|
|
|
|
Thanks,
But i have already done the casting of dataitem, but my question is how to call method CreateChildView in c#.net.
is there any such method is there or not?
Thanks and Regards,
Jay Khanpara
|
|
|
|
|
If you've cast it, then it will no longer regard itself to be of type 'object'.
Christian Graus - C++ MVP
|
|
|
|
|
Hi, I am new to C# and cannot find an example in VS 2005 to help me solve the problem. I have an Image Report Item in a Local Report called Image1. I created a bitmap called mybmp in my project. I drew a graph in mybmp and can view it after using mybmp.save(not required)
I have to link mybmp to the value property of Image1
May be we have to use a report parameter, but I can't seem to get it right. Thanks
Ramith Sivanarain
|
|
|
|
|
Hi ,
I have the following query:
1) I would like to copy part of Bitmap Image.
2) The area I need to copy is Polygon from Source Bitmap file.
3) The C# System.Drawing.Graphics class library supports DrawImage
function but with this we can able to copy the Rectangle Area of the
Image.
4) If anybody knows logic or having C# code for how to copy polygon , Tilted
rectangle etc. from Source Image to destination Image, please let me know
the Logic or share the source code.
With thanks ,
Sachin Aslekar
[email : sachin.aslekar@wipro.com]
|
|
|
|
|
You can't create a bitmap that isn't rectangular, it's just not possible. Best you can do is copy a rectangle, and then fill the outer parts that don't conform to your polygon with a solid color so you can draw the shape using DrawImage and a transparency mask in an ImageAttributes object.
|
|
|
|
|
Hi Christian ,
Thanks for your reply.
I am trying to copy the part of Image pixel by pixel.
The source area is tilted square and destination is normal square.
Source and dest. area , both are same.Bit currently struggling with
the geometric calculations for the source [tilted square].
Thanks for help.
Regards,
Sachin Aslekar
|
|
|
|
|
You probably want then to look at my image processing articles for info on direct pixel access, so you can do this by hand.
|
|
|
|
|
Hi All,
Want to know abt Adobe Flex 2 to avoid Postback in .net C# instead of Ajax.
not able to find any help/code snippet for the same.
Would appreciate if anyone could help...
Regards,
Yogesh J.
|
|
|
|
|
Hi there,
I'm trying to change a password in Active Directory using C# & ASP.NET, I've tried 2 ways but can't get it working.
Method 1
---------
The conn.SendRequest() method raised a DirectoryOperationException (the server is
unvailable). However the server is available.
try
{
LdapConnection conn = new LdapConnection(serverName);
conn.Bind(new NetworkCredential(userName, currentPassword, domainName));
DirectoryAttributeModification deleteMod = new DirectoryAttributeModification();
deleteMod.Name = "unicodePwd";
deleteMod.Add(GetPasswordData(currentPassword)); //encrypt
deleteMod.Operation = DirectoryAttributeOperation.Delete;
DirectoryAttributeModification addMod = new DirectoryAttributeModification();
addMod.Name = "unicodePwd";
addMod.Add(GetPasswordData(newPassword));
addMod.Operation = DirectoryAttributeOperation.Add;
ModifyRequest request = new ModifyRequest(userName, deleteMod, addMod);
DirectoryResponse response = conn.SendRequest(request);
conn.Dispose();
}
catch
{
throw;
}
Method 2
--------
de.Invoke raises a DirectoryServicesCOMException (an invalid dn syntax has been specified)
string strADSIPath = @"LDAP://CN=username,DC=companyname,DC=net,DC=au";
DirectoryEntry de = new DirectoryEntry(strADSIPath);
try
{
de.Invoke("ChangePassword", new object[] { currentPassword, newPassword });
de.CommitChanges();
}
catch
{
throw;
}
de.Close();
I can't work it out, any help would be greatly appreciated,
Cheers,
Ron.
|
|
|
|
|
I am looking for something exactly like the following: http://www.phpmyfaq.de[^]
But in C#
Anybody got a clue where to even look?
Thanks!
Christian
|
|
|
|
|
|
Gee Whiz... I never thought of that, thanks for the info...
I mean, do you really think it was worth your time to even reply?
It is a serious request, there are not many places that cater to C# open source projects.
|
|
|
|
|
Thiswould seem to indicate that it's not that hard.
Source forge has heaps of C# projects, also.
|
|
|
|
|
I am very aware of this fact. However, the set of projects that are there do not fit the description.
It may not be that hard to browse, but it if it isn't there, then you will never find it. I have looked and it is not there. That is why I am asking the community. If you do not know, then do not reply.
|
|
|
|
|
Ah, serious requests require serious answers. Have you tried ask.com?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Hello,
I've read the following article:
http://support.microsoft.com/default.aspx/kb/319401
It's very easy and working very well on my test project.
The problem is, on my project I've Groups on my ListView (Folders, HTML Files, and so on...) and when I applied the code it didn't work.
Can you please tell me what I'm missing?
Your help would be greatly appreciated.
|
|
|
|
|
Hi all,
Iam learning C and
I need help with string functions in C. Though this board is on C#, I thought someone should help me on C (which is the standard C).
Eg.,
const char *str1 = "Apple+Orange+Pineapple";
I need to crack the list above and get them as three different strings like
str2 = Apple
str3 = Orange
str4 = Pineapple
The "+" sign separates them.
How do I do it? Can anyone help? Thanks in advance.
|
|
|
|