|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Order of formsThe main form is Form1.
Form2 is loaded but not visible. Choosing a Form1 menu item makes Form2 visible over Form1. Clicking a button on Form2 brings up a MessageBox, but then Form2 all but disappears behind Form1. Once the MessageBox is gone, Form2 resumes its postion in front, where it's supposed to be. Why does it do this? Can it be fixed? Thanks for any clues. -- Dale Beckett Dale wrote:
> The main form is Form1. Is it an option to make Form1 not visible while Form2 is being shown?> Form2 is loaded but not visible. > > Choosing a Form1 menu item makes Form2 visible over Form1. > > Clicking a button on Form2 brings up a MessageBox, but then Form2 all but > disappears behind Form1. Once the MessageBox is gone, Form2 resumes its > postion in front, where it's supposed to be. > > Why does it do this? Can it be fixed? > Thanks for any clues. Or to show Form2 modally? If neither one, post your msgbox code. Mike mscir alleged...
Show quoteHide quote > Dale wrote: Hiding Form1 while Form2 is visible works, but that seems clunky and I'd > > > The main form is Form1. > > Form2 is loaded but not visible. > > > > Choosing a Form1 menu item makes Form2 visible over Form1. > > > > Clicking a button on Form2 brings up a MessageBox, but then Form2 all but > > disappears behind Form1. Once the MessageBox is gone, Form2 resumes its > > postion in front, where it's supposed to be. > > > > Why does it do this? Can it be fixed? > > Thanks for any clues. > > Is it an option to make Form1 not visible while Form2 is being shown? > Or to show Form2 modally? > If neither one, post your msgbox code. > > Mike > > rather not. Form2 has a ListView control, lvwTHINGS. The (unfinished) code for a Form2 command button is: ------------------------------- Private Sub cmdDel_Click() Dim rc As Long rc = MsgBox("Delete item " & lvwTHINGS.SelectedItem.Index & " " & _ lvwTHINGS.SelectedItem & "?", vbYesNo, " Item Delete") If rc = vbYes Then Else End If End Sub ------------------------------- I'd like to be able to see the Form2 ListView to double-check what I'm about to delete before I click YES or NO, but Form1 moves to the foreground right behind the MessageBox and obscures Form2. Could it have anything to do with the fact that the ListView on Form2 was initialized and populated by Form1 at program startup? Here is that code: ________________________________ Form2.Show Dim itmX As ListItem Set clmX = Form4.LV1.ColumnHeaders.Add(, , " Name", 200) Set clmX = Form4.LV1.ColumnHeaders.Add(, , " Sound", 200) For x = 1 To NameCounter Set itmX = Form4.LV1.ListItems.Add(, , NameList(x)) itmX.SubItems(1) = SoundList(x) Next x Form2.Hide ________________________________ Help is much appreciated. -- Dale Beckett Dale alleged...
> mscir alleged... Oops! Those references to Form4 are typos. They are "Form2." > > Dale wrote: > > -- Dale Beckett "Dale" <d***@NOT.com> wrote in message There are known bugs with modal forms and z-order in MDI applications. I'm news:MPG.1dc23867766e412b9896d3@news.microsoft.com... > The main form is Form1. > Form2 is loaded but not visible. > > Choosing a Form1 menu item makes Form2 visible over Form1. > > Clicking a button on Form2 brings up a MessageBox, but then Form2 all but > disappears behind Form1. Once the MessageBox is gone, Form2 resumes its > postion in front, where it's supposed to be. > > Why does it do this? Can it be fixed? not too sure about what you're describing, though. |
|||||||||||||||||||||||