|
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim newThread As New Thread(AddressOf worker)
Dim arrParameters(2) As String
arrParameters(0) = "This "
arrParameters(1) = "is "
arrParameters(2) = "a test!"
newThread.Start(arrParameters)
End Sub
Private Sub worker(ByVal param As Object)
Dim params() As String = DirectCast(param, String())
For Each s As String In params
Debug.WriteLine(s)
Next
End Sub
In order to use this, you have to be using .NET 2.0 and VB.NET 2005.
|
|
|
|
|
In web development the Cancel button would always be set to Causes Validation = False so how can I reproduce that in a Windows App where I might be in the middle of entering data but decide to close the form using the X button and I need to be able to close it without it validating and this looks like the only way for me to check the values of the databound textboxes without it getting to the Null entry on an Integer column and throwing an exception.
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
|
|
|
|
|
Try handling the Form's Closing event and turning off it's CausesValidation property.
|
|
|
|
|
Dave Kreskowiak wrote: Try handling the Form's Closing event and turning off it's CausesValidation property.
Wow, duh on my part. I have MDI forms and I was thinking that if I turned the "CausesValidation" off on the parent form it would work since that is where the "X" is...oh well. Thanks!
CleaKO
"Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)
|
|
|
|
|
But the FormClosing event happens *after* the Validating events of the controls on the Form, because they are triggered by the loss of focus.
I hope you realise that hamsters are very creative when it comes to revenge. - Elaine
|
|
|
|
|
hi
this is sanapathi
i have three text boxes in my .aspx page like title,datesbetween.
now i want to get the data from sqlserver database.in the database under videos table i have the fields like title,dateentered,videoid.how can i retrieve data from the data base.
|
|
|
|
|
I have an updatepanel with a little animation in it and I want to trigger this when the user clicks the button in the loign control.
But everytime I add a trigger of LoginControl - OnLoggingIn it throws this error the first time the site is run (after a service start or a long period)
Sys.WebForms.PageRequestManagerParserErrorException: The message recived from the server could not be parsed. Common causes for this error are the response is modified by calls to Response.Write(), reponse filters, HttpModules, or server trace is enabled.<br />
Details: Error parsing near '_WS/SE/Welcome.aspx|<html><br />
<head><br />
'.
Anyone know why this is? Or how to help?
|
|
|
|
|
This is a question better asked in the ASP.NET forum.
|
|
|
|
|
okay I will post it on there.
Feel free to remove this one.
|
|
|
|
|
hello frnds,
i can protect a word file and allow only comments to enter, by programatically
oDoc.protect(wdAllowOnlyComments,"Password")
can i protect the excel file ????
if any one have code then please give ???
same like word file i have to allow only comments in the file
thankx to all
-koolprasad2003
Be A Good S/W Eng... Life is swing with you..Enjoy..
|
|
|
|
|
Since you seem to have a mountain of questions regarding the object models of Word and Excel, you might want to start reading here[^].
|
|
|
|
|
Thankx a lot
Be A Good S/W Eng... Life is swing with you..Enjoy..
|
|
|
|
|
Hi guys.
I wanna declare a sub like this:
Private Sub Test( byval val1 as integer, Optional byval val2 as system.object = Me)<br />
but it handle an error like this: Constant expression is required.
i think this error is generated by Me . How i can declare my optional val2 with a form like Me?
|
|
|
|
|
Try passing it byref instead.
Ben
|
|
|
|
|
if u r providing the form name in the last parameter . then u can assign nothing to it as well in the definition part.
|
|
|
|
|
Me cannot be used here. It's an abstract concept that refers to the current instance of the class that it shows up in. You have to replace it with something like this:
Private Sub Test(ByVal vl1 As Integer, Optional ByVal val2 As Object = Nothing)
If val2 Is Nothing Then
val2 = Me
End If
|
|
|
|
|
|
can i use the exit code in the deployment project?
|
|
|
|
|
|
well.. i guess nilish is talking abt the Exitcode which tells the installer abt the suucessful completion of an Exe which the installer fires during its execution. Exitcode-1 shows that application hasn't cpmpleted successfully.. whereas Exitcode-0 shows successful completion of the application.. upon getting which the installer proceeds further!
|
|
|
|
|
desperate_coder wrote: i guess nilish is talking abt the Exitcode which tells the installer abt the suucessful completion of an Exe which the installer fires during its execution.
Is it? or is it the exit code of the installer itself? There's a few different places it an exit code could come from. It's up to him to explain what he's talking about. I've long since given up wasting my time assuming such things.
desperate_coder wrote: Exitcode-1 shows that application hasn't cpmpleted successfully.. whereas Exitcode-0 shows successful completion of the application..
There is a "standard" to be followed here, but not every EXE follows it.
|
|
|
|
|
hi
i want to know to do thread with parameter using vb.net .
pls guide me with some examples and articles
with regards
Balagurunathan.B
|
|
|
|
|
|
hi nilish in that code where they r using parameterizedstart .
i want to know abt that any how it contains some good threading contents as i know very little on thread it will help me
thanks for the link
i am mainly looking at parallel threading as its last target for the present i want to know about parameterizedthreadstart in vb.net
with regards
Balagurunathan.B
|
|
|
|
|
I posted on here recently about this but I am still none the wiser so again I come seekign advice.
I have a web service and a website consuming this service. I would like to pass a custom class from the website to the webservice and vice versa.
The trouble is every time it gives me a error message saying
"type is not the same as loclahost.Type"
How can I get them to agree that it the same type?
I have built a VERY basic example of what I am trying to which can be found here: WS passing cutom class.zip
If anyone can help at all then I would be very appreciative.
|
|
|
|