Click here to Skip to main content
15,891,136 members
Home / Discussions / Windows Forms
   

Windows Forms

 
AnswerRe: Hosting a Winform view inside a user control Pin
Eddy Vluggen24-Sep-10 9:23
professionalEddy Vluggen24-Sep-10 9:23 
Questionis it possible to show ms excel inside a windowform? Pin
neodeaths22-Sep-10 5:32
neodeaths22-Sep-10 5:32 
AnswerRe: is it possible to show ms excel inside a windowform? Pin
Abhinav S22-Sep-10 6:41
Abhinav S22-Sep-10 6:41 
QuestionApp "NOT RESPONDING" on opening some other window Pin
All Time Programming22-Sep-10 3:37
All Time Programming22-Sep-10 3:37 
AnswerRe: App "NOT RESPONDING" on opening some other window Pin
Dave Kreskowiak22-Sep-10 6:38
mveDave Kreskowiak22-Sep-10 6:38 
GeneralRe: App "NOT RESPONDING" on opening some other window Pin
All Time Programming22-Sep-10 22:38
All Time Programming22-Sep-10 22:38 
GeneralRe: App "NOT RESPONDING" on opening some other window Pin
Dave Kreskowiak23-Sep-10 1:57
mveDave Kreskowiak23-Sep-10 1:57 
GeneralRe: App "NOT RESPONDING" on opening some other window Pin
All Time Programming23-Sep-10 6:13
All Time Programming23-Sep-10 6:13 
Hi Dave,

Learning from the article you provided, I did sme homework. I think I am going somewhere wrong, Can you please check it. Actually have never worked with Threading with .NEt, have worked with Java.

<br />
    Private Delegate Sub ControlStringConsumer(ByVal control As Control, ByVal text As String)    ' defines a delegate type<br />
<br />
    ' SetTextData to update text of TextBox (statusTxt)<br />
    Private Sub SetTextData(ByVal control As Control, ByVal text As String)<br />
        If (control.InvokeRequired) Then<br />
            control.Invoke(New ControlStringConsumer(AddressOf SetTextData), New Object() {control, text})<br />
        Else<br />
            control.Text = text<br />
        End If<br />
    End Sub<br />
<br />
<br />
    ' Update Imported<br />
    Private Sub updateBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles updateBtn.Click<br />
        If (ValidateInputs()) Then<br />
            importAdd = False<br />
            ' ADDED THREADING EXECUTION FOR Start_Processing<br />
            Dim myThreadDelegate As New ThreadStart(AddressOf Start_Processing)<br />
            Dim myThread As New Thread(myThreadDelegate)<br />
            myThread.Start()<br />
<br />
            'Start_Processing()<br />
        End If<br />
    End Sub<br />
<br />
    Private Sub Start_Processing()<br />
        'statusTxt.AppendText(vbCrLf + "Initializing...." + vbCrLf + "Loading Data........." + vbCrLf)<br />
        dim s as string = vbCrLf + "Initializing...." + vbCrLf + "Loading Data........." + vbCrLf<br />
        SetTextData(statusTxt, s)<br />
        .........<br />
    Endif<br />
       <br />


I feel the Threading part is correct - maybe can remove ThreadStart & straight away give AddOf to Thread().
But feel their is somethign wrong with SetTextData. Here I want to AppendText & not only set some new value to it. If this is the right way to do, then everytime I will have to call it as :-
dim s as string = statusTxt.Text + vbcrlf + " MY NEW TExT" + vbcrlf
SetTextData(statusTxt, s)

OR is it so that I should overwrite AppendText instead of SetText & SetText should be used & not SetTextData ????


What do u say, am I going anywher wrong. Don't know why, but this time feeling scared to run without confirmity. Maybe b'coz using Threads. I know how unsafe threads can be if not operated properly.

Thanks & Regards,


GeneralRe: App "NOT RESPONDING" on opening some other window Pin
Luc Pattyn23-Sep-10 6:42
sitebuilderLuc Pattyn23-Sep-10 6:42 
QuestionRe: App "NOT RESPONDING" on opening some other window Pin
All Time Programming27-Sep-10 6:19
All Time Programming27-Sep-10 6:19 
AnswerRe: App "NOT RESPONDING" on opening some other window Pin
Luc Pattyn27-Sep-10 6:30
sitebuilderLuc Pattyn27-Sep-10 6:30 
QuestionConnect controls to thread Pin
Moshe T20-Sep-10 12:50
Moshe T20-Sep-10 12:50 
AnswerRe: Connect controls to thread Pin
Luc Pattyn20-Sep-10 13:01
sitebuilderLuc Pattyn20-Sep-10 13:01 
GeneralRe: Connect controls to thread Pin
Moshe T20-Sep-10 13:11
Moshe T20-Sep-10 13:11 
GeneralRe: Connect controls to thread Pin
Luc Pattyn20-Sep-10 13:20
sitebuilderLuc Pattyn20-Sep-10 13:20 
GeneralRe: Connect controls to thread Pin
Moshe T20-Sep-10 13:30
Moshe T20-Sep-10 13:30 
AnswerRe: Connect controls to thread Pin
dybs9-Dec-10 11:47
dybs9-Dec-10 11:47 
QuestionDesignTimeSupport for TableLayoutPanel with dynamic added controls in each cell Pin
akamper15-Sep-10 23:10
akamper15-Sep-10 23:10 
AnswerRe: DesignTimeSupport for TableLayoutPanel with dynamic added controls in each cell Pin
Henry Minute16-Sep-10 5:27
Henry Minute16-Sep-10 5:27 
GeneralRe: DesignTimeSupport for TableLayoutPanel with dynamic added controls in each cell Pin
akamper16-Sep-10 22:42
akamper16-Sep-10 22:42 
QuestionProblems with embed windows media player in VB.net form Pin
ocabrera7013-Sep-10 15:05
ocabrera7013-Sep-10 15:05 
QuestionPass incoming data from Child to parent Form Pin
KenKen Wong10-Sep-10 21:38
KenKen Wong10-Sep-10 21:38 
AnswerRe: Pass incoming data from Child to parent Form Pin
Pete O'Hanlon11-Sep-10 2:11
mvePete O'Hanlon11-Sep-10 2:11 
GeneralRe: Pass incoming data from Child to parent Form Pin
KenKen Wong12-Sep-10 15:27
KenKen Wong12-Sep-10 15:27 
GeneralRe: Pass incoming data from Child to parent Form Pin
DaveyM6916-Sep-10 2:23
professionalDaveyM6916-Sep-10 2:23 

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.