|
thanks. that is what i was looking for! the singleton will solve a lot of problems.
thanks again.
donovan
rather have something you don't need, than need something you don't have
|
|
|
|
|
|
donsolms wrote: so pressing two fingers on an image does do quite different things than pressing two fingers on something else
What the heck does that mean? "pressing two fingers"? What difference does it make how many fingers you use to press with? And why would you use more than one? Doesn't that make it more difficult to hit your target?
And what does "does do quite different things than pressing two fingers on something else" have to do with "how" you capture the "press" event? Are you confused... because I sure am.
|
|
|
|
|
ok. let me explain. it's a multitouch screen i built myself. it gets a videofeed from a camera of where you press your finger. the unmanaged c++ app does the tracking of the fingers. then i built a managed wrapper to get the 'events' raised by the unmanaged part. now that is working. now i need to add those touch events to a UIElement in wpf. now doing it with one object is no problem, but doing it with say Image and Button is a whole different story. because once i add a UIElement implemented to receive touches, the app runs but without allowing the other one for touches. so i want to build a framework that allows for more than one element to be touched. the basics should be the same as the normal mousedown event.
as for "doing different things" and "why whould you use more than one finger"?
google/youtube for 'microsoft surface', or 'jeff han ftir' and you'll see why more than one finger and why it does different things when you touch different objects.
@led mike - you're right : "And what does "does do quite different things than pressing two fingers on something else" have to do with "how" you capture the "press" event? " has nothing to do with it, it was just to better explain.
rather have something you don't need, than need something you don't have
|
|
|
|
|
donsolms wrote: google/youtube for 'microsoft surface', or 'jeff han ftir'
Very nice, thanks. Yeah since this is all bleeding edge stuff I have no clue.
|
|
|
|
|
To support multiple touches, you'd probably need an SDK for that tablet. There isn't any built in support in Windows to handle this.
|
|
|
|
|
private void button1_Click(object sender, EventArgs e)
{
try
{
string str = "provider=Microsoft.Jet.OLEDB.4.0;data source=1.mdb";
OleDbConnection passconn = new OleDbConnection(str);
string sql = "select * from password where username='" + this.textBox1.Text + "' and password ='" + this.textBox2.Text + "'";
passconn.Open();
OleDbCommand cmd = new OleDbCommand(sql, passconn);
object result;
result = cmd.ExecuteScalar();
int myint = (int)result;
if (myint == 1)
{
this.Hide();
MDIParent mdi = new MDIParent();
mdi.Show();
}
else
{
MessageBox.Show("Please enter the correct user name password");
textBox1.Text = "";
textBox2.Text = "";
textBox1.Focus();
}
passconn.Close();
cmd.Dispose();
}
catch(OleDbException ex)
{
MessageBox.Show(ex.Message);
}
}
friends i goot puzzled please help me i m new.
|
|
|
|
|
Wats the error?
|
|
|
|
|
Sorry, but I'm not going to read that looking for an error unless I know what I'm supposed to be looking for.
What is the error? Where is the error? What should it do instead?
At a quick glance I can tell you that your code is susceptable to a SQL Injection Attack. Read this for tips on how to prevent SQL Injection Attacks.[^]
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
There are a few issues with this code. Like you are trying to return a scalar but you are doing select * from password. I think there is perhaps one column that you want to return that you are expecting to be an integer. I think perhaps your code might work better if you did select count(*) from password ... Then you should get the number of records returned that match your username and password.
Hope that helps.
Ben
|
|
|
|
|
The fact that the password is being stored in clear text is a big in itself.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
Yes, and like you mentioned in your post sql injection attacks. Still I figure try to help if I can. It is kind of funny how often people expose themselves to sql injection attacks. I read your posts sometimes and it seem more often then not you add a link to your article about it. I guess you can only hope that sooner or later more people will realize the need to use stored procedures all the time for everything instead of taking the easy way out. Of course, this is an access app so I guess that isn't an option.
Ben
|
|
|
|
|
kubben wrote: Of course, this is an access app so I guess that isn't an option.
There is still the option of parameterised queries - that does go some way to protecting the database.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
hehe sounds quite funny!
your username and password must be wrong and you must be getting this pop up "Please enter the correct user name password" :P
or may be you're playing with us!
|
|
|
|
|
no friend this shows the error
|
|
|
|
|
What is the error? There is no point saying it shows the error if we don't know what it is. If you want us to help you, you have to help us understand your problem first.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
so brother why don't you tell us the error!
|
|
|
|
|
|
I'm totally confused. How do you know you have an error if you don't know what it is?
You post code and say it has an error? How do you not know what the error is? Surely the error manifests itself in some way? What is the manifestation of that error? And what should happen if the error was fixed?
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
Could it be that this is a kind of homework or test question?
"Name all the errors/problems in this piece of code"
Just a thought...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Never thought of that. You could be right.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
How do I write a code in C# with following functionality:-
The program will search and pick a code from a repository.
Then it will deploy the code to some other machine.
It will also maintain a log of transaction.
varun
|
|
|
|
|
|
vkg_dce wrote: The program will search and pick a code from a repository
Define "repository" in the current context.
Define "code" in the current context.
vkg_dce wrote: Then it will deploy the code to some other machine
Define "deploy" in the current context.
vkg_dce wrote: It will also maintain a log of transaction.
Define "log" in the current context.
Define "transaction" in the current context.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Ready to Give up - Your help will be much appreciated.
My website
|
|
|
|
|
vkg_dce wrote: How do I write a code in C# with following functionality:-
The program will search and pick a code from a repository.
Then it will deploy the code to some other machine.
It will also maintain a log of transaction.
Using the keyboard.
(If you want a more specific reply, you have to ask a more specific question.)
---
single minded; short sighted; long gone;
|
|
|
|