Solved

Forms problem

Posted on 2004-04-11
3
268 Views
Last Modified: 2011-10-03
Hello.

I have two forms:
Form1.borderstyle=FixedSingle
Form2.borderstyle=FixedSingle
Form2.ShowInTaskbar=False

form1 (main form) and form2 (settings form). When user click on form1.command1, then must show settings form. My problem is when I click on form1.command1 then:
Form2.Visible = True
Form1.Enabled = False  

and then Form1 lost his focus from taskbar, so when I click on taskbar (form1) form2 hides (lost focus) behind disabled Form1, and only can be seen when I maximize and minimize some other apps window.
So I need a way to show Form2 and to keep Forms1 focus in taskbar, but Form1.Enabled must be FALSE

I tried with Form1_Activate(), Form1_GotFocus(), Form2_LostFocus() and nothing...

Thanks.




0
Comment
Question by:damirsel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 50 total points
ID: 10802954
Try

Private sub Command1_Click()
 form2.show vbmodal
End Sub
0
 

Author Comment

by:damirsel
ID: 10804994
OK that works, but is it possible to focus in taskbar stays on Form1 while Form2 is active and not on Form2 (when is visible), becuse Form2 is not shown in taskbar and belongs to Form1 Apps. Right now it seems like Form2 is another applications window but not visible in taskbar.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 10807396
You might try a Form2_LostFocus event to set Form1's focus

Private Sub Form2_LostFocus()
  Form2.hide 'or unload Form2
  Form1.SetFocus
End sub

0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question