Click here to Skip to main content
15,928,281 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Dataset -deallocation of memory Pin
Dave Kreskowiak23-Jan-08 1:50
mveDave Kreskowiak23-Jan-08 1:50 
Generaldatagridview: Lost focus of cell Pin
nishkarsh_k22-Jan-08 21:13
nishkarsh_k22-Jan-08 21:13 
GeneralRe: datagridview: Lost focus of cell Pin
Kschuler23-Jan-08 5:43
Kschuler23-Jan-08 5:43 
GeneralI want to use SQL reporting Service.Don't know from where to start Pin
Sipder22-Jan-08 21:08
Sipder22-Jan-08 21:08 
GeneralRe: I want to use SQL reporting Service.Don't know from where to start Pin
Steven J Jowett22-Jan-08 22:55
Steven J Jowett22-Jan-08 22:55 
GeneralDoubt in Namespace Pin
Hariharan22-Jan-08 19:30
Hariharan22-Jan-08 19:30 
AnswerRe: Doubt in Namespace Pin
Guffa22-Jan-08 21:36
Guffa22-Jan-08 21:36 
QuestionCreate threads in reporting tool Pin
ML261368122-Jan-08 19:28
ML261368122-Jan-08 19:28 
Hi,

I am creating a reporting tool, and some reports are running for a longer time (2 to 6 minutes). I now want to run them on the background and add a cancel button. I have tried to get this to work with the backgroundworker control, but failed as I want to update a textbox while the enumeration is running. How can I create a seperated thread where the report is created, update a textbox and add a cancel button.

Here is my code sofar with, the thread does not seem to work as the form freezes when I change somethis (tying to select another report, etc.)

Private Sub cmSelectReport_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles cmSelectReport.ItemClicked
'MsgBox(e.ClickedItem.Text & " " & Me.tvSelectReport.SelectedNode.Text)
Dim bThread As New Threading.Thread(AddressOf rptRun)
bThread.IsBackground = True
TextBox1.Clear()
bThread.Start(LCase(SelectedNodeText))
End Sub

Public Delegate Sub rptRunDelegate(ByVal j As String)

Public Sub rptRun(ByVal j As Object)
Select Case j
Case LCase("RootDSE objects")
Dim objADObject As New DirectoryEntry("LDAP://dc=samp,dc=dev")
DisplayChildren(objADObject, " ")
End Select
End Sub

Public Delegate Sub DisplayChilderenDelegate(ByVal objADObject As DirectoryEntry, _
ByVal strSpaces As String)

Sub DisplayChildren(ByVal objADObject As DirectoryEntry, _
ByVal strSpaces As String)
If Me.TextBox1.InvokeRequired = True Then
Dim t As New DisplayChilderenDelegate(AddressOf DisplayChildren)
Me.Invoke(t, New Object() {objADObject, strSpaces})
Else
TextBox1.AppendText(strSpaces & objADObject.Name)
End If
Dim objChild As New DirectoryEntry()
For Each objChild In objADObject.Children
DisplayChildren(objChild, strSpaces)
Next objChild
End Sub
QuestionHow to Deploy a project ? Pin
mcavikas22-Jan-08 19:19
mcavikas22-Jan-08 19:19 
GeneralRe: How to Deploy a project ? Pin
dptalt23-Jan-08 5:44
dptalt23-Jan-08 5:44 
GeneralLAN connection status Pin
Hariharan22-Jan-08 19:16
Hariharan22-Jan-08 19:16 
GeneralCode conversion problem Pin
tasumisra22-Jan-08 19:14
tasumisra22-Jan-08 19:14 
GeneralRe: Code conversion problem Pin
bhattiprolu22-Jan-08 19:28
bhattiprolu22-Jan-08 19:28 
GeneralRe: Code conversion problem Pin
tasumisra22-Jan-08 19:45
tasumisra22-Jan-08 19:45 
Generalathentication for windows application Pin
bhattiprolu22-Jan-08 19:13
bhattiprolu22-Jan-08 19:13 
Questionvakidation Pin
sumit703422-Jan-08 18:01
sumit703422-Jan-08 18:01 
GeneralRe: vakidation Pin
John_Adams22-Jan-08 18:28
John_Adams22-Jan-08 18:28 
GeneralRe: vakidation Pin
sumit703422-Jan-08 19:59
sumit703422-Jan-08 19:59 
GeneralRe: vakidation Pin
Mycroft Holmes22-Jan-08 18:54
professionalMycroft Holmes22-Jan-08 18:54 
QuestionDataGridView- Pin
bj9308122-Jan-08 17:49
bj9308122-Jan-08 17:49 
GeneralRe: DataGridView- Pin
Scubapro25-Jan-08 8:34
Scubapro25-Jan-08 8:34 
GeneralRe: DataGridView- Pin
bj9308129-Jan-08 11:29
bj9308129-Jan-08 11:29 
GeneralHelp with syntax Pin
MUSIWA22-Jan-08 17:11
MUSIWA22-Jan-08 17:11 
GeneralRe: Help with syntax Pin
Tirthadip22-Jan-08 17:52
Tirthadip22-Jan-08 17:52 
GeneralRe: Help with syntax Pin
MUSIWA23-Jan-08 15:17
MUSIWA23-Jan-08 15:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.