|
How do i add a Tab space programatically like you add comma to string.
Suppose i have something like Mike Bond
I want to add tab space between Mike and Bond
i.e Mike Tab Space Bond
|
|
|
|
|
"Mike\tBond"
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
mystring += "\t"
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
i want to make C# application that can search to any statment and then replace this statment
how can make my application will print this word file
finaly i dont want to make save to any change at this file ( close file without save)
Palestine
|
|
|
|
|
Hello
TAREQ F ABUZUHRI wrote: i want to make C# application that can search to any statment and then replace this statment
That's possible through COM interop. Just make a reference to "Microsoft Word Object Library" in the COM tab. This implies that Microsoft Word should be installed on your machine AND the user's machine for this to work.
Search your MSDN for "Microsoft Word Interop" for more info
TAREQ F ABUZUHRI wrote: how can make my application will print this word file
Same as the above.
TAREQ F ABUZUHRI wrote: finaly i dont want to make save to any change at this file ( close file without save)
Make it readonly, or when the changes event is fired -Don't know its name - Make sure to check if it's from the user or your replacer. If the user made those changes, cancel them.
If you can't get through MSDN with that, just repost.
Regards
|
|
|
|
|
do u have any example code to do this ....
Palestine
|
|
|
|
|
|
Hi all
i was coding from one pc which has Excel 2000 Installed and i was successful in interfacing with c# ... but when i try to run the same in another pc with Excel 97 , it fails . Gives a runtime error ...
is it not compatible with 97?
how can i ressolve this issue ??
Thanks
Akhil
|
|
|
|
|
AnnnS wrote: how can i ressolve this issue ??
Upgrade excel. 97 is almost 10 years old after all...
|
|
|
|
|
Install the dll used for 97
It would be best to use reflection to late bind to it
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
Hello
Pf course I'll assume you are doing this using COM interop. Actually the dll that's in your application's folder is something like a router. All it does is to call whatever version of Excel that's present on the user's computer to do the job.
So it all depends on the version that's installed on the runtime machine. To solve the issue you have two options:
1- In the reference list of your project try to set ht eIsolated property of the interop library to true -this tries to prevent version conflect, but sometimes doesn't work-
2- Make Excel 2000 as a "minimum requirement" for your application, so that users would know that have to have it on their machines.
3- Remove whatever features you are using that requires Excel 2000 to be on the machine -This is NOT guranteed to solve the issue. Actually it's likely NOT to work!-
4- You can also try 3rd party libraries which doesn't require Excel to be installed at all.
And for the solution suggested by Ista,it would work, but it's hard to implement specially with large applications such as Excel, as each dll may call other functions in other dlls.
Regards
|
|
|
|
|
Hi to all,
I want to perform DirectShow coding in VC# 2005. In that I want to set properties of 'Mpeg-2 Demultiplexer' Filter.
Regarding that I have code written in C++ as follows,
BYTE SeqHdr[] = { ... };
<br />
AM_MEDIA_TYPE mt;<br />
ZeroMemory(&mt, sizeof(AM_MEDIA_TYPE));<br />
mt.majortype = MEDIATYPE_Video ;<br />
mt.subtype = MEDIASUBTYPE_MPEG2_VIDEO;<br />
mt.formattype = FORMAT_MPEG2Video;<br />
<br />
mt.cbFormat = sizeof(MPEG2VIDEOINFO) + sizeof(SeqHdr);<br />
mt.pbFormat = (BYTE*)CoTaskMemAlloc(mt.cbFormat);<br />
if (mt.pbFormat == NULL)<br />
{<br />
}<br />
ZeroMemory(mt.pbFormat, mt.cbFormat);<br />
<br />
MPEG2VIDEOINFO *pMVIH = (MPEG2VIDEOINFO*)mt.pbFormat
This code is obtained from http://windowssdk.msdn.microsoft.com/en-us/library/ms787857.aspx[^]
How to Convert it into C#? What is the interface for 'MPEG2VIDEOINFO' in C#?
Thanks & Best Regards,
Aniket
|
|
|
|
|
Search for the DirectShow.NET lib on SourceForge. Then once you have it figured out, write an article
|
|
|
|
|
leppie wrote: Search for the DirectShow.NET lib on SourceForge.
I have DirectShow.NET lib. And I have designed a filter graph using it in C#. But when I tried to set properties of 'Mpeg-2 Demultiplexer' Filter using IMpeg2Demultiplexer Interface in C#. This I have done in VC++, for following properties I failed to convert in into C#.
memset(&Video_Info , 0x0 , sizeof(MPEG2VIDEOINFO));
#if !USE_DUMP_EX_FILTER
pMediaVideoType.cbFormat = sizeof(MPEG2VIDEOINFO);
#endif
#if !USE_DUMP_EX_FILTER
pMediaVideoType.pbFormat = (BYTE *)&Video_Info;
#endif
( pMediaVideoType is of 'AMMediaType' DataType). I didn't found Interface 'MPEG2VIDEOINFO' in C#. What should be done to set this properties?
Plz, help me.
Regards,
Aniket
|
|
|
|
|
Is there any way that i can receive any arguments from any Audio or media files or vice versa? ex: mp3 !!!
please help me !!!!
|
|
|
|
|
Tell it you don't like its mother - That'll usually start an argument.
|
|
|
|
|
Hello
What is exactly your definition of "arguments"? Maybe you mean metadata??
Regards
|
|
|
|
|
Parameters
|
|
|
|
|
Hello
Parameters??!! How and why on earth would you send or receive parameters from a file?? Are you joking?? Post more details on what exactly you are trying to do.
Regards
|
|
|
|
|
like fscommand("Commandname","argumant") in flash that cause an argumant from swf file send to C#.
forget anything about my question.i can manage it myself, otherwise i have to spend many time to write that u get my mean.;P
|
|
|
|
|
Hello All,
My requirement is that after I access a machine as \\machinename, I want to see if Printers and Fax folder is listed or not.
Please point me to any sample code or APIs that can enumerate the objcets in the \\machine window or see if an item exists in the window or not.
I see that there are couple of shell APIs like but I didnt know how to use them for my case.
Thanks in Advance...
|
|
|
|
|
Hello
Actually you won't be seeing any printers on that machine unless they are shared, otherwise it would be hacking. If the printer is already shared on the network, then why not acces it from your machine?
Regards
|
|
|
|
|
Thanks for the reply Nader.
Actualy Couple of printers are shared on the machine and I can safely access them. But my requirement is to find if the Printers and Fax folder is listed or not.
Thats I was thinking of enumerating the objects in the window and see if one of the objects is "Printers and Fax" folder.
Please help.
Thanks
|
|
|
|
|
Hello
Well, now I see. Two approaches:
1- Access "\\Computer" and try to enumerate everything on it. This will depend on how you access it.
2- If you you just want "Printers and Faxes" then in a try to access it by "\\Computer\Printers and Faxes"
Regards
|
|
|
|
|
Hello ...
I access another machine from the run command.
I use Process.Start(@"\\" + sMac); and it opens the window for me. Let me know how do I enumerate the objects now.
Also "\\Comp\Printers And Faxes" didnt work for me. Its says no network provider has accepted the path. Let me know if its the right usage.
I think there must be some WMI scripting as well to enumerate the list.
Any piece of source is fine with me.
Thanks in Advance.
|
|
|
|