|
Thanks a lot folks!
That was exactly what I was looking for.
|
|
|
|
|
Hi,
I have a user control in a window form. In user control i have a button.
On click over this button i want to change the window form label text.
How i can do it ?
I am new to c#. please help
|
|
|
|
|
delegates and events .
It's too difficult to explain in short text, but you can look up examples on google or MSDN.
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|
|
I think the simplest way is:
1- add a usercontrol to your project
2- add a button, named in Button1 to your usercontrol, set Button1 "Modifiers" property to Public.
3- build your project.
4- after adding your user control, named in UserControl1 to your form, add this lines of code:
-------------------
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AddHandler UserControl1.Button1.Click, AddressOf Button_Click
End Sub
Private Sub Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
'do your task here
End Sub
-------------------
5- what you wanted is done
|
|
|
|
|
Unknown C# dialect.
Luc Pattyn
|
|
|
|
|
add these line of code to your form:
private void Button_Click(object sender, System.EventArgs e)
{
// do your task here
}
then in your form load event add:
UserControl1.Button1.Click += new System.EventHandler(this.Button_Click);
|
|
|
|
|
Sure.
I think I understood the first time.
My remark was it did not really look like C#, the subject of this message board.
Luc Pattyn
|
|
|
|
|
Hello,
Here some code for the suggestions from "V".
UserControl code:
public event EventHandler ButtonClickChanged;
protected virtual void OnButtonClickChanged(System.EventArgs e)
{
if (ButtonClickChanged != null)
{
ButtonClickChanged(this, e);
}
}
private void button1_Click(object sender, System.EventArgs e)
{
OnButtonClickChanged(System.EventArgs.Empty);
}
Forms code:
public Form1()
{
InitializeComponent();
userControl11.ButtonClickChanged+=new EventHandler(userControl11_ButtonClickChanged);
}
private void userControl11_ButtonClickChanged(object sender, EventArgs e)
{
}
Hope that helps!
All the best,
Martin
|
|
|
|
|
I just tried to generate some XML documentation for my project. The output is great as far as it goes but it's not very readable. Is there a tool like JavaDoc or doxygen available for .NET?
I tried to look into nDoc but the last reference to anything on their site was from 2004.
TIA
Russell
|
|
|
|
|
The NDoc project has stopped further development. The last official version supports .NET 1.1 only, but there are unofficial hacks that support .NET 2 roughly.
MS has Sandcastle in beta.
Sandcastle[^]
I don't know when it's due for release. Apart from that there are one or two commercial tools around. But I assume you are after free or open source?
|
|
|
|
|
for the immediate future it needs to be free or open source as getting money out of the bean counters seems almost impossible at the moment. It's a shame that a community project like NDoc has halted. I'll be taking a look at Sandcastle this evening.
Thanks
Russell
|
|
|
|
|
Take a look at this article here on CP: Sandcastle Help File Builder[^]
"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
|
|
|
|
|
thanks,
i'll be taking a look this evening
Russell
|
|
|
|
|
Hi there!
I wrote an application which is used over network on a fileserver. It's lying there and every user starts it from that share. To do that I found out that I have to change the CodeGroups in the .NET-Configuration of the client-machine. I'm using the Strongname for my application and its DLLs. That works fine but there are so many clients which have to use my application. Is there any way to simplify that? I know I could use those Deployment Packages but I'm afraid to modify some other existing CodeGroups of some client machines. So I need to know
a) if there's any way and how it works to make a Deployment Package of just my CodeGroup and not every existing CodeGroup
or
b) if there's any way and how it works to solve this problem from server side. Maybe setting a CodeGroup from there so the clients don't need to do anything or something like that.
Thanks for reading even if you can't help me.
-- modified at 12:16 Tuesday 6th February, 2007
|
|
|
|
|
w0schd wrote: It's lying there and every user starts it from that share.
Why?
led mike
|
|
|
|
|
Because my customer wants it that way.
|
|
|
|
|
Sorry I can't help you solve the problem of stupid customer relationships beyond pointing out that it is the actual problem that denotes a non-technical solution.
led mike
|
|
|
|
|
Yes, you're right - you really didn't help me to solve my problem.
|
|
|
|
|
Probably a stupid question given your circumstances but did you guys consider using one-click deployment via a web page?
w0schd wrote: a) if there's any way and how it works to make a Deployment Package of just my CodeGroup and not every existing CodeGroup
Don't know much about deployment packages but if you did an installer (MSI, Windows Installer) you could of course accomplish anything you need. In both cases however doesn't that end up with the EXE being installed on the client machine? So they would no longer be running it from a shared drive over the network and you said that was a requirement.
led mike
|
|
|
|
|
|
Yehaw! I found a solution by myself:
http://www.microsoft.com/germany/msdn/library/net/FullTrustFuerAssembliesMitCaspolExe.mspx?mfr=true
With this I created a batch script which can be run from the same location my application lies and it just adds the policies I need (trusting the signed key of my company). So any user which wants to run my application over network just hast to run this batch file one time before the very first launch of my application on his machine and everything works fine. Thanks anyway!
|
|
|
|
|
Dear All,
my imran, i am bit new to dotnet world, i have been assigned a task of uplaoding crytal report(built report). And create appropiate menu where that report can be accessed. i want to do it using C#. please guide me
thanks
regards
imran khan
|
|
|
|
|
hi,
In my solution contains five projects.
In one project i have progress bar.I want to increase progress bar value from other project.
help me out ,it's arrgent
Thanks
|
|
|
|
|
By project, do you mean seperate applicaitons? You want to update the progress bar in one running application from another? If this is correct the first question is why??? IMO you should come up with a btter design.
only two letters away from being an asset
|
|
|
|
|
Can any one tell how to get the username and password from the windows login, for processing inside a c# windows application.
Thanks in advance,
regards,
VijayaRam
|
|
|
|