|
I have a problem in coding the code to compile and execute.I want to do an IDE eg. something like JCreator in Java that executes code and compiles it but its been giving me huge problems.Can you please help me!!
uni1985
|
|
|
|
|
First of all this forum handles C# problems, and second but not least : where is your problem??
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
This really isnt too difficult (if its all about a one-codefile project, that is):
Simply run some shell with "csc.exe codefile.cs" and pipe the output to a richTextBox or similar. then check if the new "codefile.exe" exists and spawn a shell with "codefile.exe".
That should do the job.
I just don't know how to create a shell under .NET
Cheers
Sid
|
|
|
|
|
Hi,
Guess this article will help you.
http://www.codeproject.com/csharp/matheval.asp
Thanks
SGS
|
|
|
|
|
hi..hi..hi
i want to aske you if you has information about (system class)in c#
and its used and how i can use it to do somthing like
shutdown and serial port.....
thank thank thke
ooosoooory the (thke) i mean thank............
|
|
|
|
|
I dont know a class in the FCL named System , but sure there is a namespace called System , if there is a class named system till us in which namespace this class exists , and lets discover together what this class can do ...
|
|
|
|
|
Hi, I think that he was mean system namespase because there is not systen class in .NET
|
|
|
|
|
Hello
I have a very difficult problem to explain. I have a password dialog box so that people can change there password. The dialog box will request for their current password, anc check that is is valid. Then request them to enter their new password and then re-enter their new password. The passwords are checked using the tab button when they leave a text box on the (leave event). When they have done all this they click the ok button and the new password is set. If however, they cancel using the cancel button. Then the dialog box will not close. This is the code below so you can better understand my problem.
This is the code for when the user enters the password, and presses the tab key to go to the next text box. When this event fires it will check the password is correct. Enter new password and re-enter password uses the same idea. I will not post it here as the code is the same.
<br />
private void txtEnterPassword_Leave(object sender, System.EventArgs e)<br />
{<br />
string queryValidatePwd = "SELECT Username, Password FROM AdminUsers WHERE Username = '" + lblLoginName.Text + "' AND Password = '" + txtEnterPassword.Text + "' ";<br />
<br />
try<br />
{<br />
OleDbCommand cmdValidatePwd = cnnChangePassword.CreateCommand();<br />
cmdValidatePwd.CommandType = CommandType.Text;<br />
cmdValidatePwd.CommandText = queryValidatePwd;<br />
<br />
OleDbDataAdapter daValidatePwd = new OleDbDataAdapter(cmdValidatePwd);<br />
DataTable dtValidatePwd = new DataTable("AdminUsers");<br />
<br />
int count = daValidatePwd.Fill(dtValidatePwd);<br />
if ( daValidatePwd.Fill(dtValidatePwd) == 1 )
{<br />
txtEnterNewPassword.Visible = true;<br />
txtEnterNewPassword.Focus();
}<br />
else<br />
{<br />
MessageBox.Show("Password is incorrect for this username - please try again","Incorrect Password",MessageBoxButtons.OK,MessageBoxIcon.Warning);<br />
txtEnterPassword.Clear();<br />
txtEnterPassword.Focus();<br />
}<br />
dtValidatePwd.Dispose();<br />
daValidatePwd.Dispose(); <br />
}<br />
catch ( OleDbException ex )<br />
{<br />
MessageBox.Show(ex.Message);<br />
}<br />
catch ( Exception ex )<br />
{<br />
MessageBox.Show(ex.Message);<br />
}<br />
}<br />
Code for when the user closes the dialog box. The the other textboxes have focus you cannot close this form. I have tired using this.close() as well, but still does not work.
<br />
private void btnCancel_Click(object sender, System.EventArgs e)<br />
{<br />
this.Dispose();<br />
}<br />
Thanks for you help in advance,
Steve
|
|
|
|
|
Your code looks fine to me, perhaps you should use the Close procedure to close your window. You say that the windows doesn't close so as odd as this may sound, but you should check all the events you handle, maby one of them is stopping you from closing your form.
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
In Click event handler for your Cancel Button , if you showed the form with ShowDialog (a modal dialog), try:
DialogResult = DialogResult.Cancel That should work.
Otherwise, call Hide if you created a modeless dialog (Form.Show ).
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Did you try setting the CancelButton property on the form to your Cancel button?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
HI,
how to use win32 datatype in c#.NET
am using
[DllImport("Kernel32", CharSet=CharSet.Auto)]
private unsafe static extern UInt32 CreateIoCompletionPort(UInt32 hFile, UInt32 hExistingCompletionPort, UInt32* puiCompletionKey, UInt32 uiNumberOfConcurrentThreads);
this function , n i wants to pass a socket to ist parameter as a handle
and when i convert socket to UInt32 it gives me
INVALID CAST EXCEPTION
so how i pass socket to UInt32 hFile this argument.???
please help me ...........
Thanks
babur.saeed@gmail.com
its_me_babar@yahoo.com
Babar
|
|
|
|
|
Handle dataTypes in C# must be IntPtr, therefor you procedure should look like this :
[DllImport("Kernel32")]
private static extern IntPtr CreateIoCompletionPort(IntPtr hFile, IntPtr hExistingCompletionPort, IntPtr puiCompletionKey, IntPtr uiNumberOfConcurrentThreads);
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
Thank u very much i have solved the problem,,,,,,,,
but now stuck into another problem
can u help me if i send u code?
|
|
|
|
|
|
Hi,
when i create a software with c# for different OS, do i need to compile the source code on every computers with destination OS, i mean, i create a project on winxp, but i wont that is runnable on windows2000 to, do i must to compile the project on win2000 first befor a create a release? I hope that my question is understandable!
thanx
mirsad
|
|
|
|
|
Hi!
No, you don't have to compile for every OS.
There are, however, some classes in the .NET framework that are not supported on every OS .NET runs on (for example, a FileSystemWatcher only is available on NT-based systems: NT, 2000, XP, 2003).
The framework documentation tells you which OS's a class is supported on.
mav
|
|
|
|
|
No.
Just like Java, C#/.NET-FW means: compile once, run anywhere.
There are, however, a few drawbacks:
In order to run an application on a target system, the target system must have a .NET-Framework installed.
There also IS a difference between v1.0 and v1.1 Applications (i.e. Applications for the .NET-FW Version 1.0 and .NET-FW Version 1.1), so take that into consideration.
AFAIR, there is no .NET FW available for Win95, which might or might not be a problem.
Last drawback: The Microsoft .NET Framework is only available for "Wintel", AFAIK. You might have to use MONO as the executing framework instead, which is available at www.go-mono.com (read the corresponding article here on CP).
That should have been all
Cheers
Sid
|
|
|
|
|
good answer.
If you copied that response to notepad, you could use it 100+ times a day on these forums.
|
|
|
|
|
heh, actually I was thinking aboout kind of browser plugin... like code snippets in VS.NET 2k5, but with common links to MSDN, Colin's SQL Injection article etc. You know, things you keep writing again and again. Unfortunately I don't know how to do IE/FF plugin and I don't have much time to learn...
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
hi,
thanx to all for answers, i create nice tool with c#(with help of course), but they dont work on win2000, on WinXP is no problems! That is the problem what i have, and i am beginner in this, the error message is when i start this tool after installation on Win2000 follow:
Enable JIT-Debugging in the section: system.windows.forms !
This is a ATL tool with hook's, and inplemented a cmd.exe in the Window Explorer if you want, for example, you dont need to start the console explicit, only press a key, example alt + m !
But thanx for help
mirsad
|
|
|
|
|
Perhaps your application wont run on an other system (which I assusme it has .Net framework installed) because you use Platform Invokes, meaning that your program is based on a specific platform and/or why not on a specific application.
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
I have created folders in Outlook programmatically. Whne i add mail items to it programmatically and try double clicking them in Outlook to open them, instead of opening the message a compose window is opened. Can some body tell me how can I solve this problem.
|
|
|
|
|
Hello....
Please, can you tell me how to limit the time for a user when using the Internet Service as an administrator. Using ADSI and C# languges; because I want to build an ISP phone based company. In addition to that, is there an Instruction to see if the user account locked or not?
Thanks a lot....
|
|
|
|
|
Hi to all
i m new to C#.. can anyone plz help me to read a text file in parts... sample is below..
05-02-14 33 1 2 11 ORIS 2569874
i have used the ReadLine() function to read a line but how i can parse the following format in separate fields.Plz help me in this regard.... thanks
|
|
|
|