|
That is soo true it does have all i need.
I am going to ask the owner to let me use some of his code if it is possible.
I like to ask for permission even if it is open.
Thanks a lot,
Best regards!!!
Luis E Tineo S
|
|
|
|
|
Erhm, not having a dev env here right now, but this should be pretty close...
<br />
DirectoryInfo diPictureFolder = new DirectoryInfo("c:\\Your\\Pics\\");<br />
foreach (FileInfo fiPic in diPictureFolder.GetFiles("*.jpg"))<br />
{<br />
PictureBox pb = new PictureBox();<br />
pb.Image = new Bitmap(fiPic.FullName);<br />
pb.Click += new Event handler for click event<br />
yourForm.Controls.Add(pb);<br />
}<br />
|
|
|
|
|
Hi Friends,
Kindly give the method, How may I set "F10" key in "MDI/Main" form to close application?
Thank you
(Riaz)
|
|
|
|
|
if (e.KeyCode == Keys.F10)
Application.exit();
But remember it will run when you are having the focus onto the MDI form.
It will not work when any child form is open.
Regards
Pankaj Joshi
|
|
|
|
|
1. Set KeyPreview to True in the properties of Main form
2. Write the following code in the Keypress event of Main Form
if(e.KeyCode == keys.F10){<br />
Application.Exit();<br />
}
Hope it helps.
|
|
|
|
|
|
Hi....i need to implement scanner in one of my project to read the barcode...how can i do it in windows applications with c#?
vicky
|
|
|
|
|
Hi,
If you are going to use the actual hardware, then you will have to connect it and get data from it. Otherwise, you'll have to detect and extract the exact place in the image, where the barcode is, and then read it as its specifications.
Regards,
Adeel
|
|
|
|
|
thanks for your support....i am going to use actual hardware for it...do i have to use any supporting dll for that...if yes, what is it and how to use it?
|
|
|
|
|
For that you will have to check what interface the barcode reader has i.e. will you connect it using serial port, USB port or parallel port. After that you need to look-in the specifics of the barcode reader, like in what format it sends/receives data, what commands it supports, that mainly depends on the make and the chip design of the barcode reader.
Hope that helps!
Adeel
|
|
|
|
|
|
most barcodescanners act like a keyboard so you won't need anything special.
greets
m@u
|
|
|
|
|
Hello experts,
I have a combo in that I fill some values from Db say A,B,C,D,e,f,G,h,i,j etc.
My combo is a simple combo so end user can also type in that. for data consistency I check wheather or not the user select proper value or not...? That is user have to enter or select the pre-filed value. For that I am using the Contains method
like
comboBox1.Items.Contains(comboBox1.Text.ToString()
and its working fine.
But this will interperete A and a different ....What to do...?
I want a and A are the same
Regards
Pankaj Joshi
|
|
|
|
|
One idea might be to do a string comparison between the objects in the combobox and the the value inserted by the user
for (int i = 0 ; i < cmb.Items.Count ; i++)
{
if (String.Compare(cmb.Items[i].ToString,cmb.Text,true)
{
}
else
{
}
}
Hope it helps.
I will use Google before asking dumb questions
|
|
|
|
|
Thanks for reply
But this is Ok...? If I having 15,000 records in combo then for loop will run 15,000 times and check the item. This will make code slower, And .Contains method automatically do that only case-sensitivity is the matter...I am right?
Regards
Pankaj Joshi
|
|
|
|
|
pankaj.indore wrote: If I having 15,000 records in combo then for loop will run 15,000 times and check the item.
Yes, when you have 15000 records in a combobox it's not right...but then again...why don't you do some filtering to have fewer values...or even...you should try to use autocomplete would work better
Hope it helps.
I will use Google before asking dumb questions
|
|
|
|
|
Hi,
If you have already fill-in all the possible values in that combo, why not you make it un-editable? That way, still, the user will be able to select the value by pressing the 1st character key of the value. Correct me if i am wrong.
Regards,
Adeel
|
|
|
|
|
Hi Adeel,
You are right, But in this case only one letter searching is allowed and
My combo having more than 15,000 records and that will create a problem.
SO user can type first few starting letters of the name and then select the name.
In your case [DropDownList I suppose] you only have one letter search and that will take much time to search particular record.
Regards
Pankaj Joshi
|
|
|
|
|
use like this
bool chkitem_small = comboBox1.Items.Contains(comboBox1.Text.ToLower());
<pre>bool chkitem_cap = comboBox1.Items.Contains(comboBox1.Text.ToUpper());
if(chkitem_small == true | chkitem_cap == true)
{
}
else
{
}
Becoming Programmer...
|
|
|
|
|
That is working fine
Thanks for reply
Regards
Pankaj Joshi
|
|
|
|
|
hi,
Is it posible to use two diferent connection string in a SqlTransaction object??
Be very grateful for any advice.
They laugh at me; they think I’m different. I laugh at them, ‘coz they are all same!! CrazySanker
|
|
|
|
|
Hi,
I dont think it is possible to use two connection strings(CSs) at the same time!! But you should be able to use two different CSs 1 after the other. Like use CS-1 perform something in transaction close CS-1, then open CS-2 and use it with the same transaction object! That may be possible.
Regards,
Adeel
|
|
|
|
|
Thank you very much for your reply..
<br />
using (SqlConnection connection = DbConnection("SerConstr"))<br />
{<br />
using (SqlCommand command =<br />
connection.CreateCommand())<br />
{<br />
SqlTransaction transaction = null;<br />
<br />
try<br />
{<br />
connection.Open();<br />
<br />
transaction = connection.BeginTransaction();<br />
<br />
<br />
<br />
<br />
command.Transaction = transaction;<br />
<br />
<br />
<br />
command.CommandText = "Insert ...";<br />
command.ExecuteNonQuery();<br />
<br />
command.CommandText = "Update...";<br />
command.ExecuteNonQuery();<br />
<br />
transaction.Commit();<br />
}<br />
catch<br />
{<br />
transaction.Rollback();<br />
throw;<br />
}<br />
finally<br />
{<br />
connection.Close();<br />
}<br />
<br />
how I ll do this??
They laugh at me; they think I’m different. I laugh at them, ‘coz they are all same!! CrazySanker
|
|
|
|
|
Vipin.d wrote: // i need to perform this in con1
command.CommandText = "Insert ...";
command.ExecuteNonQuery();
// Execute i need to perform this in con2
command.CommandText = "Update...";
command.ExecuteNonQuery();
The insert and update queries refer to the same database, within the same server?
I will use Google before asking dumb questions
|
|
|
|
|
yes i know that ,
my requirement is I need to change the connection string before doing UPDATE process.is it have any solution??
They laugh at me; they think I’m different. I laugh at them, ‘coz they are all same!! CrazySanker
|
|
|
|