|
you could try to overload it....never tried it, but maybe worth a shot...
or you could just build a method that verifies the si--yes, no--no, etc...
'course you could do some work with Localization, that would achieve the same/similar results depending on how/where its used.
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
write your own function that converts a bool to Si/No
|
|
|
|
|
string fromBool(bool value) { return value ? "Si" : "No"; }
modified 12-Sep-18 21:01pm.
|
|
|
|
|
You could try passing in the appropriate CultureInfo into the ToString() method. I don't do much globalization in my code but I think that will work.
Jared Parsons
jaredp@beanseed.org
http://spaces.msn.com/members/jaredp/
|
|
|
|
|
i would to use this way to set a string in message box:
MessageBox.Show("{0} cars found", dataSetLocal.Tables[0].Rows.Count.ToString());
but it shows a messagebox with text = "{0} cars found"
and title 2 got from dataSetLocal.Tables[0].Rows.Count.ToString().
At the place of the message: "2 cars found"
|
|
|
|
|
Try this:
MessageBox.Show(string.Format("{0} cars found", dataSetLocal.Tables[0].Rows.Count.ToString()));
Roy.
|
|
|
|
|
Hi all,
i m doveloping an application in C#, and i want to use popup messages
in my application.
is someone who can help me.
Thank's
Vikrant Singh
|
|
|
|
|
Use the static messagebox class.
MessageBox.Show("error","caption");
|
|
|
|
|
Thank's
But i want Boallon Messages just like an error indicator in our system.
Means if i am opening the CallAction then it will show DueDate if pending
as a ballon Message when it is.
Bye..
Vikrant
-- modified at 14:18 Wednesday 21st December, 2005
|
|
|
|
|
IF your system is using a custom messagebox replacement you'll either need to get it's source, or if source isn't available (ie 3rd party wrote the app) you'll probably need to recreate the functionality from a standard form.
|
|
|
|
|
Thank's
I will try and i will send you the details.
Bye...
Vikrant
|
|
|
|
|
I want to store the path of an Access database that will be used during my application. When the application loads, it can check the path stored in a file of my choosing and determine whether or not the file is still in the same location. How would you suggest I store the path? A text file seems the simplest way to go, but would provide little or no security. Any suggestions would be appreciated. Thanks.
|
|
|
|
|
is this file path relative to the application being built?
or
is it static to each client the app will run on?
If the concern is someone coming across the file path storage device(ie textfile) you could try storing it encrypted then comparing the encyrpted file path
or if its just a concern of someone coming across it and modifying it by 'accident' you could store it in isolated storage...it would be harder for them to find it. there...you could also encyrpt it then as well.
-
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
The Access database itself will be in a location of the customer's choosing, probably on a server, while the the file holding the path will be relative to the application. I was just concerned about somebody who shouldn't know discovering the location of the database. It's probably not a huge concern because I'll put whatever security measures I can in place to protect the database itself. If they tinkered with the file holding the path, the application will simply not run (or not run correctly). I also plan to allow an authorized user to reset the path to the database (through an application form) should anything change (the location of the database, the file holding the path, etc).
Anyway, thanks. I'll try storing the data encrypted.
|
|
|
|
|
Try storing it in iso-storage(isolated) in encrypted form, and then pwd protect the access db...thats the best way i know to keep access safe on someone else's system.
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
Hi all
I am using CSGL Library , and when i am trying to make a debug build from visual studio .net 2003 it succeeded , and when i am trying to make a release build it failed and give me the following message
"An unhandled exception of type 'System.ArgumentException' occurred in system.drawing.dll
Additional information: Invalid parameter used "
how can i overcome this?
|
|
|
|
|
Hi,
I want to display the coordinates of the cusor next to it as it is dragged around a WinForm. I have the following skeleton code....
//////////////////////////////////////////
private void Form_1Paint(PaintEventArgs e)
{
//?? What to do
}
protected override void OnPaint()
{
//?? What to do
}
private void OnMouseMove(MouseEventArgs e)
{
//?? What to do
}
//////////////////////////////////////
I may have gotten some Args or Access modifiers wrong, but this is the general idea...I'd appreciate any code that will get this done... thanks
|
|
|
|
|
try this
private void Form1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
label1.Width = 150;
label1.Text="x = "+ Convert.ToString(e.X) + "\t y = " +Convert.ToString(e.Y) ;
}
|
|
|
|
|
Someone asked this last week and I still had this code in my test app which works
Point myMouse;
protected override void OnPaint(PaintEventArgs e)
{
Point screen = PointToScreen(myMouse);
string location = screen.ToString();
e.Graphics.DrawString("[Screen: " + location + "]",
new Font("Arial",8),
SystemBrushes.ControlText,
(PointF)myMouse);
}
protected override void OnMouseMove(MouseEventArgs e)
{
myMouse = new Point(e.X,e.Y);
Invalidate();
base.OnMouseMove(e);
}
Just paste that into an empty form underneath the constructor and it should work.
|
|
|
|
|
hi there!
i suggest that instead of using a variable and setting it to the OnMouseMove method, you can also use the MousePosition property of your control.
this will return the position of your mouse cursor in screen coordinates.but if you want to convert it to your control coordinates, just use the PointToClient method and pass the MousePosition as a parameter.
Hope that helps!
Advance Merry Christmas and Happy New Year To All!
microsoc
|
|
|
|
|
hi
I want to check if a file exists. I am using the follwoing code:
string tempUrl = "old_images/"+productID+"fvga.jpg";
if (System.IO.File.Exists(tempUrl))
{ productImage.ImageUrl = tempUrl;
}
else
{
productImage.ImageUrl = "Image_coming_soon.gif";
}
However, System.IO.File.Exists(tempUrl) is always returning false. I have copied the url produced by tempUrl into a browser, and the file Does exists.
So, any idea why System.IO.File.Exists() is rturning false.
regards
|
|
|
|
|
using System.IO;
..
.
.
..
string tempUrl = "old_images\\"+productID+"fvga.jpg";
if (System.IO.File.Exists(tempUrl))
{
productImage.ImageUrl = tempUrl;
}
else
{
productImage.ImageUrl = "Image_coming_soon.gif";
}
|
|
|
|
|
You have to specify a physical address, not a logical address. Use Server.MapPath to get the physical address from the logical address.
---
b { font-weight: normal; }
|
|
|
|
|
thanks
Yes, I needed to use Server.MapPath
|
|
|
|
|
here is one good example
http://www.codeproject.com/aspnet/netimageupload.asp
|
|
|
|