LizR 171 Posting Virtuoso
LizR 171 Posting Virtuoso

No, thats not how it works, I guess your F1 button must be broken

LizR 171 Posting Virtuoso

No, thats not what you did

You said an equivelent of

Tree of apples = 1 apple.

LizR 171 Posting Virtuoso

I guess you havent looked on how you use lists.

LizR 171 Posting Virtuoso

You could use objects but your list of medicines should work..

LizR 171 Posting Virtuoso

Ok, heres a hint.

If you went into a shoe store, you'll find trainers, boots, shoes and sandals.

Now, they all go into shoe boxes

Same is true with your list, your list will hold your medications, however, you need to check the box as to which type of class you actually have in it.

So, once you've tested what class it is, you can then assign to an appropriate class, or, force the code to run as the class you found it to be so you can see then the additional attributes.

LizR 171 Posting Virtuoso

Why not just do the writeline of body you read from the second file?

LizR 171 Posting Virtuoso

exactly but Im not sure shouting enable would be loud enough.

LizR 171 Posting Virtuoso

I dont think he wants it hidden, but disabled.. but its not like you havent told him the right thing, it would just seem the opposite of disabled isnt the same the world over.

LizR 171 Posting Virtuoso

You mean disable it..

(see if thats a big enough hint)

LizR 171 Posting Virtuoso

Well what have you tried so far?, sounds simple enough. What exactly are you stuck on?

LizR 171 Posting Virtuoso

The answer would normally be you shouldnt.

Please explain a little more of what you're trying to achieve before we can give you better answer

LizR 171 Posting Virtuoso

To learn more about String.Format - press F1 on it, it has examples and a lot of information on other formats and how to use it.

LizR 171 Posting Virtuoso

Then it sounds like a timing issue.
You probably need to go give the object time to start before sending it instructions

LizR 171 Posting Virtuoso

Just google c# threads and look for msdn

Please dont forget to mark your issue solved.

LizR 171 Posting Virtuoso

Odd, it should give you a link to your help setup for VS ..

LizR 171 Posting Virtuoso

The article I posted was about background threads, and updating the UI and how to go about it, the rules and gotchas of the whole event.

If you're calling an update of your form from within your thread, and the work is done from the thread - not the main UI thread then, you can/will get issues of locking up - wether you use locks or not.

LizR 171 Posting Virtuoso

Did you read the thing on threads?

LizR 171 Posting Virtuoso

Well with the questions per day thing you could dump their previous count each morning at midnight.

LizR 171 Posting Virtuoso

It seems to me more a logic issue than a specific language issue.

Your background thread would need to invoke the main thread to update and draw. Any secondary thread must not update the UI as it can/will cause locks.

LizR 171 Posting Virtuoso

To restrict questions to x per day, or hour or whatever means you would have to log someones efforts.. or you select x questions that may run in a day and then randomize.

LizR 171 Posting Virtuoso
LizR 171 Posting Virtuoso

No, because if as you say the background worker works constantly irrelevant of the form being visible or not. Then the thread shouldnt ever be started or stopped accordingly. Only on creation and termination.

LizR 171 Posting Virtuoso

Well it most certainly wont help it.
Try setting the event on the creation of the worker, and never again

LizR 171 Posting Virtuoso

cool - please mark your thing as solved

LizR 171 Posting Virtuoso

The reason I asked is every time that clicked functions called its going to add another copy of the event so you could end up with the same function called multiple times per event.

LizR 171 Posting Virtuoso

no you dont need to install a new OS, whats most likely is that either the db is not the same and has other fields or such. Get hold of a copy and check things like casing on the field names, additional fields, maybe even changes such as different field types.

regional settings

LizR 171 Posting Virtuoso

well you wouldnt see much in access except a new row in your table assuming it didnt violate any key restraints.

next question is is that a line that worked or fails?
Have you determind any data entry specifics for when someone adds a line that fails?

LizR 171 Posting Virtuoso

The file wont be at \\webpage\blah.htm, its at c:\webpage\blah.html
the \\something notation usually means machine name, is your PC really called "webpage"?

LizR 171 Posting Virtuoso

Try putting your slashes round the correct way, eg

file://webpage/whatever.html

LizR 171 Posting Virtuoso

Still so many questions..

How do your background processes know not to work?
How is that clicked code running
Where did you do the adding of the delegate?
Whats in "MyEvent()"

LizR 171 Posting Virtuoso

IMHO you could do better to change how you've done your data string, because all the " and ' marks and then the gazillion + marks do make it hard to read. Especially where you have things like ","+"'','"

What id suggest is rather than RUN that code, place it into a text box, and place an example of the SQL to run in a message as I think you maybe missing some ' marks

LizR 171 Posting Virtuoso

Then post your table definition, and your c# insert code.

LizR 171 Posting Virtuoso

You already are, because it creates it as it sends it.

LizR 171 Posting Virtuoso

Well either somehow when you think youre closing the form the forms actually closed and gone, or, your still missing some of the thread handling..its hard to say with the code given.

LizR 171 Posting Virtuoso

String builder can have advantages when buidling up output. So instead of a ton of

s += titletext;
s += "\r\n--------";

etc

you can just do
sb.append(newtext);
sb.appendline("---------");

it acts almost like a buffer, however if you've done much coding before it does feel unnecessary and isnt the way your brain is used thinking.

LizR 171 Posting Virtuoso

most cookies have a default expirey.. Any currently set cookie will keep its old expirey by default too.

LizR 171 Posting Virtuoso

You should check for invoke on any UI component. its a good practice to get into so if you then do thread off activities you dont have to redo all your UI code. So, wether you're changing the position of a progress bar, the caption on a button, or even enabling/disabling, anything which belongs to the main thread in effect should be carefully done, as not doing so causes clashes.

LizR 171 Posting Virtuoso

UI = User Interface

normally for example, if I were writing an app that was going to do anything of value, I have update routines on my form so that other things can send it data, and irrelevant of wether those things are threaded or not, my form sorts out the update. This is done through delegates.

You often run into issues as the UI cant be updated from anything other than the main thread - so if for example, you have a progress bar and you're working through a long CSV file verifying it, and loading data, and so on, you would call the updateprogressbar function which then checks if an invoke is required and then if it is, it invokes the main thread to do that job, otherwise it does it.

LizR 171 Posting Virtuoso

OK, I dont see any thread handling in your code to check for the fact a UI cant be updated by anything other than the main thread.

I also am a little confused as to the Form2(0) and Form2(1) Im not sure what these parameters are for.

LizR 171 Posting Virtuoso

This is the bit that worries me

Form2 form1=new Form2();
Form2 form2=new Form2();
Form2 form3=new Form2();

if your worker makes those forms then how is it sure which form its using?

LizR 171 Posting Virtuoso

I believe the issue must be how you are assigning your forms to the worker threads (as hinted above).

However, you may need to take into account that your "form2" is not being reset each time, so, when it is reshown, it was at the end of whatever it was doing - this can have bearing as your logic may not have allowed for that.

LizR 171 Posting Virtuoso

Depends a bit I guess on what exactly is being done in the background and how you've passed the forms reference to the worker thread so it knows which form to update.

LizR 171 Posting Virtuoso

Well.. Generally the cookies created when they login, so you'd probably have to log them in. I dont know - ask the owner of the site

LizR 171 Posting Virtuoso

If server side the cookies only valid 30 days, you would need to make them go through the process to generate a new valid one

LizR 171 Posting Virtuoso

What does the exception say?
Have you allowed for redirection? Eg if you went to www.somesite.com chances are http is telling "hi thats nice for you, now ask for say index.html"

LizR 171 Posting Virtuoso

Sure thats your IP address and that you dont have a dynamic one? On changing your code to be my local IP and dropping the chat client part as it was a test, and putting in a simple receive, acknowledge and disconnect.

LizR 171 Posting Virtuoso

I believe if you call iexpore with "-new" and then the url so it goes "iexplore -new http://blah.com" it should work.

LizR 171 Posting Virtuoso

Does it have to be IE? If you just run the link as a system call, it will open the default browser.

ddanbe commented: The solution to a question is sometimes a question! +2
LizR 171 Posting Virtuoso

Well.

You did a foreach which was probably right but then didnt use the link that you had. You'll probably slap yourself if you had looked more closely at what was the object of your foreach loop.

Hint: Look at the original code, it echoed out the URL right? in a STRING form..

Second. You then make up some stuff and pass a list of links to a function that takes a string. So, it wouldnt compile - but then lets assume you work out my first hint and changing it to the right thing.

You need to check the return value of the testurl to do something..

Hint 2: You need to turn a true/false to failed or succeed.