|
I second that.
|
|
|
|
|
"And that was good advice, good advice.
Good advice costs nothing, and it's worth the price.
I sincerely doubt
That the world could do without
My good advice."
Alan Sherman
|
|
|
|
|
private void btnOOImg_Click(object sender, EventArgs e)
{
string imgFileName;
Bitmap img = null;
Color c;
int i, j;
openFileDialog1.Filter = "All Image Files|*.bmp;*.ico;*.cur|All files (*.*)|*.*";
openFileDialog1.FileName = null;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
imgFileName = openFileDialog1.FileName;
img = (Bitmap)Image.FromFile(imgFileName);
for (i = 0; i < img.Width - 1; i++)
{
for (j = 0; j < img.Height - 1; j++)
{
c = img.GetPixel(i, j);
imgO[i, j] = c.R;
}
}
picOriginal.Image = img;
}
}
this code restricts certain images. i want it to change accept all images in as a file not inside a picture box
modified on Tuesday, December 7, 2010 11:55 AM
|
|
|
|
|
The formats supported by the Image class are listed here[^].
Simply change your OpenFileDialog Filter to include those you are interested in.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
i tried changing.i have a index error. can you give me a particular sytax
|
|
|
|
|
You currently have:
openFileDialog1.Filter = "All Image Files|*.bmp;*.ico;*.cur|All files (*.*)|*.*";
To add a filter for PNG files (for example) simply add the filename template between 'cur' and the '|' before 'All Files', not forgetting to separate it by a semi-colon.
openFileDialog1.Filter = "All Image Files|*.bmp;*.ico;*.cur<sup><big>;*.png</big></sup>|All files (*.*)|*.*";
I have tried to make my additions stand out by superscripting it.
Have a go with the others yourself.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
i have two threads in my application , the child thread holds an open socket and update a textbox in the parent thread , now i want to
send some text from the parent thread to the other end through the child socket. but i'm having the problem of accessing it , any idea about this , how to access this socket .
|
|
|
|
|
You have a class A with data (socket)
You have another class B that you want to use with class A (call a method which sends data.)
So class B must have access to the instance of class A and it must call the method.
Nothing in the above has anything to do with threads because threads has nothing to do with it.
What does matter for threads is that you want to insure that both threads do not attempt to use the socket at the same time. A simple lock deals with that.
|
|
|
|
|
I have a ListView control with LargeIcon view. Its width allows exactly only single item in a row to be displayed. Thus it may contain upto Nx1 items from two dimensional point of view.
How to automatically scroll to a given item?
Чесноков
|
|
|
|
|
Have a look at ListView.TopItem
|
|
|
|
|
It does not work with LargeIcon, SmallIcon or Tile.
My list view is in LargeIcon mode.
Чесноков
|
|
|
|
|
Sorry, I overlooked that. Could the EnsureVisible() method help you out?
|
|
|
|
|
You could use pInvoke to set the scroll position.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Hi Everybody,
Please help me to solve my problem.
I am developing an window application in C#, in that I have designed some crystal report. All this crystal reports are running properly on my development machine. But When deployed at client machine, whenever the user views the report it ask for login name and password.
I have given logon information through my code using TableLogInfo. But still While viewing the report, it asks for Login name and password.
Please Provide Me The Better Solution You Have.
Thanks & Regards
Sanket Patil.
.
|
|
|
|
|
it is asking your db login name and passowrd, anyways a lil bit of code will help you fast.
All work and no play make jacks a dull boy.
|
|
|
|
|
Hi Alok Sharmaji,
Thanks For Your Reply. But Let me know what type of lil bit of code will help me. If you have please send me an sample code.
Please help me.
Thanks & Regards
Sanket Patil.
.
|
|
|
|
|
have you tried what i said to you, if not do so, also from lil bit of code i meant of ur code snipt to see what you have done so far(LOL) anyways read here[^]
|
|
|
|
|
Hello Alok Sharma Ji,
Thanks Once Again For The Reply. What I Have Done In My Code Is Here.
ALLEXE = new PayrollSoft.Report.AllowanceExempt();
tblinfo = new TableLogOnInfo();
foreach (Table Atbl in ALLEXE.Database.Tables)
{
tblinfo = Atbl.LogOnInfo;
tblinfo.ConnectionInfo.ServerName = objcon.GetServerName();
tblinfo.ConnectionInfo.DatabaseName = objcon.GetDatabaseName();
tblinfo.ConnectionInfo.UserID = objcon.GetUserId();
tblinfo.ConnectionInfo.Password = objcon.GetPassword();
if (objcon.GetTrustedConnection().ToUpper().Equals("YES"))
tblinfo.ConnectionInfo.IntegratedSecurity = true;
else
tblinfo.ConnectionInfo.IntegratedSecurity = false;
Atbl.ApplyLogOnInfo(tblinfo);
}
ALLEXE.RecordSelectionFormula = "{ALLOW_EXEMPT.IA_CM_CODE}= " + Masters.MainMaster.CMPID + " AND {ALLOW_EXEMPT.IA_YEAR}=" + cmbYear.Text.Remove(4, 1) + " AND {ALLOW_EXEMPT.IA_DELETE}=false " + Query;
StrCompanyName = objcon.GetColumn("Select CM_COMP_NAME from COMPANY_SETTING WHERE CM_COMP_ID=" + Masters.MainMaster.CMPID + "");
ALLEXE.SetParameterValue("companyname", StrCompanyName);
crystalReportViewer2.ReportSource = ALLEXE;
this.Show();
Hope This Is The Right Way to Provide Logon Information To Report.
Thanks & Regards
Pankaj Patil.
.
|
|
|
|
|
|
pls i want to generate a ten digit crypted value from a 4 digit number,
pls how do i get it done.
thank you.
|
|
|
|
|
Sorry, but you will have to explain your requirement rather more clearly.
You could use any method you like to generate a ten digit code from a 4 digit, so that it could be converted back, but what are you trying to achieve?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
My plaintex is a four digit xters, after encryption i get a 24 digit set of xters,
i want to limit the encrypted values to just 10 digits,
is that posible?
if so pls how?
thank you.
|
|
|
|
|
Looking briefly at your code reply on the other thread, this is for password matching?
If so, then just do what everyone else does - don't use encryption, use hashing. MD5 or SHA will give you a 128bit hash of a password which you can store and check against. That is what most do - since it is a hash, it is not reversible (you don't need a key to generate it, just the password) and it can't be reverse engineered to get the password (particularly for SHA, MD5 can be revwerse engineeered in some circumstances).
It is also a good idea to include the UserId with the password before hashing, so that two users with the same password don't generate the same hash...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
What method of encryption are you using that is resulting the the 24 character result?
What factors made you choose this method of encryption?
Why are you encypting the value?
Do you need to be able to decrypt the result in order to obtain the original value?
Are there any transport considerations e.g. 7-bit transmission restriction?
Need more info to help.
|
|
|
|
|
What code you have written?
If it is showing any error then put your error we will help you.
Regards,
Sathesh.
The best way to express one's gratitude to the Divine is to feel simply Happy..
|
|
|
|