The difference is the scope of the object. A public object is accessible outside of the context in which it is declared - a private object is obviously the opposite, its not accessible outside the context in which it is declared. Basically if you want to access your function from another class...
I recommend that you experiment with threading. You can create threads easily:
public sub work
' Add code to do the heavy work
end sub
public sub startwork
dim t as new system.threading.thread(addressof me.work)
t.start
end sub
In the "startwork" procedure a new thread is created to take care...
Why not use threading? Spawn a thread to take care of the work and display something on the form to indicate that it is busy until the thread is through.
My mistake, I missed out the datatable in my post before.
eg. dataset.datatables(index).rows.count
where index is the index of the datatable of interest - 0 if you only have one datatable
It looks as if you are testing whether you have instantiated your dataset rather than if there is any data in your dataset. Try getting a count of the rows in the dataset: dataset.rows.count
Oops, my apologies. SystemInformation.Network returns hardware information not connection information (it meets my uses for it but is not applicable to your question). I will right my wrong; here is a function that will do what you need (this is not my code, it comes from a post by Dean Slindee...
Use the add hours function to add 24 hours to the date
dim d as date=#01/01/2004#
private sub addDay
' Increment date by one day
d=d.addhours(24)
end sub
System.web.mail namespace
Using the classes in this namespace you can create and send emails. You may need to design an email form if you want the user to view and have input to the email before it is sent.
For example:
dim msg as new MailMessage
dim server as SmtpMail...
Access the file with a filestream and use the streamreader and streamwriter classes to read/write to it.
For example
dim fs as new filestream("C:\myfile.txt",filemode.open)
dim sr as new streamreader(fs)
dim firstline as string
firstline=sr.readline
Create a new textbox and add it to the controls collection of the toolbar
For example:
dim txt as new textbox
txt.text="my textbox"
txt.left=48
txt.top=4
me.toolbar1.controls.add(txt)
It looks like you are using tabpage events. You need to use tabcontrol events:
SelectedIndexChanged (for a changing tab pages)
or
Click (for a click event on the tab of the current tab page)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.