|
There doesn't seem to be a legitimate reason for this behavior to be trapped.
|
|
|
|
|
Kiosk software? You don't want J Randumb Hax0r to be able to mess with the OS on that sort of system.
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
Hello,
If its a windows application, you could use the KeyDown event of the Form and check the Keys.
For example Alt+F4:
this.KeyPreview = true;
this.KeyDown += new KeyEventHandler(CheckKeys);
private void CheckKeys(object sender, KeyEventArgs e)
{
if (e.Alt && e.KeyCode == Keys.F4)
e.Handled = true;
}
Hope that helps!
All the best,
Martin
|
|
|
|
|
Thanks Martin, it helped.
but in the keys enumerator, there is no member for the start key, so how i can check if the start key is pressed.
|
|
|
|
|
|
|
Instead of trying to intercept Ctrl+Alt+Delete using software, use the Windows Group Policy (gpedit.msc) to disallow usage of the task manager on that machine.
|
|
|
|
|
Policies - how very up to date of you
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
That would be the easy way, we don't do the easy way here. Didn't you read the bi-laws!
Programmer: A biological machine designed to convert caffeine into code. * Developer: A person who develops working systems by writing and using software.
[ ^]
|
|
|
|
|
Its easy, and can't be done in .NET. Rewrite the GINA. MS Provides a non-working C++ Gina Stub in the msdn.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|
|
Hey,
I need to know the file name of the page im showing from within a master page. I'm currently using
Page.Page.Request.RawUrl.ToString();
and getting
/TangyMedia/default.aspx
I don't want the TangyMedia part as this only refers to the local Url. This will be just /default.aspx once online. How can I get just the second part?
Thanks
|
|
|
|
|
System.IO.Path.GetFileName should work.
|
|
|
|
|
How would that work in ASP.Net though.
This code is in the masterpages codebehind file. Therefore the Page object is the inner page that is loaded. So im using Page.Request
?
|
|
|
|
|
string pageUrl = Page.Page.Request.RawUrl.ToString();
string pageName = Path.GetFileName(pageUrl);
Does that work? From the way you described your problem, I believe it will.
|
|
|
|
|
Or he could wait for Ron Popiel[^] to invent a "Pocket String Chopper".
led mike
|
|
|
|
|
|
Is there a way to start the open file dialog control in thumbnail view. It is possible to switch to thumbnail view after the control starts up, but I can't see how to default it to start in thumbnail view.
Thanks for any help.
Brent
|
|
|
|
|
i want to make a login page in wich user will login and login name and passward will should match from database. if there is a new user and he is going to login first time than his user name and passward should we store in database
|
|
|
|
|
SqlConnection conn;
string myquerry;
SqlDataReader reader;
SqlCommand command;
string uname, pass,type;
try
{
conn = myclass.connect();
if (conn.State == ConnectionState.Open)
MessageBox.Show("Sql Connection is Already Avaliable", "Connection Status", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
catch
{
MessageBox.Show("There is an Error Occured While Connecting SQL Server", "Connection Error",MessageBoxButtons.OK,MessageBoxIcon.Stop);
}
myquerry = "Select * from users";
command = new SqlCommand(myquerry, conn);
reader = command.ExecuteReader();
while (reader.Read())
{
uname = reader.GetString(0).Trim();
pass = reader.GetString(1).Trim();
type = reader.GetString(2).Trim();
idno = reader.GetInt32(3);
if ((textBox1.Text == uname) && (pass == textBox2.Text))
{
r = true;
break;
}
}
reader.Close();
if (r == true)
{
if (type=="ADMIN")
{
Entrance.ActiveForm.Hide();
Admin a = new Admin();
a.Show();
}
else
{
}
}
else
MessageBox.Show("Wrong UserName Or Password", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
|
|
|
|
//here is the sqlconnection code. use it myclass.connet()
string con_string = "workstation id=FIGHT_CLUB;packet size=4096;integrated security=SSPI;data source=FIGHT_CLUB;persist security info=False;initial catalog=proje";
SqlConnection mycon = new SqlConnection(con_string);
mycon.Open();
|
|
|
|
|
You store your passwords in clear text! Remind me never to your your site.
You also extract all the rows in the users table and iterate over them. That might be fine if you only have a couple of dozen users, but if the site is large this is extremely inefficient. I suggest adding some filters in the WHERE clause on the SQL statement.
|
|
|
|
|
Every webadmin use clear text! you should understand that how is your passwords are broken
but you r right, if use encoding it is best
|
|
|
|
|
|
Don't forget to encrypt the password in the database, just in case it gets cracked.
Programmer: A biological machine designed to convert caffeine into code. * Developer: A person who develops working systems by writing and using software.
[ ^]
|
|
|
|
|
As the title says really, is this possible? If so how?
Basically I have an application that has been developed and compiled agaisnt .Net Framework 1.1 SP1. For various reasons this cannot currently be converted to a .NET 2 application however I need to use some functionality that only exists in .NET 2.
After a little testing I have found, unsurprisingly, that it isnt possible to add the reference so I came up with a cunning plan to make the .NET 2 assembly a COM object and then get the 1.1 application to call the COM interface. Unfortunatly this does work either as added the COM reference fails with a "CLR assembly cannot be converted to CLR assembly" error.
My next plan of attack is to allow runtime binding of the COM object and then using DllImport in the 1.1 application. I will not be surprised if this doesnt work either. If this doesnt work my last ditch solution is to create an unmanaged wrapper around the .Net 2 library and code the 1.1 application to call that instead. However this is a bit of a faff, so does anybody have any alternative suggestions?
|
|
|
|