|
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
|
|
|
|
|
Hi, how i can read the information of a table into a database, the field names, lengths, the keys and indexes?
|
|
|
|
|
Try looking in the system tables on the Master database.
Roy.
|
|
|
|
|
I Managed to draw on the title bar of a form to give it customized look. Now i want to draw on the taskbar to reflect the same looks on the title bar. Basically i change fonts and draw the caption in different font.one thing to note i don't want to change the system settings. i just want to render the form i am working with.
|
|
|
|
|
By taskbar do you mean to say status bar?
If such is the case then simply define the font size color and style. You should beable to this in both the ide as well in the code.
and regarding the "drawing" do you refer to drawing the text, or drawing an image?
-
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
I think u know the difference b/n task bar and status bar , i think i made it clear i meant task bar. Sometimes it's better to say nothing than "NO-THING" !
|
|
|
|
|
Dear All,
Can I restore the SQL Datbase Backup through C#?
if yes I need some code for that
With Regards
|
|
|
|
|
Have you tried reading the sql Online Books? You should beable to find info on backing-up and restoring by use of a query...
You would just need to set in place a varible or paramater to read from your file input method(textbox entry of file path, etc)
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
I downloaded the software from MSDN Subscritpions
WinFX SDK - Community Technology Preview
1) winFx Runtime Components – September 2005 CTP(English)
2) winFx SDK for the WinFX Runtime components – September 2005 CTP( English)
I downloaded these two ,
First One contains Setup,when I run that one iam getting setup Error.
Iam getting the same error which is mentioned in this site(http://www.ureader.com/message/867599.aspx ) but they suggested to remove previous version of Indigo Beta( March CTP) but I havn't installed that one ,
directly I Installed the New CTP.
It would be a great help, if any one help me in solving this problem
Srinivas
|
|
|
|
|
Hello,
I am looking to find a way to retrieve the name of the method that called the current method. At first I thought there would be something within System.Reflection but unfortunately the only thing I can find is MethodInfo.GetCurrentMethod() which retrieves the name of the method I am currently in.
The reason for this is that I am in the process of creating a logging class, one of the logging functions allows the caller to log that a particular method has been called/exited. For ease and control I would prefer not to have to pass the function name/namespace as parameters. i.e.
private void MyFunction()
{
LogFunctionEntry(MethodInfo.GetCurrentMethod())
}
public static void FunctionEntry(MethodInfo mi)
{
string message = string.Format(
System.Globalization.CultureInfo.InvariantCulture,
"{0}.{1}",
mi.ReflectedType,
mi);
Console.WriteLine(message);
}
At the moment the only other way I think of doing this is to parse through Environment.StackTrace but to be honest this is something I would rather not do.
|
|
|
|
|
The information is in the call stack, so it's from there that you have to get it.
Perhaps there are some other methods that you can use that does some of the work for you. For an example, if you throw an exception and catch it, it will contain a stack trace. Throwing exceptions is quite expensive, though.
---
b { font-weight: normal; }
|
|
|
|
|
Typically I have found the answer to my question within minutes of making the post
Annoyingly it was right here on CP
http://www.codeproject.com/dotnet/MethodName.asp[^]
Solution:
StackTrace stackTrace = new StackTrace();
StackFrame stackFrame = stackTrace.GetFrame(1);
MethodBase methodBase = stackFrame.GetMethod();
string message = string.Format(
System.Globalization.CultureInfo.InvariantCulture,
"{0}|{1}",
methodBase.ReflectedType,
methodBase);
Console.WriteLine(message);
This will output
namespace.function(params)
MyNameSpace.Foo.Bar|MyFunction(object a, object b)
|
|
|
|
|
Aaah, thanks for sharing the info. I found it interesting too.
Did you vote for that kind soul's article?
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
oh yes
Voting is good and I get to feel all warm and fluffy inside
|
|
|
|
|