|
re-populate the list box again from the Database. thats the safest way I think
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Hi,
I want the screenshot of current running application of client machine or any machine that is in LAN.
How can it be possible?
Regards,
sjs4u
modified on Monday, March 17, 2008 3:45 AM
|
|
|
|
|
as for my point of view first you should look into the mechanism of how to take a screen shot on your local machine. If you're successful in that you can then think of using Sockets and all that stuff to get the screen shot of a machine over LAN.
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
So How to get the snapshot of current application which is running on local machine?
|
|
|
|
|
what have done so far for your RnD. I'vent done anything like that myself. and I'm sure you havent also so how far have u gone for your RnD
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
How i can write text on image, using the color pallete of index image like tif,so resulting jpg have text color same like image.Regards,adnan
Many Thanks,
Adnan Rafiq
muhammadadnanrafiq@gmail.com
|
|
|
|
|
JPEGs are never indexed, so you really can't. A jpeg is lossy and no matter what colors you start with, it will go to 24 bit and the lossy compression will add colors.
If you were to save back out as a tiff, then I guess you could find the colors you want my looking through the pallette. I never use 256 color tho, nor do many other people, it's a shame you need to.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
what if we create a bitmat having format System.Drawing.Imaging.PixelFormat.Format24bppRgb ?
Many Thanks,
Adnan Rafiq
muhammadadnanrafiq@gmail.com
|
|
|
|
|
I want to sample project which one handle fund transfer from credit card
|
|
|
|
|
Here[^].
You can't do that without setting up a merchant account with a bank, unless you use paypal or something.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Talk to the bank or merchant that provide you the payment facility.
|
|
|
|
|
I am asking by all by you,if any one know .
I m not asking way of fund transfer,I am asking sample code in C# for fund transfer from credit card
|
|
|
|
|
Hi,
I am instatling application on the computer using .Net.
I want to schedule .exe file which is created in .Net.
Once the machine starts I want to run that .exe using the .Net coding.
Is there any other solution for the same.
Regards,
sjs4u
|
|
|
|
|
So you want to put your application in start up? Here is an example how to do it: Managing Start-up[^]
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Hi i have one doubt regarding creating a object.
I have one class name as Employees. Now i want to create an object for this class. what is the difference between the below two?
1. Employees obj;
2. Employees obj = new Employees()
G. Satish
|
|
|
|
|
Look here[^].
You seem to be asking a lot of entry level questions, do you own a C# book / I hope no-one is paying for you to write code at this time ?
1 does not create an object, it creates space for an object. obj remains null in example 1.
Please buy a book.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi There,
I am trying to watermark an image with Embossed text & with opacity of color. Here is code which i am using.
Problem Description: Watermark & embossed look works K , but i want same color of text (little darker), as the source image have, any idea how to use color pellete of indexed image to draw text with its colors or any other solution, any tip will be highly appreciated.
Image watermarkImage = null;
using (watermarkImage = Image.FromFile(@"C:\NYDN 2008-02-18E\ENV13614\ENV13614 002P.tif"))
{
System.Drawing.Font myFont = new Font("Arial", 58, FontStyle.Bold);
System.Drawing.Color myWatermarkColor = Color.FromArgb(120, 120, 120);
Bitmap btmImage = new Bitmap(watermarkImage.Width, watermarkImage.Height);
// Get a graphics context
Graphics g = Graphics.FromImage(btmImage);
g.DrawImage(watermarkImage, new Rectangle(0, 0, btmImage.Width, btmImage.Height), 0, 0, watermarkImage.Width, watermarkImage.Height, GraphicsUnit.Pixel);
watermarkImage = btmImage;
// Create a solid brush to write the watermark text on the image
Brush blackBursh = new SolidBrush(Color.FromArgb(58, Color.Gray));
Brush whiteBursh=new SolidBrush(Color.FromArgb(58,Color.Black));
//Brush shadowBursh = new SolidBrush(Color.FromArgb(45, Color.Black));
int numofLayers = (int)(watermarkImage.Height / 100);
int lineHeight = 0;
for (int i = 0; i < numofLayers; i++)
{
g.DrawString("© Property of the New York Daily News.© Property of the New York Daily News.© Property of the New York Daily News..© Property of the New York Daily News.", myFont, blackBursh, 1, lineHeight+1);
g.DrawString("© Property of the New York Daily News.© Property of the New York Daily News.© Property of the New York Daily News..© Property of the New York Daily News.", myFont, whiteBursh, 0, lineHeight);
lineHeight += 100;
}
watermarkImage.Save(@"C:\temp.jpg");
}
Regards,
adnan
Many Thanks,
Adnan Rafiq
muhammadadnanrafiq@gmail.com
|
|
|
|
|
Hi i am using this code this some time gives me an error "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
My code:
class PrivateFonts<br />
{<br />
[DllImport("Gdi32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)]<br />
private static extern IntPtr AddFontMemResourceEx(IntPtr pbFont, int cbFont, int pdv, ref int pcFonts);<br />
public System.Drawing.Text.PrivateFontCollection GetFont(string[] FontResource)<br />
{<br />
string NameSpc = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name.ToString();<br />
System.IO.Stream FntStrm;<br />
System.Drawing.Text.PrivateFontCollection FntNc = new System.Drawing.Text.PrivateFontCollection();<br />
int i;<br />
for (i = 0; i <= FontResource.GetUpperBound(0); i++)<br />
{<br />
FntStrm = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(NameSpc + "." + FontResource[i]);<br />
byte[] ByteStrm = new byte[(int)FntStrm.Length];<br />
FntStrm.Read(ByteStrm, 0, Convert.ToInt32((int)FntStrm.Length));<br />
IntPtr FntPtr = System.Runtime.InteropServices.Marshal.AllocHGlobal(System.Runtime.InteropServices.Marshal.SizeOf(typeof(byte)) * ByteStrm.Length);<br />
System.Runtime.InteropServices.Marshal.Copy(ByteStrm, 0, FntPtr, ByteStrm.Length);<br />
FntNc.AddMemoryFont(FntPtr, ByteStrm.Length);<br />
Int32 pcFonts;<br />
pcFonts = 1;<br />
AddFontMemResourceEx(FntPtr, ByteStrm.Length, 0, ref pcFonts); System.Runtime.InteropServices.Marshal.FreeHGlobal(FntPtr);<br />
}<br />
return FntNc;<br />
}<br />
}
|
|
|
|
|
Hi,
I have a requirement to remove some data from the Excel sheet which is located on a remote computer. Afer removing the data, the Excel should be saved on same name only. The problem here is I'm not able to delete the data. It is giving me the error message that "could not access the remote computer....". I have mapped the network drive correctly which gives the access. Please any body help me where I'm going wrong. Do I need to do anything more? Thanks.
Meeram395
|
|
|
|
|
How can i generate a automatic number each time in c#
sandip chandra
|
|
|
|
|
I recommend you read this[^], and the guide on asking questions. I *think* your question is easily answered by google, but it's hard to know for sure, because I'm not entirely sure what you're asking. You want to generate what sort of number ? How does it change ? How long does the sequence maintain state ? What for ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
What about Random class?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Following is the code that illustrates the use of events and delegates.
There is a common thing that is use by both the event and delegates.
I know the basic differece between them (events can be declared in the interfaces.)
But in the following example , I think , I can simply go with only delegates , and no need to use the events
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
<br />
namespace WindowsApplication1<br />
{<br />
public partial class Form1 : Form<br />
{<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
d ddd = new d();<br />
ddd.sd(20);<br />
ddd.fireevent(10);<br />
}<br />
} <br />
}<br />
<br />
namespace WindowsApplication1<br />
{<br />
public delegate void smartdelegate(int i);<br />
public class d<br />
{<br />
public smartdelegate sd;<br />
public event smartdelegate smartEvent;<br />
public void fireevent(int i)<br />
{<br />
smartEvent(i);<br />
}<br />
public d()<br />
{<br />
sd = new smartdelegate(aa);<br />
smartEvent = new smartdelegate(aa);<br />
}<br />
<br />
private void aa(int i)<br />
{<br />
System.Windows.Forms.MessageBox.Show(i.ToString());<br />
}<br />
}<br />
}
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Pankaj Garg wrote: public d()
{
sd = new smartdelegate(aa);
smartEvent = new smartdelegate(aa);
What is the point of this ?
Pankaj Garg wrote: d ddd = new d();
ddd.sd(20);
ddd.fireevent(10);
If you're not going to hook up your delegates on this level, you're wasting your time. If the event is inside the class that fires it, then you can just call it from there.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|