|
Trustapple, I'll re-itterate my advice from umpteen times in the last week. You will learn ALL of this stuff much much better if you go and find yourself a biginner book on programming. There is no shame in doing so - we all had to start somewhere.
|
|
|
|
|
And please stop deleting your messages! You have been asked politely before. We are NOT mocking you we are trying to HELP you!
|
|
|
|
|
I thought he might, so I copied the whole message in my reply. I doubt I will reply to any more of his posts if he won't play ball.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
Can anyone help me please making this program, i use vceexpress (visualc++2005),
the program must be written in c#
i must open an html file and i must see the text in it, not the hole html file.
thx
kuscu
kuscu
|
|
|
|
|
Try
String[] arrayOfHtmlLines = System.IO.File.ReadAllLines("myHtmlFile.html");
This will give you an array of lines.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
hallo, thx for the answer, but i just began to program, and need a full program, i'm trying to solve with the answers here but it won't work, so can you help me with a hole program,
i'm yusing vcExpress2005
thx
|
|
|
|
|
I will happily help you - it is what we do here. You post the code you have tried and I or somebody else will tell you what is wrong with it. We will not write a whole program for you unless you pay us.
|
|
|
|
|
Perhaps this article would help you:
HTML Parser[^]
Virtual1ty "Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
kuscu wrote: i must open an html file and i must see the text in it, not the hole html file.
Do you mean the content of <body></body> tags ? Then you can
1 - Open HTML page and store the text in a variable
2 - Find index of <body> and </body> tags inside it.
3 - Use substring to get the values in between these tags
OR
4 - Use a regular expression to find the text in between these tags
|
|
|
|
|
hi does anyone know how to export a ssrs report programmatically into rtf / word,/ xml /csv formats?
|
|
|
|
|
You asked this yesterday - what have you tried to do between now and then to get it to work? Post a code snippet - people here love going through code and if you've made an effort, then they will also make an effort to help.
I am not saying you haven't made an effort before I get shot down in flames, but this question is too general.
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
Hi guys.
I'm building a windows service that uses an ActiveX object.
When I try to instantiate the ActiveX I get this error.
Could not instantiate ActiveX control 'XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' because the current thread is not in a single-threaded apartment.
I've changed the thread apartment style in the service, instantiated the ActiveX in a separate STA thread and still get the error.
Have any of you been in a similar situation ? if so, have you found a solution ?
Thanks in advance
Free your mind...
|
|
|
|
|
Judging by the hits on Google, you're not the first to encounter this problem. Have you tried doing a search for activeX STA?
That said, it seems odd that you'd want to instantiate ActiveX UI stuff in a Windows Service. Is this absolutely required? Could the service instead spawn some regular application with that uses the AX control?
|
|
|
|
|
Thanks for your reply.
I know it looks odd.
Let me explain a little further.
The main function of the application is to print some kind of files in PDF.
The service will "Watch" some folders to see if there are changes on the files, and if there are, a PDF copy (PDF pinting) will be made.
To open those files, I need to use the ActiveX supplied by the vendor. All works fine in a Windows Form Application.
But the problem comes with the service.
How can I achieved what you suggest (Could the service instead spawn some regular application with that uses the AX control?) ?
Thanks again
Free your mind...
|
|
|
|
|
Hi Guillermo
Couple things to try: on the entry point of the service, place the [STAThread] attribute. (not sure if you've already tried this).
If that doesn't work, perhaps you could have your service simply monitor the folders, and when changes are made on the files, launch a separate process (System.Diagnostics.Process) that is your application that uses the ActiveX control to do heavy lifting.
|
|
|
|
|
Thanks Judah !
You gave me the direction.
I tried including [STAThread] attributeand didn't work.
Then I tried starting a new thread and setting the appartmentin STA, didn't work.
Finally, tried starting the program with ProcessInfo, and the program started !.
I'm going to see if the ActiveX works.
I'll let you know if it works.
Thanks again.
Free your mind...
|
|
|
|
|
Thanks again Judah.
It worked fine.
I really appreciate for your guidance.
I hope some day I can help you back.
See you
Free your mind...
|
|
|
|
|
hello,
i want to do the same thing using ""call by refernce method""....can anybody alter the code andf show to me the differnce please.... here i am using call by value i want to do this using call byt reference.....please the codes but the functionality should be the same so that it will be easy to understand,,,,thanks
class Program
{
public static int Add(int x, int y)
{
int result = a + b;
Console.WriteLine("{0}", result);
Console.ReadLine();
return 10;
}
static void Main(string[] args)
{
int sum = Add(10, 20);
Console.WriteLine("{0}", sum);
Console.ReadLine();
}
}
}
C#
|
|
|
|
|
How about
public static int Add(object x,object y)
{
int First;
int Second;
try
{
First = (int)x;
Second = (int)y;
return First + Second;
}
catch(Exception ex)
{
throw new Exception("Invalid values");
}
return 0;
}
|
|
|
|
|
hi,
thanks for trying to help....
but navneeth can you alter the previous program that will help me understand better....since i am not familiar with try catch and finally methods.....ie exceptions.....
i will be glad if you can alter the code and show to me that i have written...
thanks agin and expecting a reply
C#
|
|
|
|
|
That's not sending argument by reference, that's sending references as arguments.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Guffa wrote: hat's not sending argument by reference, that's sending references as arguments.
Yes that was a mistake. I corrected that in second post
|
|
|
|
|
Why didn't you just edit the post?
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
class Program
{
public static int Add(ref int x, ref int y)
{
int result = x + y;
Console.WriteLine("{0}", result);
Console.ReadLine();
return 10;
}
static void Main(string[] args)
{
int FirstNo = 10;
int SecondNo = 20;
int sum = Add(ref FirstNo ,ref SecondNo);
Console.WriteLine("{0}", sum);
Console.ReadLine();
}
}
Hope this helps
-- modified at 2:56 Friday 19th October, 2007
|
|
|
|
|
hi,
thanks a lot Navneeth ......your message realy helped.....i have altered the code a bit ......can you check and tell me whether my synatax is correct or not. i tried to run it and its running fine ....but i need your comment also....in the main function i made a slight alteration from yours.....plz check that and inform me
class Program
{
public static int Add(ref int x, ref int y)
{
int a = x; //saying that henceforth a will represent x
int b y ; //saying that henceforth b will represent y
int result = a + b;
Console.WriteLine("{0}", result);
return 10;
}
static void Main(string[] args)
{
int a = 10; //passing values to a and b
int b = 20;
int sum = Add(ref a,ref b);
Console.WriteLine("{0}", sum);
Console.ReadLine();
}
}
}
C#
|
|
|
|