|
string filename = "Doc1.[my extension]";
TextWriter stringWriter = new StringWriter();
using(TextWriter streamWriter = new StreamWriter(filename))
{
}
only two letters away from being an asset
|
|
|
|
|
hello as the world document is prepared by user and save with .docx Extension
A user prepared his meterial and when he save his meterial(all meterial is on the form contain tool images audio vedio As well as text) when a save button of project is clicked it save iot with Extension .eat
|
|
|
|
|
You need to explain a little more. You are assuming I know everything about this application. What files? What project? What material?
If you have a file, just change the extention. http://dotnetperls.com/path-changeextension[^]
only two letters away from being an asset
|
|
|
|
|
i am creating S/w for Elearning just like Lactora E Learning or Course lab i want to assign an Extension for my Project through which all files of that project are identified as MS WORD all files are save With Filename.docx
|
|
|
|
|
I have given you two solutions. What part don't you understand.
only two letters away from being an asset
|
|
|
|
|
You can create the file with any extension you want.
Are you asking how to associate that extension with your application so your app will start when a file is double-clicked?
|
|
|
|
|
|
Using Visual Studio, I set that up in a deployment project.
Right-click the project, select View|File Types, right-click, select Add File Type
|
|
|
|
|
there are a lot of ways to do it.
consider 'File.Move(old_Path, new_Path)';
very easy.
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 22:03pm.
|
|
|
|
|
sorry i'm not asking for move a file from one location to to anotrher i'm asking for assign my own extention to my project files
|
|
|
|
|
I have a database including tables
Item_Master(Item_Code, Item_Model)
Invoice(Invoice_Code, Invoice_Amount, etc)
Invoice_Item(Invoice_Code, Item_Code, Item_Model, Item_Make, Unit_Price, Quantity)
Invoice_Item_Serial_Number(Invoice_Code, Item_Code, Serial_Number_1, Serial_Number_2)
Invoice_Item_Serial_Number.Invoice_Code refers Invoice.Invoice_Code
Invoice_Item_Serial_Number.Item_Code refers Item_Master.Item_Code
Invoice_Item.Invoice_Code refers Invoice.Invoice_Code
Invoice_Item.Item_Code refers Item_Master.Item_Code
Each Item has atleast One serial Number
I wish to get the following output in crystal report.
Item_Code Item_Model Item_Make Unit_Price Quantity Total
22 AC12 Bluestar 18000 1 18000
Serial Number_1 Serial Number_2
DXDEC11 DXSDSC22
24 AC1 Bluestar 15000 3 45000
Serial Number_1 Serial Number_2
REDDED3 EWSSD34
DEF443D DEWS332
REFSD23 EWWDW34
22 AC08 Bluestar 12000 1 12000
Serial Number_1 Serial Number_2
FSDXDEC11 XSDDC22
Can you please let me know how should I setup my Crystal Report's Detail section to get the above output
Thanks
Sukhjinder
Looking for help on my OpenSource Media Player LetsYo
|
|
|
|
|
How can i get an Image from WebBrowser?
WebBrowser is at Image url: http://xxxxx.xx/Image.jpg
but source of that is like a page that contains a picture. I want to get that stream.
I don't want to use FileWebRequest.
|
|
|
|
|
amir19 wrote: I don't want to use FileWebRequest
Good because FileWebRequest is not appropriate in this context anyway. Use WebRequest.
only two letters away from being an asset
|
|
|
|
|
I used FileWebRequest and WebRequest. But i want to get images from WebBrowser. I want to get image from the session that user is working with. Images are dynamic for users.
|
|
|
|
|
Please explain more about your application and what you are trying to accomplish
only two letters away from being an asset
|
|
|
|
|
I'm creating a website and an application for that. I want to my users use website in a windows app. I created an invisible webbrowser and i send login data from it. When i want to download user's image and other images from site, my site can't recognize user. I want to use images in webbrowser in picturebox or download them with session of webbrowser and then show them.
|
|
|
|
|
amir19 wrote: I created an invisible webbrowser
amir19 wrote: I want to use images in webbrowser in picturebox
What's the point of this? You can't simply just display the WebBrowser? Can they access the site without your application? If so, why would they use your app?
only two letters away from being an asset
|
|
|
|
|
I want my users use my site offline too with downloaded data and search in them.
|
|
|
|
|
amir19 wrote: offline
If they are offline how do you intend to authenticate and access the webpage to get the images
I think you're confused and should stop and think a bit.
only two letters away from being an asset
|
|
|
|
|
1) c# WebClient Object, you can download the image by it.
2) of course, you can copy the image to Clipboard by webBrowser, it's not very good way.
IHTMLDocument2 doc = (IHTMLDocument2)ie.Document.DomDocument;
IHTMLControlRange imgRange;
HTMLBody body = (HTMLBody)doc.body;
Bitmap bmp = null;
foreach (IHTMLImgElement img in doc.images)
{
if (img.src.IndexOf("someinfo") > 0)
{
imgRange = (IHTMLControlRange)body.createControlRange();
imgRange.add((IHTMLControlElement)img);
imgRange.execCommand("Copy", false, null);
bmp = (Bitmap)Clipboard.GetDataObject().GetData(DataFormats.Bitmap);
}
}
if (null != bmp)
{
//deal with the Image
}
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 22:03pm.
|
|
|
|
|
I have a multi line text box, wordwrap set to true. No matter what character sequences I place at the end of each line using a hex text editor to build a text file, the text still streams when I loaded the .txt file into the text box. I have tried all combinations of trailing x'0D' x'0A'
Any ideas?
Thanks,
David
pongfar@comcast.net
|
|
|
|
|
Why are you using a hex editor? Notepad, WordPad or Word will all produce correctly formatted text files with newline sequences in the proper place.
faltopar wrote: the text still streams when I loaded the .txt file into the text box.
I'm not sure what you mean by this statement, can you explain?
|
|
|
|
|
i don't understand your mean clearly.
1)
you should use 'streamwriter' to save to file, 'streamReader' to read from file
, use(Utf-8) Encode.
2)
may be you should consider to change to right ''Hex,Octal,Binary。。。。“ before show to 'multi line text box',
after you read form file.
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 22:03pm.
|
|
|
|
|
I have a C# application which uses a COM dll that was registered when some third party software was installed. So when I added a reference to it in visual studio, it naturally created an Interop.dll, and that's what I have a reference to.
My problem is that I wanted to send the program to a friend and he doesn't have that 3rd party software on his machine.
What's the best way to deal with this? I tried adding a reference to the dll file itself instead of using the COM tab, and that seemed to work, but it looks like it involves the path to that file on MY machine, which probably won't work on his side either. Copy Local is set to TRUE, but that seems to just copy in the Interop dll. I've had experience with a setup installer packaging the needed files and registering them for you, but i'd like to avoid an installer. we'll be doing rapid dev-test cycles and it's nice to be able to just 'drop-install' the files on his machine.
Anyone able to guide me on this?
|
|
|
|
|
If you send him the com dll just get him to open a cmd prompt and run regsvr32 <path_to_com_dll> .
|
|
|
|