on 09-17-2008 6:16 AM
Hi All,
I created on form in Windows Application. And this form i calling in SAP. In SAP Screen Pantain form on this form i taken one button and on this button click i shows this form.
It opens and displays on Tital bar as Not Responding.
Means form stops and no operation can be perform on the form.
Thanks and Regards
Hi Harish,
Write this line of code in the Item Event / Menu Event
Dim oThread1 As New System.Threading.Thread(New System.Threading.ThreadStart(AddressOf NewFormThread))
oThread1.SetApartmentState(System.Threading.ApartmentState.STA)
oThread1.Start()
Private Sub NewFormThread ()
Dim ofrm As New YourFormName
ofrm.WindowState = FormWindowState.Normal
ofrm.Visible = True
ofrm.ShowInTaskbar = True
ofrm.TopMost = True
Application.Run(ofrm)
End Sub
Hope this helps,
Regards,
Murtaza.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Deelip,
Your code works fine. Thanks u very much for this code.
My last question is now my windows form work fine but when i wil close this form it not close. Open same form. Means shows this form two time. When i close again it close previouse form. After again shows two forms.
What is problem ? Why form not closeing ?
Thanks and Regards
User | Count |
---|---|
100 | |
11 | |
10 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.