|
himanshu
|
|
|
|
|
Thanks a lot.
Actually now my application have a slight change. Now all my elements are in a list. So I've two lists now. So how can I do this.
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Which list are you using exactly? A generic List<t>? As it also implements IEnumerable you should be able to use the extension methods on them equally.
Dust Signs
The number you dialed is imaginary. Please turn your phone by 90 degrees and try again
|
|
|
|
|
Sounds like a set operation, I'd use sets.
|
|
|
|
|
hi
how can i measure string height without using Graphics.MeasureString()?
i've tried to use GraphicsPath and AddString() then to GetBounds() but that gives me the exact height, but i need the height like MeasureString() function.
the reason i can't use Graphics is that i need to calculate something about the string height in a function that doesn't get Graphics variable. (in the function that does have the Graphics variable i'm using 300 dpi).
|
|
|
|
|
|
i'm using 1.1 Framework, so i think i can't use it
|
|
|
|
|
You don't need to receive a Graphics object to use one in your method. What you could do is create a 1 by 1 bitmap, and then retrieve the Graphics object from that.
using (Bitmap img = new Bitmap(1,1))
{
float resolution = 300;
img.SetResolution(resolution, resolution);
using (Graphics g = Graphics.FromImage(img))
{
}
}
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
The Graphics context dictates the way the Fonts are rendered. It is not possible to accurately measure a string without knowing where it is going. All other option require guessing in the method. If you want to guess you can look-up the font characteristics and roll your own, or as suggested earlier create a fake graphics context that does not match the device. Unfortunately, it will be buggy in some edge cases that may be hard to detect in development but the client will notice immediately. The best thing to do is to pass a reference to the Graphics context everywhere you want to draw to a device.
|
|
|
|
|
Hi friends, I explain you my problem. I have my application installed on Vista 64bit, without Visual studio 2008 kit installed on the machine. Sometimes the application crash in particular situation, so windows doesn't start a debug to see the error line. Why?. Is it possible to install a free debugger on the machine without install Visual Studio 2008?
Thank you, wait some suggestions.
Bye Bye
Andrea
|
|
|
|
|
You should rather log this somewhere in file, event log etc. This will give you an idea where it went wrong so that the code can be reviewed and possible problem can be understood.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I hav created a listview and added items to it. Now when i select one of those items and perform a rright click on the selected item i should get a dropdown menu as we normally get when we right click like refresh and all that. so plzzz help me out in this.....
balajipawar.8785@yahoo.com
|
|
|
|
|
|
first of all thanks 4 ur advise and yes ur answer was really helpful
......thanks once again
|
|
|
|
|
pleasure
|
|
|
|
|
Never ever give your email address in the public forums until and unless you want to be flooded with spams.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi
I have a problem in my windows application with ms access 2007 as database.
The problem is that the update query to change password is giving error.
the code i used is
string qry1 = "update log_in set password='" + txtnew.Text.Trim() + "' where userid='" + txtuser.Text + "'";
cmd = new OleDbCommand(qry1, con);
cmd.ExecuteNonQuery();
MessageBox.Show("Password changes Sucessfully");
the error is "Syntax error in UPDATE statement."
please answer. thanks in advance
J.K.Sharma
|
|
|
|
|
password is a reserved field name.
Try changing your code to read:
string qry1 = "update log_in set [password]='" + txtnew.Text.Trim() + "' where userid='" + txtuser.Text + "'";
|
|
|
|
|
oledbparameter.....
|
|
|
|
|
Thank you so much . It works as per you advice.
|
|
|
|
|
when i create crystal report the database is at some location.
but when i prepare setup of that windows application and deploy it on some other system then the path of database change and the crystal report does not load the correct database.
Please help..
Thanks in advance.
|
|
|
|
|
|
Thanks for your suggestion
I have used app.config file to store connection string for rest of my application but i am unable to create cyrstal report using that string.
Because when I create crystal report i need to use database field from field explorer which are present only when i establish connection at creation time of crystal report.
Is there any other way to generate crystal report so that i can use app.config connection string for that.
|
|
|
|
|
Try something like this:
foreach ([forgot object name] tbl in CRReport.Database.Tables)
{
tbl.SetLogOnInfo("",dbLocation,dbUser,dbPass)
tbl.Location = dbLocation
tbl.SetDataSource(dbLocation)
}
I've not got CR installed here, so can't double check the function and object names,
but I believe that will redirect your database source for you
The first parameter of "SetLogOnInfo" i think is a connection string, but I don't think you need this when reading from Access.. I've only ever used SQL Server, so I will say this is all just guess work
Anyways, hope it works for you!
|
|
|
|
|
If you let me use your application, I can erase your entire database. Try reading up on SQL injection attacks.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|