|
Hi Eddy,
Thanks for the reply... But I think you misunderstood my question... Suppose my client's system does not have a font style named "xyz" which I used in my application. I asked how to embed the font in my application and deploy the application on my client's system so that he sees the same font styles that I used while developing the application.
|
|
|
|
|
|
Hi,
have a look at the PrivateFontCollection Class.
|
|
|
|
|
You do need to be careful here, as if they don't have the fonts installed, they might not then have licenses to use them. You don't want to be distributing copyright material now...
|
|
|
|
|
Hi All,
Thanks a lot for the suggestions...
Thanks,
ramz_g
|
|
|
|
|
Hello,
i had build a selfdefinied form in Outlook. This is named by "IPM.Note.Pizza" and is located in the Mailbox. Now I want open outlook with C# (Microsoft.Office.Interop.Outlook) and set the value of the Combobox (CB_Pizza). I know how its look like by a normal mail, but how is the way by selfdefined forms?
Thank you
Christoph Herzinger
|
|
|
|
|
|
well I think you are going to have to pay someone to do it as you don't seem to have the ability to try/do for yourself
Why is it so urgent? Are you getting paid to do this?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Search the articles on this site for Gantt Chart and you will find enough to get you well on your way.
And please avoid using the word "urgent" in any future messages.
|
|
|
|
|
Sounds like you took a rentacoder job and then realised you have no idea how to do it. Contact the client, tell them you are a liar.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi all,
Ok this is the problem. I am using the microsoft MVC web framework to build a web app. I have a method that uploads files to the server by retriving the HttpPostedFileBase files from the HttpFileCollectionBase in the Request. I then invoke the HttpPostedFileBase method SaveAs(path) to save those files to the filesystem.
I have just implemented a Remove method that takes the filename and path, ensures the existence of the file by calling File.Exists() then attempting to call File.Delete() to remove the said file. The problem is when I have just uploaded this file, when I go then to delete it right away I get a
"The process cannot access the file 'C:\....\file.jpg' because it is being used by another process."
Now I suspect that that HttpPostedFileBase method SaveAs() has locked that file and not released it. But I am not 100% sure. My only other suspision is that the actual page view method goes and does a:
DirectoryInfo info = new DirectoryInfo(imagesPath.ToString());
FileInfo[] files = info.GetFiles();
In order to retrieve all the files located in that directory. One of the two of these is locking that file. I am more inclined to believe its the SaveAs() method as the remove works intermittently and if it were the page view I'd expect it not to work ever.
Does anyone know anything about this, I have been googling away like mad trying to find out how to get HttpPostedFileBase to release the file its just saved with no avail.
Cheers.
|
|
|
|
|
Hi daviiie;
I have exactly the same issue and tried this, thinking SaveAs locking the files as you did but id didn't work, so something else is locking the files:
using (FileStream fs = new FileStream(fileName_save, FileMode.Create))
{
byte[] bytes = new byte[Request.Files[i].InputStream.Length];
Request.Files[i].InputStream.Read(bytes, 0, (int)Request.Files[i].InputStream.Length);
fs.Write(bytes, 0, bytes.Length);
fs.Close();
}
Did you have any progress for the issue?
Thanks.
|
|
|
|
|
Hi,
Please let me know how to open a file from .net application.
Thanks in advance.
|
|
|
|
|
StreamReader sr = new StreamReader(fileName);
StreamWriter sw = new StreamWriter(fileName);
|
|
|
|
|
Thanks for your quick reply.
To open in a program, we use readers and writers.
But I would like open a file as like we open a file by double-click in system folders.
I have list of file paths in listview.
when I select those, corresponding files should get open.
Please guide me to achieve this.
|
|
|
|
|
System.Diagnostics.Process.Start(filename);
|
|
|
|
|
Use <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx">Process.Start</a>[<a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx" target="_blank" title="New Window">^</a>] .
Enjoy
I are troll
|
|
|
|
|
See Process.Start(fileName) - that'll do 'er.
You beat me too it!
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced
|
|
|
|
|
Thank you all for your support.
Its working
|
|
|
|
|
Hi all,
I want to store some files in a database. So it would be nice to keep all information (fileinfos, attributs and rights)
when they will be restored.
Is there a way to get all the (file)informations on block (struct) and not to collect them by each item with
FileInfo or FileAttributes.
And the next question is how to restore these fileinfos in an similar, easy way ?
tnx
frank
|
|
|
|
|
Hi,
I am executing the batch file with Process.Start(); I want to show the progress bar to the user. As it take so much time, so the user should get that its working, otherwise it seems to be hanged out.
(Note: Currently I m showing status label as process is running, but its not look good.)
Please advise me for the same.
My mail id: nitin.jenekar@gmail.com
modified on Thursday, April 23, 2009 7:49 AM
|
|
|
|
|
We don't respond by email here. Any replies are posted to the forum for the benifit of others.
Just add a progress bar to your form. If you want your UI to remain responsive you can hook it up to a background worker like I've done here[^].
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
But batch file and windows form's progess bar/ marquee are two different process. How to run both simultaneously. As when batch process gets started, it freezes other processes.
Regards,
Nitin Jenekar
|
|
|
|
|
Start the batch file in the DoWork event handler
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Its not as easy to implement for me. Please guide me more.
As I have tried to execute the batch file from DoWork, its not doing whatever is desired.
My batch process runs for minimum 20-30 min.
On button click, I am runnnig following code.
Please let me know how to execute the progress bar in parallel to this.
string filePath = txtPath.Text + "\\UploadTemplates.bat";
Process proc = new Process();
proc.StartInfo.FileName = filePath;
proc.StartInfo.WorkingDirectory = txtbinPath.Text;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardInput = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.WindowStyle = ProcessWindowStyle.Minimized;
// Start the process
string startTime = DateTime.Now.ToString();
proc.Start();
// Attach the output for reading
StreamReader sOut = proc.StandardOutput;
// Close the process
proc.Close();
// Read the sOut to a string.
string results = sOut.ReadToEnd().Trim();
//sOut.Close();
string endTime = DateTime.Now.ToString();
sw = File.CreateText(txtbinPath.Text + "\\UploadResult.txt");
sw.WriteLine("Process started at :" + startTime);
sw.WriteLine(results);
sw.WriteLine("Process completed at :" + endTime);
sw.Close();
|
|
|
|