c# help

thesatanlord

Newbie
Joined
Nov 23, 2010
Messages
2
Reaction score
0
hiya
hope i can get help
I am new to programming, started c#

I have got a windows form with a listbox, button(start), lable showing the no: of items in the listbox and another label which shows the selected item of the listbox
The problem is I want the program on click on button
-> selects the item from the list
-> then uses that item to access the web
-> then waits for amount of time
and then again restarts the operation again

any help will be appreciated
cheers
 
Greetings SatanLord,

You need to better define what you want. This is actually an essential part of effective coding. What do you mean by access the web?

But essentially, yeah, you can do that. You need to learn a bit about how the whole c# windows form thing works. Double-click on the button in design view, that will take you to the button handler. Put code there as to what you want to do. Access the other form elements through their objects via their name property.

Feel free to post more details & good luck.
 
hiya
got everything sorted
working just like i want

but stuck at clearing the cookies
can clear the cache but cant clear the cookies

any help
tr
 
You have to set expiry time of cookies to negative value
Code:
private void ClearCookies(CookieCollection Cookies)
{
    for (int i = 0; i < Cookies.Count; i++)
                {
                    Cookies[i].Expires = DateTime.Now.Subtract(TimeSpan.FromHours(1));
                }
}
This should work, code isn't optimal but I don't have time now to write something better, maybe later ;)
 
Back
Top