|
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
|
|
|
|
|
You cannot get the windows password.
|
|
|
|
|
Or tell me how to get windows username
Thanks and regards,
VijayaRam
|
|
|
|
|
you can use System.Environment.UserName
|
|
|
|
|
It isnt possible to get the user password, however you can validate it using the follow api call
const int LOGON32_LOGON_INTERACTIVE = 2;
const int LOGON32_PROVIDER_DEFAULT = 0;
[DllImport("advapi32.dll", SetLastError=true)]
private static extern bool LogonUser(String lpszUsername, String lpszDomain, String lpszPassword, int dwLogonType, int dwLogonProvider, ref IntPtr phToken);
private void DoLogonCheck(string userName, string domainName, string password)
{
IntPtr phToken = IntPtr.Zero;
bool logonRes = LogonUser(
userName,
domainName,
password,
LOGON32_LOGON_INTERACTIVE,
LOGON32_PROVIDER_DEFAULT,
ref phToken);
if (logonRes)
{
Console.WriteLine("Good logon with username : {0}", userName)
}
else
{
Console.WriteLine("Bad logon with username : {0}", userName)
}
}
I use a similar piece of code to validate that the user true user is sat in front of the machine and not that they have left it unlocked.
|
|
|
|