|
You forgot joke icon for your post.
|
|
|
|
|
Hi All,
I want to call C# Dll in Javascript.
How can I use Method of this DLL using Javascript.
Regards
Sunil
|
|
|
|
|
|
Dear all,
I have a c# application like Form1.exe.
How to hide it form vista task manager application list?
In XP, when i set ShowInTaskbar to false, there is no
Form1.exe in the application list.
But in vista, i can see Form1.exe in the application list.
What is different between XP and vista behavior?
I want to ensure no user closed my application uncareful.
Thanks a lot!
modified on Tuesday, September 30, 2008 4:18 AM
|
|
|
|
|
why would you want to do that? Looks like a suspicious application. Users usually don't close application from task manager and if a user wants to do so it means that the app really deserves it.
|
|
|
|
|
Thank for your answer.
But i modify my message.
I am sorry for my expression.
|
|
|
|
|
You can't. If you do a search here on CP you will see this question has been answered several times in the last few days.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Can anyone help me?
Iam trying to embed an html file to my mail application. But the html file is display as an attachment. Pls send me a solution to display the html file as mail's body.....
Thanks in advance
Praji
|
|
|
|
|
|
Problem were not solved.
In place of giving like
string body = ";
body += "";
body += "this is some HTML text";
body += " ";
i want to give a file name containing all these.. So pls help...
|
|
|
|
|
I don't think specifying just file name will result in the same behavior you need. But If you know name of the file, yo can read its content using StreamReader class and use it according to you needs.
|
|
|
|
|
Could u pls help me for that... Send me the code..
Thanks
|
|
|
|
|
Read the documentation for StreamReader class and it should be obvious to you how to do it.
KP_Prajilal wrote: Send me the code..
Oh yes, I will.
|
|
|
|
|
Hallo Everyone
1st i would like to start off by saying how amazing the people on this site are. I am registered at many places and not event one comes close to this site. The replies are quick and even if someone can’t help you they do leave their comments.
Thanks a lot to all who contribute. It really helps a lot for our newbie’s!!!!!
Now for my next Q?
I am new to .NET. The company I am working for now has a DAL framework that they use.
It has Datasets and upon saving we call a method to determine if the row’s is deleted, detached, added or modified and it calls a stored proc to do the desired action. Now this works very well and easy for single tables.
But I am having problems when I need to display 2+ tables
Example (I know this is silly but it replicates the scenario the best)
Table 1(stored ingredients for a recipe)
Identifier
Name of Ingredient
Table 2 (Stores what ingredients are added to make a ...)
Identity
Name of recipe
Ingredient user
Now I need to display a list of ingredients to the user and they need to choose what to use.
As in....
Please select the ingredients needed for a pie
(Ingredients listed from table 1)
Water
Flour
...
I need to list the ingredients of table 1 and upon saving save it to table 2. Which I can do by adding them to the table 2 upon saving and then let the normal DAL framework write the info to the database as Added rows.
But the problem comes in when I need to amend the current recipe. How do I handle the data to display and the saving of the data?
If anybody can give me some background info on how to use this or point me in a direction it will be gr8 thanks.
Thanks,
Christiaan
|
|
|
|
|
You should really be asking this of the people who designed your DAL, they have done the design and should have allowed for this scenario as it's pretty common. What you are looking for is the facility to use transactions.
Hope this helps
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I have device application developed in C#. I have to integrate it with barcode scanner application. Can someone provide steps for it?
|
|
|
|
|
Please specify the problem more exactly, it is quite impossible to say what you should do without knowing the context..
Do you have to integrate a barcode scanner in an existing application?
|
|
|
|
|
i have an application which is developed in C#. I have a motorola device with a scanner. I have to integrate my application so that i can read one data at a time from scanner and displayy it on the screen. Hope i have made myself clear.
|
|
|
|
|
Well, you should first read the documentation of the scanner. Some scanner for example simulate keystrokes after scanning a barcode.
You can catch them and validate the barcode (probably EAN or UPC) via the check digit and than display it, or do whatever you have to do with it.
If your scanner is a more sophisticated one, it will probabely have some kind of interface with more advanced functionality.
Hope I could help you...
Phil
|
|
|
|
|
I need to read the document. I am using MC70 Scanner fone. How can i capture the Scan button of the device?
modified on Tuesday, September 30, 2008 6:27 AM
|
|
|
|
|
i want to crop an image... picture is in picture box,,
iam trying this...
but
public void CropImage(bool enableImg)
{
cropEnable = enableImg;
if (cropEnable)
{
Rectangle cropArea = new Rectangle(20, 20, 100, 100);
Pic = (Bitmap)CroppingImage(m, cropArea);
m = (Bitmap)Pic;
Invalidate();
}
}
public Image CroppingImage(Image img, Rectangle cropArea)
{
Bitmap bmpImage = new Bitmap(img);
Bitmap bmpCrop = bmpImage.Clone(cropArea,
bmpImage.PixelFormat);
return (Image)(bmpCrop);
}
and the 2nd one:
public Image CropImage(Image img, Rectangle rect)
{
return ((Bitmap)img).Clone(rect, img.PixelFormat);
}
private void button1_Click(object sender, EventArgs e)
{
Rectangle CropRectangle = new Rectangle(100, 100, 100, 100);
pbx.Image = CropImage(pbx.Image, CropRectangle);
}
but a same error is generated.
error is this:
Error 1 Inconsistent accessibility: parameter type 'I_M_Editor.Rectangle' is less accessible than method 'I_M_Editor.frmEditable.CropImage(System.Drawing.Image, I_M_Editor.Rectangle)' D:\dot.net.programs.using.c#\0eh066\I'M Editor\I'M Editor\frmEditable.cs 442 22 I'M Editor
--------------------------------------------------------------------------------
maifs
|
|
|
|
|
i am trying this but
private void pbx_MouseDown(object sender, MouseEventArgs e)
{
en = true;
}
public void FlagEnableForRotating(bool enable)
{
enable2 = enable;
}
public Bitmap rotateImage(Bitmap b, float angle)
{
if (enable2)
{
int maxside = (int)(Math.Sqrt(b.Width * b.Width + b.Height * b.Height));
////create a new empty bitmap to hold rotated image
Bitmap returnBitmap = new Bitmap(maxside, maxside);
////make a graphics object from the empty bitmap
Graphics g = Graphics.FromImage(returnBitmap);
//move rotation point to center of image
g.TranslateTransform((float)b.Width / 2, (float)b.Height / 2);
//rotate
g.RotateTransform(angle);
//move image back
g.TranslateTransform(-(float)b.Width / 2, -(float)b.Height / 2);
//draw passed in image onto graphics object
g.DrawImage(b, new Point(0, 0));
return returnBitmap;
}
return b;
}
private void pbx_MouseMove(object sender, MouseEventArgs e)
{
if (en && enable2)
{
pbx.Image = rotateImage(m, e.Y);
}
}
private void pbx_MouseUp(object sender, MouseEventArgs e)
{
en = false;
enable2 = false;
}
private void tsxImagesRota_Click(object sender, EventArgs e)
{
frm2.FlagEnableForRotating(true);
}
it is rotating but i want to set it on numericUPDOwn ,when user press on numericUpDown then its rotating continuously
hghghgh
|
|
|
|
|
The old DataGrid has a great feature, compared to new DatagridView, that it can display maste/detail relational data. We only have to load master table and detail table into a DataSet and set the relationship between them, then set DataGrid's DataSource property to the DataSet and DataMember property to the master table name. The DataGrid displays master table contents with a + sign and once you click the + sign, the relation name appears as a link if you click that the child content will appear. As you notice there is round trip to display the child records and master records.
I want the datagrid to display master table records along with child table records INLINE that is: parent row, then beneath that child rows, then the next parent, so on..
Can anybody help me please? I am working on Windows.Forms.DataGrid
Kutty
|
|
|
|
|
i want to create a negative filter of any image..
i am trying this...
public void Negative()
{
Bitmap copy=new Bitmap(m.Width,m.Height);
ImageAttributes ia = new ImageAttributes();
ColorMatrix cm = new ColorMatrix();
cm.Matrix00 = cm.Matrix11 = cm.Matrix22 = 0.99f;
cm.Matrix33 = cm.Matrix44 = 1;
cm.Matrix40 = cm.Matrix41 = cm.Matrix42 = .04f;
ia.SetColorMatrix(cm);
Graphics g=Graphics.FromImage(copy);
g.DrawImage(m,new Rectangle(0, 0,m.Width, m.Height), 0, 0, m.Width, m.Height, GraphicsUnit.Pixel, ia);
g.Dispose();
m.Dispose();
}
but here is some error occur in this.......
error is:
Error 2 Argument '2': cannot convert from 'I_M_Editor.Rectangle' to 'System.Drawing.Rectangle' D:\dot.net.programs.using.c#\0eh066\I'M Editor\I'M Editor\frmEditable.cs 688 15 I'M Editor
and
Error 1 The best overloaded method match for 'System.Drawing.Graphics.DrawImage(System.Drawing.Image, System.Drawing.Rectangle, float, float, float, float, System.Drawing.GraphicsUnit, System.Drawing.Imaging.ImageAttributes)' has some invalid arguments D:\dot.net.programs.using.c#\0eh066\I'M Editor\I'M Editor\frmEditable.cs 688 1 I'M Editor
}
hghghgh
|
|
|
|
|
You may have a problem with namespace and refer to wrong Rectangle. Try adding the namespace like:
maifs wrote: g.DrawImage(m,new Rectangle(0, 0,m.Width, m.Height), 0, 0, m.Width, m.Height, GraphicsUnit.Pixel, ia);
g.DrawImage(m,new System.Drawing.Rectangle(0, 0,m.Width, m.Height), 0, 0, m.Width, m.Height, GraphicsUnit.Pixel, ia);
The need to optimize rises from a bad design
|
|
|
|