|
Rajdeep.NET wrote: And moreover, my clients wont be having Visual Studio.NET installed on their system
VS .NET is just an editor and your client don't need to install that at all. Your client needs to install only .NET framework redistributable package. If your application is using only the framework classes, copying EXE may work.
|
|
|
|
|
If you have developed a .NET application (which by all the other questions you have posted in he last week or two seems very likely) then the target machine must have the .NET framework installed. I could be wrong, but I believe Vista has this automatically, but definately XP doesn't.
Prior to .NET (native code) EXE files do not always require more than just the EXE file.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
It's quite possible to accomplish that you need only the .exe file to run the application, but then you have to be careful not to use anything that is stored outside of it.
The configuration file is not for Visual Studio, it's for the program itself. Some controls (for example the OpenFileDialog) saves informtion in the configuration file. If you use a control that does, you either need the configuration file, or you need to change the settings of the control so that it doesn't use the file.
If you have referenced any libraries that is not in the framework, you need those .dll files along with the .exe file.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Rajdeep.NET wrote: Debug
That might be your problem. Try a release build.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
That should be fine, you must be missing something.
|
|
|
|
|
Hi
I am working with office interops to read excel data. I need some way to release the excel.exe images opened by the program whenever a crash occurs. I've enclosed the application call in the Main() method with try {run application} catch{get rid of excel}. This works but it's a bit ugly. Is there any other way I can do this?
Thanks
Karl
|
|
|
|
|
aastudent wrote: This works but it's a bit ugly
Why? It looks Ok to me.
|
|
|
|
|
I code the C# program
I would like to know how to improve the time that my code generates the thumbnails
(I use getThumbnail module)
Image size is about 3 - 4 K. Now, It spends 1 sec. per image.
The commercial app. like ACDSee spends less than 1 sec.
Any methods or modules for C# that speed up the thumbnail generation please advice.
Or that's just C# GDI's module limitation.
Thank you.
|
|
|
|
|
Hi,
I can´t understand this:
help!
I´m developing application, and it´s using iText Library for generate PDF. The text input must be Rich formated. The pdf document generated, must be exactly equal to text. I´m parsed the text, for generated font name, color,size and then, the objects needed for iText ( it´s not support RTF to PDF conversions )
I´m using RichEdit Control, but the font size is not correct in comparission with the generated pdf. ( also are images objects ).
Then, I did a SIMPLE test with the DrawString method (gdi), ( same text, same font name and font size ), but they are not equal WIDTH. ( Richtext and drawtext ).
The height and the size of each character are equal. The only diference is the char spacing
Conclusion: using a DrawString method generated the correct pdf (correct size).
Why occurs this ?
I need resolve this problem with the fuc... Rich Edit Control.
Thanks!
PS: sorry for my poor english
modified on Wednesday, May 13, 2009 1:29 AM
|
|
|
|
|
I think that this is all because of the differences in the ways that GDI and GDI+ handle text.
Take a look at GDI v GDI+[^].
There are lots of articles/snippets out there, just Google for gdi v gdi+.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
How can we determine a device type using IP address. I want to know whether the device is a desktop or laptop or IP phone .... Input for this is IP address. I got the Manufacturer of the device by fetching MAC address using IP.
Thanks in advance...
Lekshmi
|
|
|
|
|
And may I know, what has this got to do with .NET?!
|
|
|
|
|
Actually I think you can't. I know that there are some possibilities, but not determining it just from the IP address, if you ask me.
Please correct me if I am wrong, would be interesting to know.
Cheers
You have the thought that modern physics just relay on assumptions, that somehow depends on a smile of a cat, which isn’t there.( Albert Einstein)
|
|
|
|
|
There is a ICMP Node Information Query request that can be issued, but I am not sure what information it returns - I've never used it. Google is (hopefully) your friend here!
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Dear All,
That's strange that when I use TryEnter in Timer event which triggers every 1 sec, the TryEnter() always returns true. Why there is such an error?
public partial class Form1 : Form
{
private object BlockingObj = new object();
private void timer1_Tick(object sender, EventArgs e)
{
bool ret = System.Threading.Monitor.TryEnter(BlockingObj, 1);
if (ret){
try
{
DialogResult result = MessageBox.Show("test", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
}
finally
{
System.Threading.Monitor.Exit(BlockingObj);
}
}
}
}
|
|
|
|
|
geossl wrote: the TryEnter() always returns true. Why there is such an error?
Which means it is able to get a lock on the supplied object. You are releasing that lock in finally block as well. So next time when timer ticks, object will be available for locking again. I think TryEnter is behaving as expected.
|
|
|
|
|
There are a couple of things here:
1) Please try to use the "code block" button below to enclose your samples - it preserves the formatting and make it easier to read.
public partial class Form1 : Form
{
private object BlockingObj = new object();
private void timer1_Tick(object sender, EventArgs e)
{
bool ret = System.Threading.Monitor.TryEnter(BlockingObj, 1);
if (ret)
{
try
{
DialogResult result = MessageBox.Show("test", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
}
finally
{
System.Threading.Monitor.Exit(BlockingObj);
}
}
}
}
2) The code: TryEnter attempts to establish an exclusive lock on the object. If it suceeds, then you display a messagebox (which is application modal, so the App can do nothing else until it is dismissed) then release the lock.
Comments:
A) because you release the lock in the timer event in which you establish it, it will always succeed.
B) Why keep the result of a MessageBox if you are going to ignore it?
C) Under what circumstances do you expect MessageBox to throw an exception? By all means put the try...catch around the exclusive lock, that will catch null objects, but otherwise it just complicates your code unneccessarily.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
TryEnter always succeeds because you are always calling it on the same ( UI ) thread and Monitor is reentrant.
Your MessageBox doesn't totally block the UI thread. It runs a partial message loop and one of the messages it processes is the Windows.Forms.Timer message. Therefore, when the next tick happens, your handler is run again from inside the MessageBox message loop. TryEnter succeeds because the UI thread already owns the lock and Monitor allows a thread to lock an object multiple times.
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
Dear,
I've downloaded "OutlookBar v2 2005" vb.net project from CodeProject. But I want to convert from vb.net project to C #.
Where can I find the program to convert or Visual Studio .Net has a build-in option to do that?
Many thanks,
Chuon Visoth
Angkor Wat - Cambodia
asp.net - c sharp beginner
|
|
|
|
|
.NET has no option to do this and you can find anny number of online converter tools. All you have to do is Google for "vb.net c# code converter".
|
|
|
|
|
Thanks for help!
Chuon Visoth
Angkor Wat - Cambodia
asp.net - c sharp beginner
|
|
|
|
|
Is there any way without selecting to change the format of the text? I mean, if I can set the format in the time of constructing the text?
richTextBox1.Text = (this bold)blah blah (this italic)blah
Like using html, is it possible?
Or do I have to select and change for each thing?
|
|
|
|
|
You have to select and change for each string. Unless you know RTF formatting codes like the back of your hand. It's not like HTML...
|
|
|
|
|
hey im new here
basically im using c# i need to write to a varible then out put it from diffrent classes
[code]
public class profile
{
public string postcode;
public void profileupdate()
{
Console.WriteLine("please enter postcode");
postcode = Console.ReadLine();
}
}
[/code]
im trying to inherit in this class
[code]
public class print
{
public void printseat()
{
profile profileupdate = new profile();
Console.WriteLine("" + profileupdate.postcode + "");
System.Threading.Thread.Sleep(1000000);
}
}
[/code]
i have a feeling it is because im inheriting a new instance of the varible but im not sure how to overcome it?
|
|
|
|
|
Hi,
when calling printseat on an instance of your print class, you create a new instance of profile; and you store it in a variable named profileupdate however that is completely unrelated to the profileupdate() method.
So probably the profileupdate() method never gets called at all (it is not called by the code shown), hence the postcode shown on the Console will be zero, its initial value.
BTW:
1. rather than waiting 15 minutes before your app ends, it makes sense to perform Console.ReadLine() ; that will have your app wait until you hit the ENTER key.
2. I strongly suggest you choose better names for all variables, methods, properties, etc; a careful choice for each of them makes your code much more readable and will allow you (and others) to more easily see what is going on, and to locate bugs if any.
3. please use PRE tags (e.g. by clicking the "code block" button under the textbox) to show code in a nice non-proportional font while preserving formatting.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|