|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problem with multiple formsMy application makes use of multiple forms. The problem is that if one form is loaded and shown, and I close this form to go back to the previous form, the previous form is displayed, but sometimes the focus is returned to a background app, and not the main app. My code to show the next form: Private Sub btnStock_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStock.Click Me.Hide() frmStockGUI.btnStockCreate.Select() frmStockGUI.ShowDialog() Me.Show() btnStock.Focus() End Sub I even set the focus to a button on the main form, but no luck :-( Any ideas? Kind regards, Pieter Kruger "pkruger" <pkru***@discussions.microsoft.com>'s wild thoughts were released on Tue, 31 May 2005 23:35:29 -0700bearing the following fruit: Show quoteHide quote >Hello, To Quote Rick> >My application makes use of multiple forms. The problem is that if one form >is loaded and shown, and I close this form to go back to the previous form, >the previous form is displayed, but sometimes the focus is returned to a >background app, and not the main app. > >My code to show the next form: > >Private Sub btnStock_Click(ByVal sender As System.Object, ByVal e As >System.EventArgs) Handles btnStock.Click > Me.Hide() > frmStockGUI.btnStockCreate.Select() > frmStockGUI.ShowDialog() > Me.Show() > btnStock.Focus() >End Sub > >I even set the focus to a button on the main form, but no luck :-( > >Any ideas? > Almost everybody in this newsgroup is using VB6 or lower. While you may get a stray answer to VB.NET (including VB2003 and VB2005 which has dropped .NET from its name) questions here, you should ask them in newsgroups devoted exclusively to .NET programming. Look for newsgroups with either the word "dotnet" or "vsnet" in their name. For the microsoft news server, try these newsgroups for Visual Basic .NET related questions... microsoft.public.dotnet.languages.vb microsoft.public.dotnet.languages.vb.upgrade microsoft.public.dotnet.languages.vb.controls microsoft.public.dotnet.languages.vb.data And these for more general .NET questions microsoft.public.dotnet.general microsoft.public.vsnet.general Note: There are many other .NET newgroups (use the first three "fields" from the last two as templates when searching for them), but the above ones should get you started. Jan Hyde (VB MVP) -- As far as we know, our computer has never had an undetected error. [Abolish the TV Licence - http://www.tvlicensing.biz/] Sorry, my mistake :-) Thank you for pointing me to the right group.
Kind regards, Pieter Show quoteHide quote "Jan Hyde" wrote: > "pkruger" <pkru***@discussions.microsoft.com>'s wild > thoughts were released on Tue, 31 May 2005 23:35:29 -0700 > bearing the following fruit: > > >Hello, > > > >My application makes use of multiple forms. The problem is that if one form > >is loaded and shown, and I close this form to go back to the previous form, > >the previous form is displayed, but sometimes the focus is returned to a > >background app, and not the main app. > > > >My code to show the next form: > > > >Private Sub btnStock_Click(ByVal sender As System.Object, ByVal e As > >System.EventArgs) Handles btnStock.Click > > Me.Hide() > > frmStockGUI.btnStockCreate.Select() > > frmStockGUI.ShowDialog() > > Me.Show() > > btnStock.Focus() > >End Sub > > > >I even set the focus to a button on the main form, but no luck :-( > > > >Any ideas? > > > > To Quote Rick > > Almost everybody in this newsgroup is using VB6 or lower. > While you may get a stray answer to VB.NET (including VB2003 > and VB2005 which has dropped .NET from its name) questions > here, you should ask them in newsgroups devoted exclusively > to .NET programming. Look for newsgroups with either the > word "dotnet" or "vsnet" in their name. > > For the microsoft news server, try these newsgroups for > Visual Basic .NET related questions... > > microsoft.public.dotnet.languages.vb > microsoft.public.dotnet.languages.vb.upgrade > microsoft.public.dotnet.languages.vb.controls > microsoft.public.dotnet.languages.vb.data > > And these for more general .NET questions > > microsoft.public.dotnet.general > microsoft.public.vsnet.general > > Note: There are many other .NET newgroups (use the first > three "fields" from the last two as templates when searching > for them), but the above ones should get you started. > > > Jan Hyde (VB MVP) > > -- > As far as we know, our computer has never had an undetected error. > > [Abolish the TV Licence - http://www.tvlicensing.biz/] > >
Creating a DLL and calling it from an app
How to calculate this? Sudden automation error with MS XML object memory leak ? Runtime error 53 Parse and preserve an object in a class SP5 to SP6: To update or not? App Protection Common dialog control How do I deploy a VB6 program to folder whose filename has spaces? |
|||||||||||||||||||||||