|
eggie5 wrote:
I don't understand what you want me to do with ....
this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
Move it to the constructor, just after InitializeComponent();
Alexandre Kojevnikov
MCAD charter member
Leuven, Belgium
|
|
|
|
|
I would suggest the delegate part 2 article on this site
|
|
|
|
|
eggie5 wrote:
on the Event Handler line, what is the += doing?
The idea between events and delegates here is that when your timers tick event is fired you want to register a new method to be called, hence a callback function which is defined under .NET as a delegate. Essentially there is a linked list of functions that allow you to either += add or -= remove delegates from the chain. You should probably just specify the event/delegate within your constructor code, there is no reason to re-register this everytime.
-Nick Parker
|
|
|
|
|
Hi,
I want to know something about remote installation of a .NET project(C#). I want my setup files(.exe,.msi etc) to reside on the webserver and when a certain user goes to a certain url that points to the location of the installation files, the online installation starts. If ever u would have come across the online installation of yahoo messenger, well that is what i want to achieve. How can that be done. Does .NET provide any means to do this or there is some java script for this? Please tell me step wise.
|
|
|
|
|
I think Y! does that with the help of activex controls, you can write one in VC++ if you want to achieve the same.
For c# you can take a look at the updater application block, I haven't gone through it, but I believe this was created to auto-update applications from a web server
http://msdn.microsoft.com/library/en-us/dnbda/html/updater.asp[^]
p.s you are hurting my eyes with your post, there is no need to put all of the stuff in all bold
Cheers,
Kannan
|
|
|
|
|
Hi,
Recently, the User Interface Process Application Block made by Edward Jezierski (Microsoft Corporation), Michael Stuart (Microsoft Corporation), Lin Joyner (Content Master Ltd), and Pablo Cibraro (Lagash Systems) was released by Microsoft as part of their Application Blocks for .NET.
Since I'm a currently implementing a MCV pattern in our current application I badly needed to study UIP Application Block. But the UIP Solution is in VS.NET 2003 format, so I migrated all the code and created a Solution that can run on VS.NET 2002. So far I have a working copy of the UIP Application Block Source Code (with one migrated example) that runs pretty well in VS.NET 2002. I have studied the code and since we are using windows form, rather than ASP, I have no choice but to create a struts-like controller to suit are project's core engine.
In order not to put my effort to waste, I'm sharing the migrated solution to anyone interested to study/implement further the UIP using VS.NET 2002.
Just reply to this post if you need the code.
for more details on UIP (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/uip.asp)
|
|
|
|
|
Hi,
How can I do similarity detection in .NET? The main question is how to calssify two related news.
Any idea?
Nothing
|
|
|
|
|
|
leppie wrote:
42?
Maybe the infinite improbablity drive would work in this situation?
iid[^]
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
What is a quick way to get the size of a file?
/\ |_ E X E GG
|
|
|
|
|
Really quick example (the FileInfo class provides a Length property to identify the size of the current file):
string dirName = "C:\\";
DirectoryInfo dirInfo = new DirectoryInfo(dirName);
Console.WriteLine("{0} contains the following files:", dirName);
Console.WriteLine("Size\t Filename");
foreach (FileInfo fileInfo in dirInfo.GetFiles())
{
try {
Console.WriteLine("{0}\t {1}",
fileInfo.Length, fileInfo.Name);
}
catch (IOException e) {
Console.WriteLine("\t {0}: {1}", fileInfo.Name, e.Message);
}
}
-Nick Parker
|
|
|
|
|
thanks for the quick response.
that's just what I needed.
/\ |_ E X E GG
|
|
|
|
|
Hi! I have a interesting question : but i don't know !
Main()
{
Form fm = new Form();
fm.Show(); --> (1) ( or fm.ShowDialog() --> (2) )
Application.Run();
Application.Run(new Form()); --> (3)
}
What is difference between (1) , (2) and (3)? thx!
|
|
|
|
|
No. 3 create a new thread of your application but number 1 and 2 create child forms,so not new thread of appplication.
For number 1 and 2 from MSDN:
ShowDialog:
Shows the form as a modal dialog box.Show:
Show:
Showing the control is equivalent to setting the Visible property to true. After the Show method is called, the Visible property returns a value of true until the Hide method is called.
Mazy
No sig. available now.
|
|
|
|
|
1 shows it modeless, 2 shows it as a dialog box (modal) and 3 doesn't show it all.
What would really be amazing is if you wrote that code asnd using a debugger you tested it out yourself.
|
|
|
|
|
currently have a tree menu that allowes nodes to be added and selected, however i am trying to make it so that the parent/root node can't be selected.
to achieve this i have been through if statements but if anybody could post some code it would be most helpful!
thanks in advance
|
|
|
|
|
a) Add an event handler for the TreeView.BeforeSelect event.
or
b) Override the TreeView.OnBeforeSelect method of your TreeView-inherited control.
Then, check the TreeViewCancelEventArgs.Node property and set TreeViewCancelEventArgs.Cancel to false to prevent selecting the node.
Example:
private void treeView_BeforeSelect(object sender, TreeViewCancelEventArgs e)
{
TreeNode parent = e.Node.Parent;
if (parent == null)
{
e.Cancel = true;
}
else if (parent.Parent == null)
{
e.Cancel = true;
}
}
|
|
|
|
|
cool thanks will give it a try
|
|
|
|
|
Hi all,
first i tried using ADO
<br />
ConnectionClass connection = new ConnectionClass();<br />
CommandClass command = new CommandClass();<br />
RecordsetClass rs = new RecordsetClass();<br />
<br />
connection.Open("Provider=msdaipp.dso;Data Source=http://pandora/radar", null, null, -1);<br />
<br />
command.ActiveConnection = connection;<br />
command.CommandText = @"select ""DAV:displayname"" from scope('deep traversal of ""/radar/documents""')";<br />
<br />
ArrayList list = new ArrayList();<br />
try{<br />
rs.Open(command, null, ADODB.CursorTypeEnum.adOpenUnspecified, ADODB.LockTypeEnum.adLockUnspecified, -1);<br />
<br />
while (!rs.EOF){<br />
list.Add(rs.Fields[0].Value);<br />
}<br />
}<br />
catch(Exception e){<br />
throw new Exception(e.Message, e);<br />
}<br />
but this always fails with a (an ambigous and unhelpful)exception from a sharepoint dll from the rs.Open line.
I was thinking their might be some security problem happening.. but theres no way to know. I've run similar code from my machine in a Word macro and it worked fine.
Anyone tried this?
[worldspawn]
|
|
|
|
|
:-OHi:
Does anyone know how to automate tasks like (New Project Creation, Build Solution etc..) in a C# Console Application.
Nivitha
|
|
|
|
|
im trying to implement the algorithm of RSA for fun...but im having a problem with the mod function in .net returning the wrong values.
the algorithm im using is.
Encrypt: value^e mod PQ
Decrypt: (x^e mod PQ)^d mod PQ= value;
A implementation i use is hard coded...and i have varifyed the values with the windows calculator and found that the awnser is returned correctly. Here is where is the code with the problem
<br />
double E = 17 ; <br />
double D = 2753;<br />
double PQ = 3233;<br />
double P = 61 ;
double Q = 53 ;
int i = Math.Pow(123,E)%PQ;<br />
May it be that my chosen key pairs and primes are in correct ? Thanks for your time peoples
Jesse M
The Code Project Is Your Friend...
|
|
|
|
|
I think the problem is arising because you are using doubles to store your values. The number 123^17 probably can't be stored exactly as a double. You should use a BigInteger class that can hold as many bits as you want for your encryption algorithm.
Check out this article for some good info on implementing a BigInteger class:
http://www.codeproject.com/csharp/BigInteger.asp[^]
Using that class you will get the correct ciphertext (855) with this code:
BigInteger e = new BigInteger(17);
BigInteger d = new BigInteger(2753);
BigInteger p = new BigInteger(61);
BigInteger q = new BigInteger(53);
BigInteger n = p * q;
BigInteger P = new BigInteger(123);
BigInteger C = P.modPow(e, n);
|
|
|
|
|
Anyone know how to do this????
|
|
|
|
|
what do you mean by database labels?
|
|
|
|
|
Can someone please answer me a question??????????
I am trying to create a deployment project. Under the Launch Conditions window, I am trying to do a registry search to make sure that DirectX 8 is installed. The registry key is as follows:
Software/Microsoft/DirectX
Under the Key, there is "Version" under the name column and "4.08.01.0810" under the data column. Under the Launch Conditions, in the properties, I type Software/Microsoft/DirectX under the RegKey property. The problem is that under the value property, it seems to only want to work with Name properties and not value Properties. For instance....it will detect DirectX if I type "Version" in the value property. It will not detect DirectX(even though it exists) if I type 4.08.01.0810 in the value property. How can I effectively detect DirectX version in the registry????????????
Someone please help,
Thanks,
Kendal
|
|
|
|