Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I used to use this property in VB6 to automatically arrange all the child forms within an MDI Form.

This property is gone. Is there a new syntax to tile and cascade child forms ?

 

thx !

What I don't know keeps me excited...
Posted

Wow !

Thanx Robby.

One quick question for you, do you know how to setfocus on a form and bring it up front if it is already opened ? ( I have already wrote a routine to prevent a form from opening two times, I just need to add a piece of code to set the focus on the form )

What I don't know keeps me excited...
  • *Experts*
Posted

If you have a reference to the openened form, just call Focus and/or BringToFront.

 

-Nerseus

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

What do you mean by reference Nerseus ?

At this point, I have the following code :

 

Dim frmCompany As New frmCompany ()

 

If 'the form is already loaded' Then

 

frmCompany.Focus

frmCompany.BringToFront

 

I tried both of these methods earlier today with no results :(

Any clues ?

What I don't know keeps me excited...
  • *Experts*
Posted

You can't just use the new instance of the form. You have to make

sure you're using the same instance. I'm assuming you're using a

For Each to check to see if the form is loaded; on the interation through

the loop in which you determine it's loaded, use the Focus method

on the form object that is assigned to the form loop:

For Each dummy In mdi.MDIChildren
 'if it's loaded then
   dummy.Focus();
 'end if
Next

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...