|
-
Feb 24th, 2008, 11:40 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] [2005] Closing a Form not in Focus
Hi
Right I have two forms appear when a certain action is performed, one form is purley for visual effects and another displaying an error message. Once the error message form is closed, I would also like to close the other form, however it will not close, I have tried
vb Code:
My.Forms.GreyOut.Focus()
My.Forms.GreyOut.Close()
Me.Close()
vb Code:
GreyOut.Close()
Me.Close()
But so far, I havent been able to close it
Learning C♯
Data Binding & Bound Controls - Objects and wizards will never be as intelligent as you, do it yourself! (Unless your Pro)
-
Feb 24th, 2008, 11:43 AM
#2
Re: [2005] Closing a Form not in Focus
Show us the block of code where you are showing these two forms.
-
Feb 24th, 2008, 12:09 PM
#3
Thread Starter
Hyperactive Member
Re: [2005] Closing a Form not in Focus
Well I open them using this
vb Code:
Private Sub btnsearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsearch.Click If txtsearch.Text = String.Empty Then Dim GreyOut As New GreyOut GreyOut.Show() Dim msgbox As New MsgboxForm msgbox.lblerrormessage.Text = "Please enter a key word into the search text box" msgbox.Show() Else btnsearch.Cursor = Cursors.WaitCursor Call RetriveDatabaseProducts() btnsearch.Cursor = Cursors.Default End If End Sub
However just to note, the 'GreyOut' form has no borders or anything, I cant even close it via right clicking the form on the Start menu bar, mabe this could be the problem?
EDIT: Just tested, yeah that seems to be the problem, I will just enable/change properties to see which is causing the problem.
Last edited by Bopo; Feb 24th, 2008 at 12:13 PM.
Learning C♯
Data Binding & Bound Controls - Objects and wizards will never be as intelligent as you, do it yourself! (Unless your Pro)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|