|
thx for the tip
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
hi all
i want 2 create an admin form by which admin can create user id nd password nd can assign d specific module of master page menu 2 aspecific user in ASP.net c#
manisha varshney
|
|
|
|
|
Sounds kind of asp.nety if you ask me...
|
|
|
|
|
Hi
I need to build chat program that will work in internal LAN
something like Messenger
where I can get sample code or help ?
thank's in advance
|
|
|
|
|
E_Gold wrote: where I can get sample code or help ?
Google.[^]
hmmm pie
|
|
|
|
|
Can you explain for me how can I create a tree in C# using this structure?
struct tree{
int num;
tree a[];
}
|
|
|
|
|
Hi.
How can we define a Shortcut key for a button ?
Thanks.
|
|
|
|
|
The usual way is to select one of the characters in the Text for the button and precede it with an ampersand.
For example, if the text you want for a button is 'Exit', typing it in as 'E&xit' causes the 'x' to be underlined and it automatically becomes the shortcut, 'Alt-x'.
I don't know of another way, although others might.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Great, thanks.
What about Ctrl + x ?
Could we define it in the same way ?
|
|
|
|
|
Not as far as I know. Sorry.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Oh no problem, thanks a million
|
|
|
|
|
To get the functionailty you would need to set the Form's KeyPreview property to true, and use one of the form's Key events - KeyDown / KeyPress / KeyUp - and call the desired Button's PerformClick method when your Modifier+Key combination is detected.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Excellent, I've done it. it works
|
|
|
|
|
Hi Guys,
I am creating a console application with certain systametic programming agenda, which will build a text file using the StreamWriter property. However, I want that before the text file is created on the execution of the console application, the user is shown a MessageBox asking for confirmation. Is is possible to display Message Box from within a Console Application?
Thanx for taking interest in my question,
Your help will be truly appreciated,
Rajdeep.NET
|
|
|
|
|
I think that the MessageBox is available when you add a reference to System.Windows.Forms , but then you're using a Windows UI-element on the console. You might want to consider replacing your MessageBox-functionality with ReadLine() and WriteLine statements
I are troll
|
|
|
|
|
Hi,
I don't know from which heaven I got this idea of storing last modified time in side the XML file, as a node. But I will tell you why I need this, and can you tell me how am I suppose to do it.
I want to prevent user to hack my file, they shouldn't be able to modify it and save it. If they do that, I delete that file and recreate a newer one.
(Like giving monkey a banana locked inside a transparent box, he can see it but can't eat it )
But to accomplish this I need to store the last modified time in the file and on save do not modify the last modified time.
If I am sounding crazy, let me know I will explain with an detailed example.
Thanks for you Precious time,
Karmendra
|
|
|
|
|
I got it, this,
File.SetLastWriteTime(FileName,LastWriteTime); would do the job.
Thanks.
|
|
|
|
|
That might only stop casual users, and it could cause the file to be deleted even if no changes were made.
I can write something that does the same thing and bypasses your "security".
You would likely have to store the date somwewhere inaccessable.
Or encrypt the date and a hash of the file or something.
I wouldn't bother trying to "secure" the file this way. Even Visual Studio doesn't. When I modify a file (even project files) with Notepad it merely asks if I want to reload the file and accept the "unauthorized" changes.
|
|
|
|
|
I am doing this not for cs files but my own configuration file, and it is not if user see the data but if he modifies it it will be replaced with default. i am storing a checkbox value true or false. Actually I am no good with encryption, I wasn't able to choose one to use.
I actually don't want the user to modify the config file outside of my application.
Can you tell me other ways to prevent it?
Thanks for your words.
Karmu
|
|
|
|
|
KSuthar wrote: Can you tell me other ways to prevent it?
No, I can't think of a way to be sure. And I don't think it's a reasonable goal.
If the user wants to modify the file outside the application, why not allow it?
It seems to me that the application needs to:
0) Check that the file exists
1) Load it into an XmlDocument
2) Check the schema
3) Read the value and confirm that's it either True or False
4) If anything in that process fails, then use the default, otherwise you got a valid value, why do you care how it got there?
You might also consider a binary file rather than an XML (text) file, to make modification more difficult.
|
|
|
|
|
Hello,
in the last few weeks i've read a lot about NAT Traversal and i searched after Tutorials and so on (i think i've read almost all what's there to read). On most webpages i've read about STUN, a protocol, which should help me to connect to another client behind a NAT-Router or a firewall. Now my question... if i understand STUN, STUN is ONLY there to give me the public IP-Address and the characterization of my NAT (Full Cone, OpenInternet and so on) here on CodeProject is a great tutorial for it. But so HOW can i connect with this informations to another client? Well OK, i have a server and there i save my informations about the peers (ID, STUN-Informations, favorite Port for UDP Connections) and if i have a OpenINternet-Client (directly plugged in to the internet, no router, no firewall) everything is really easy, because each listens on the specific favorite port.
But what's if my clients are behind a NAT, which gives a counting port number (for example, UDP connection to STUN-Server on Port 45001, to the Server 45002 and to the peers maybe 45003-60000). How can i find out on which port i can reach my peer? I know theres a technique called UDP Hole Punching, there both peers build up a connection to each other, but the Ports are my problem! Has somebody any idea, how to find out the ports of the peers? The peer2 must know on which port peer1 is connected and peer1 must know from which port peer2 wants to connect. Thats really tricky and i doesn't come further on this. I develope since a few days on it and yes, the server works, i can exchange all communication-information i want, but the connection between the peers itself, there i found no way to connect
Kind regards, i hope somebody has THE idea in this or has experience in this Traversal technologies.
|
|
|
|
|
I don't really have "THE" idea here, nor do I know much about STUN, but have you considered using UPnP to forward the ports?
|
|
|
|
|
Yes, i've thought about this solution,but i want that a lot of people could use the software i make, except which internet connection, so UPnP wouldn't work everywhere, a lot of routers has disabled UPnP and i don't want, that a "standard-user" must change the router configuration, the most people are afraid to doing this. So something like UDP Hole Punching would be the best way.But if you have a concrete example to doing this in UPnP i would like to test it
|
|
|
|
|
Perhaps the code from my article[^] will work for you - there are people for which it doesn't work, but I think that the people for which it does work just don't usually take the effort of reporting that it works.. It works for me that's for sure
Hole punching would be better of course but UPnP is better than nothing (right?) I'm sorry I don't know enough about hole punching, last time I looked it up it didn't seem too hard but there's probably a 'catch' somewhere..
|
|
|
|
|
yes, that's maybe right, i'll test your code in this week. Well... back to UDP hole punching, i doesn't understand, how to find each others ports? because the most people have a "Port restricted Cone NAT", which means, that to a specific port from the router, only answers from a specific server from a specific port are accepted. But i can't see into the future, which port the router will use.
|
|
|
|