fill textbox in Form

Hello all i have problem with move text to another Form 

to open Form1 i wrote this code 

        Dim frmCollection = System.Windows.Forms.Application.OpenForms
        If frmCollection.OfType(Of Form1).Any Then
            frmCollection.Item("Form1").Activate()
        Else
            Dim frm As New Form1
            ChildOpen(frm)
        End If

in FrmBeliOld i Have label and button 

'this code for open Form CrSupplier     
Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
        CrSupplier.ShowDialog()
    End Sub

in CrSupplier i want to move text to frmBeliOld, i use this code. but its nothing happen.
  (this code doesn't want to work) 
  Private Sub BtnOK_Click(sender As Object, e As EventArgs) Handles BtnOK.Click
        Form1.Label1.Text = "test"
        Form1.Label2.Text = "nama"
    End Sub

   or use this code 
   
       dim frm as new Form1 
        Frm.Label1.Text = "test"
        Frm.Label2.Text = "nama"

How to solve this problem

Thanks before 

Hengky






4 Replies

DR Durga Rajan Syncfusion Team January 11, 2018 12:30 PM UTC

Hi Hengky, 

Thanks for contacting Syncfusion support. 

We have prepared sample using TabbedMDIManager and checked your query “Unable to change text of the Label which is in another form” but we were unable to reproduce the reported issue and it is working fine as expected. In this sample we have added two child forms in TabbedMDIManager and displayed each from. Please download the sample from below location, 


On further checking the reported query we have found that some developers also facing the same issue with text of Label. Invoking Refresh or Update function after changing Text in Label may help you to resolve this case. Please refer the below link 


If we have misunderstood query please get back to us with more details like sample or screenshot which replicates your requirement or modify the above sample to reproduce the issue. This would help us to provide solution at earliest. 

Regards, 
Durga S. 



HE Hengky January 12, 2018 01:37 AM UTC

Hai Durga thanks for writing back... 

i have solved the problem with that. its not because of syncfusion tabbedmdimanager. 

i use this code : 
                        Dim frm = Application.OpenForms("FrmBeli")
                        If frm IsNot Nothing Then
                            If GridCari.CurrentRow.Index <> -1 Then
                                i = GridCari.CurrentRow.Index
                                CType(frm, FrmBeli).TxtKodeSupplier.Text = GridCari.Rows(i).Cells(0).Value.ToString()
                                CType(frm, FrmBeli).LblNamaSupplier.Text = GridCari.Rows(i).Cells(1).Value.ToString()
                            End If
                        End If

Best Regards 

Hengky



DR Durga Rajan Syncfusion Team January 12, 2018 05:39 AM UTC

Hi Hengky,

Thanks for your reply.

Please let us know in case of any other assistance.

Regards,
Durga S.


PE PecsCorreia replied to Durga Rajan March 16, 2018 02:53 PM UTC

Hi Hengky,

Thanks for your reply.

Please let us know in case of any other assistance.

Regards,
Durga S.

yes

Loader.
Up arrow icon