|
hi all
i am trying to validate a text box entry.
i want to enter hex data in the text box.
so in the keyDown event of the textbox if the user presses an invalid key i say e.Handled=true. but still the keypressed appears in the text box.
private void textBox1_KeyDown(object sender,System.Windows.Forms.KeyEventArgs e)
{
if(e.KeyValue==65)
{
e.Handled=true;
}
}
this was the sample code i was trying to disable typing of 'a'
can any one help me????
|
|
|
|
|
Key off of the KeyPress event rather than the KeyDown event.
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
what is the key off event?
|
|
|
|
|
There is no "key off" event.
Use the "KeyPress" event - not the "KeyDown" event
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
Hi,
I trying to run process with System.Diagnostics.Process object.
When defining the WorkingDirectory to be a virtual folder (Drive that has been created with subst). it throws an exception "The directory name is invalid".
Did anyone had such a problem?
Any solutions?
Thanks,
Ori.
BTW,
It works great on win2000
|
|
|
|
|
Hi everyone!
I need to manage local computer's network routing table (i.e., add/remove gateways) from a C# application. In other words, i need to perform, programmatically, operations equivalent do "ROUTE ADD", "ROUTE DELETE" and "ROUTE PRINT" DOS commands. As of right now, i simply launch instances of command prompt with these commands, but it is very cumbersome.
Anyone knows how can i do it using .NET framework or Windows API?
Thanks a bundle!
|
|
|
|
|
You'll need to check into the Routing Protocol Interface in the Platform SDK, here[^] on MSDN. There is nothing in the .NET Framework BCL that will do this for you, so you'll have to write your own library to P/Invoke that appropriate functions and parameters.
[EDIT]
Whoops! My bad! Check out the Routing Table Manager (Version 1[^] and Version 2[^]) for what you need. Still, there is nothing in the .NET BCL that does this for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
What is the best way to work with multiple db connections? I mean that I ahave an app with a TreeView on it and for each node(if he has some props)I want to use a diffrent db (MsAccess) connection, what i did is that when I press a node I verify the conditions and if they are OK I
[] conn=new OleDbConnection(strConnect); []is this the best way?
(o)(o)
|
|
|
|
|
I have a RichTextBox on my form and I want to save the text that a user writes into it in a AccessDB but I want to save the formatted text not only plain txt I have seen in some programs that the db table has 2 columns one for the plain txt and one for some enconding I do not know but I know for certain that in that column all formatting are hold, is there a way to do this?
Because to insert the rtf format to the DB is not realy efficient I think! Or maybe you can point me to the right direction!
(o)(o)
|
|
|
|
|
Hey i've been working on a note taking application were the user may enter details for a specific date and the details will be recorded into an access database.
the five things that get recorded are:
unique id number (autonumber)
person who entered the data
what date it was entered on
the date it is entered for (what date does the task have to be done on)
details of the task.
At the moment i'm working on getting the edit entry feature to work. In the edit entry class of the program two comboboxes are populated with the id number and the details of each entry respectively (ie. the user can select which entry they wish to update by either selecting an entry number or the details of an entry). I've tried a tutorial similar program and gotten the update command to work, but this time it continues to give me a message error about no default values for the parameters.
You can find the zipped file with the program and the database at http://users.mackay.net.au/~plthomas/CalendarDatabase.zip[^], what i want to happen is, all the details submitted on the right hand side (the edited version of whatever entry the user selects) to be updated into the database in place of the old entry. If anyone would be kind enough to give me a hand it'd be much appreciated, i'm still new to the c# programming language and am trying to get this damn school assignment done .
The connection string assumes the database is in the "c:\" file directory. If you give the program a run you'll see what i mean when you click the update entry button. Thanks in advance,
Bryce.
|
|
|
|
|
hi folks
i m facing a strange bug
when ever i run my Window Application programm , always , a console window opens first then my window Application program opens. also if i close the console window , then the whole programm stops .
what should i do for removing this bug
n e idea plz
with regards
|
|
|
|
|
May be you've chosen the wrong project type when you created the project? Did you select Console Application or Windows Application? Anyway, you can change it right away by right clicking on the project in Solution explorer, clicking Properties and changing the Output type under Common Properties->General.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
how to create a c# webservice which will dynmically generate an xml file for the folders structure on iis webserver and send it to to a windows form client
|
|
|
|
|
Hi Aman,
Will this work for you?
[WebMethod]
public XmlDocument GetXML()
{
XmlDocument xmldoc = new XmlDocument();
xmldoc.LoadXml("<person> <name>pani");
return xmldoc;
}
you can create a XmlDocument object and return it from your webservice.
Thanks and Regards
SGS
|
|
|
|
|
Thanks buddy,
but need to dynamically generate an xml file whcih will have my folder structure.
for example...
on my webserver i have folder ABC which has subfolders
Aman,Danny,Reena.
i need to dynmically create an xml file with this tree structure and send it to windows form client..
your Help is awaited.......
|
|
|
|
|
We can inject an application or dll into another running application by using WINAPI function:VirtualAllocEx,WriteProcessMemory,CreateRemoteThread
but how can we do it by using C#language
|
|
|
|
|
we can inject an application or dll into another running application by using WINAPI function:VirtualAllocEx,WriteProcessMemory,CreateRemoteThread.
But how can we do this by using C# language
|
|
|
|
|
That's a very dangerous and rather low-level operation, not suited for .NET. If you absolutely need to, use P/Invoke to call the Win32 API functions you mention to inject code into a running process, but I don't even know if that'll work since .NET assemblies are very different from Win32 dlls.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: He has a funny face. And he's my son.
Judah Himango
|
|
|
|
|
Hello, Does Any one know how to create a movie file AVI or MPEG from JPEG or BMP file. I need to create an app that can read images from a directory and create a movie file from that? Please.... any help or pointers in the right directions
|
|
|
|
|
|
hello
can anyone advise me of any sort of method in c#.net which allows opening a file, and opening i mean for example if it's a .doc file once u run the application u see the note pad file opened in front of u?!!
any help
regards
|
|
|
|
|
What do you mean by that? You want to open a .doc file with notepad?
<italic>Work hard, Work effectively and a bit of luck is the key to success.
|
|
|
|
|
Use System.Diagnostics.Process class and pass it the name of the file you want to launch. The Windows Shell will then launch the file with the associated program.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: He has a funny face. And he's my son.
Judah Himango
|
|
|
|
|
so i can use this with any extension hopefully: .doc , .text, .html ...etc
thanx for for the reply both of u
regards
|
|
|
|
|
Try asking in the correct Forum! Drop this in the Visual C++ Forum and you might get an answer.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|