|
Pedro S Ferreira wrote:
So is there any better way to do this?
Actually, no. You can use regular expressions to ease things a bit, but you'll still need to parse it by yourself.
HTH.
Yes, even I am blogging now!
|
|
|
|
|
I am having one grid..i want to export that grid to word..after doing only two fields r coming ie serial no: and total..product name, quantity and unitcost r not coming into the word...those three r from databasee...How can i bring those three to the word...
the code looks like this...
object fileName = "C:\\Inetpub\\wwwroot\\eBilling\\jijo.doc";
object readOnly = false;
object isVisible = true;
object missing = System.Reflection.Missing.Value;
object oEndOfDoc = "\\StartOfDoc";
object oCurrentCell="\\Cell" ;
Word.ApplicationClass oWordApp = new Word.ApplicationClass();
try
{
Word.Document oWordDoc = oWordApp.Documents.Open(ref fileName,ref missing,ref readOnly,ref missing, ref missing, ref missing,ref missing, ref missing, ref missing,ref missing, ref missing, ref isVisible, ref missing,ref missing,ref missing);
oWordDoc.Activate();
oWordApp.Selection.TypeParagraph();
oWordDoc.Content.Delete(ref missing,ref missing);
Word.Table oTable;
Word.Range wrdRng =oWordDoc.Bookmarks.Item(ref oEndOfDoc).Range;
oTable = oWordDoc.Tables.Add(wrdRng, DataGrid1.Items.Count, 5, ref missing, ref missing);
oTable.Range.ParagraphFormat.SpaceAfter = 6;
int i,j;
for(i=0;i
|
|
|
|
|
I personally haven't worked with Word automation that much. You might get some luck here, but ms newsgroups are probably a better place for this question. See: http://msdn.microsoft.com/newsgroups/[^]
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
am just a c# beginner and am having troubles doing this can anyone plz help?
thnx
|
|
|
|
|
hUmAnzZ wrote:
How Do I Convert Char[] to string?
One way to do this is to create a new String object by using the constructor public String(char[] value)[^] of the String Class[^]. For example:
char[] CharArray = new char[12] {'H', 'e', 'l', 'l', 'o', ' ',
'W', 'o', 'r', 'l', 'd', '!'};
string Foo = new string(CharArray);
MessageBox.Show(Foo);
Best regards
Dennis
|
|
|
|
|
string is an char array?. Im not sure but try follow
string cadena = (string)myChararray
La realidad no es más que impulsos eléctricos del cerebro - Morpheus
|
|
|
|
|
Hello machocr,
Please note that a string in C# may not actually be an array of characters. That is, it is not guarenteed to be contiguous in memory.
An array (of any type) in C# -will- be contiguous in memory.
Regards,
Bio.
|
|
|
|
|
Hi,
1. I want to add license to an C# dll library. How can I ensure that the user is a deveeloper or a edn user aplicaation?
The library is not a toolbar component.
2. How can I use the serial number of the .net install projects to add chaeck licensing?
La realidad no es más que impulsos eléctricos del cerebro - Morpheus
|
|
|
|
|
machocr wrote:
1. I want to add license to an C# dll library. How can I ensure that the user is a deveeloper or a edn user aplicaation?
The library is not a toolbar component.
AFAIK, you can't.
machocr wrote:
2. How can I use the serial number of the .net install projects to add chaeck licensing?
Have you considered that licensing in .NET is too easy to break?
Yes, even I am blogging now!
|
|
|
|
|
Please also tell how to add images to menuitems at runtime using imagelist or any other method.....
|
|
|
|
|
|
Hi all.
Is there a way to check if a file has been digitally signed and has attached digital certificate and then if so extract it so it can be used on the code.
I know there is a tool called secutil. How can I use it from command line?
Any other ideas? Please help.
izabela
izabela
|
|
|
|
|
sillypuppy wrote:
Is there a way to check if a file has been digitally signed and has attached digital certificate and then if so extract it so it can be used on the code.
I'm not sure if I've really understood what you want to do. Maybe you can explain it a little further?
I know there is a tool called secutil. How can I use it from command line?
Yes, and if the files you want to check are indeed assemblies secutil should be the right tool to extract the public key. You can find the reference on MSDN (see Secutil Tool (Secutil.exe)[^]).
Best regards
Dennis
|
|
|
|
|
I need to check if a file is an assembly and if so need to check if it has attached a digital certificate. then I need to use the contents of the certificate in my C# code: basically need to copy the fingerprint.
How can I call Secutil from within my C# code. I have no idea how to do that?
Cheers,
izabela
|
|
|
|
|
sillypuppy wrote:
How can I call Secutil from within my C# code. I have no idea how to do that?
Sorry, I'm really short of time so this is only my first best guess: You could start secutil from your C# code and redirect its standard out stream. Of course you would then have to parse whatever you get back but it should work (see ProcessStartInfo.RedirectStandardOutput Property[^] for some code samples).
Best regards
Dennis
|
|
|
|
|
The firts tip with removeAt works fine, but ....
I want also access the container objects (Tabs) of a TabCOntrol by index and not by name for the member functions Add and Contains.
I didn't find a corresponding function to
Remove(Tab0) --> RemoveAt(Index).
// that's what I have
if (TabControl.TabPages.Contains(Tab0)) TabControl.TabPages.Add(Tab0);
// that's what I want
if (TabControl.TabPages.Contains(index)) ITabControl.TabPages.Add(index);
Does a container have an Index
Thank in advance
fracalifa
fracalifa
|
|
|
|
|
Try this:
if (TabControl.TabPages.Contains(TabControl.TabPages[index]))
ITabControl.TabPages.Add(TabControl.TabPages[index]);
www.troschuetz.de
|
|
|
|
|
i m going to produce a VoIP system for my Double Module Project.This project functions included internet telephone, messenger and voice mail recorder.i m wondering whether want to use C++ or C# for this project.As i m a newbie for programming, both of the languages i m not really familliar with.i found many sample of C++ VoIP on internet, and cant find any source of C# VoIP.Can anybody give me some comments?Really thanks to u all~
|
|
|
|
|
You're a "newbie" to programming and you want to do this? Sounds like you just bit way more off than you can possibly chew.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I suggest you try learning C#/C++ first.
I know that you probably want to LEARN C#/C++ that way, but this is way too hard for a beginner.
You probably have no idea of programming basics. That starts with choosing suitable types or writing your own, procedural programming (the basics - "procedures", "functions" and "variables", how to call and to return values) or even object oriented programming (classes, objects, methods, members...).
Transmitting a voice over a network sounds easy, I know. But doing so in realtime is a lot more complicated. Sure, with DirectX you get a lot of help, as some clever programmers already did most of the work for you, but you still need to UNDERSTAND what they did and how.
And that is only if you want to use the computer as your telephone and have a "voice chat". If you intend to receive calls from regular phones and be able to call to them, you need to have access to a gateway or develop your own. If you use a third-party gateway, you have to implement it's protocol.
If you want some advice, get "the Knuth" and start reading.
I would recommend C# as your language of choice, as it has a more simple syntax, compared to C or C++. you dont have to care about asterisks and such and can use the .NET-Framework. On the other hand, you will be pretty lost if you have no C++ experience, as C++ FORCES you to handle memory and pointers, which will help you should you ever need them in C#.
If I may suggest a more suitable project:
Try implementing a calculator. You know, like "calc.exe". Give it all the functionality you would expect from your calculator and make it work.
Then try doing a simple chat.
Have a nice weekend.
Cheers
Sid
|
|
|
|
|
Hello everyone,
I am currently trying to find a way to start SAP (logging on the user on a given system) and then immediately switch to a certain mask in edit-mode.
I was wondering if anyone here has had a similar problem and might be able to hint me on how to achieve this.
Basically, the background is as follows:
A propietary system ("old" system) request the creation of a dataset on SAP. This dataset is then created using RFC/.NET Connector and stored in SAP.
Unfortunately, the user still needs to input some crucial data into the SAP dataset.
So, as soon as the dataset has been created, SAP should come up with the needed edit-masks.
I am not sure yet if this is possible at all, or only if SAP is already open with a user logged-in. Both ways would be acceptable.
I hesitate to mess around with Windows Messages and SAP, as SAP is not quite your usual application Others ways would be preferred
Cheers
Sid
|
|
|
|
|
When you fill the datagrid from a dataset, and you want to add a record to the grid, and you did not fill in all the fields and you press "enter", it hops to the next line. You can still go back and fill in those blank fields. But when I use a the rowfilter of a dataview, when i do the same and not fill in all the fields and press "Enter", then that record kind of dissapears, but gives me an error when I try to update. How can I resolve this problem?
|
|
|
|
|
Hi To All
I am developing a smartclient application, which has got a webservice contains a method to insert a row in the database table, I am using Microsoft application block for Queuing and Caching mechanisim, Caching mechanisim works fine... But when try to put the service in a queue its giving me the following error
"An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in microsoft.applicationblocks.cache.dll
Additional information: Configuration information is not available."
in the cache service class...
This is taking hell out of time from me...
Please let me know what and all i should configure when i use Microsoft Application Block,
It would be great helpful if you provide the more information on this..
|
|
|
|
|
Hello,
Would you tell me function in C# to get char from it's ASCII. It is same function 'Chr' in VB .Net
Thank you.
|
|
|
|
|
char c = (char)43;
simple cast.
If you need to convert byte[] to string see System.Text namespace for more stuff.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|