Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Form Focus


hey..i have 3 forms..i want to make 1 of them take the focus..and like lock the screen until..the form is closed..how can i do that?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Opening A Form But Not Give It The Focus (or Quick Tell Me Wich Form Has The Focus)
Opening a form but not give it the focus (or quick tell me wich form has the focus). Is this possible??

How To Give Focus To Activex Component On Form Focus?
Using the Reflections ActiveX component (Reflections is a popular Terminal Editor for connecting with old Alpha/VMS servers), I have a Form with this internal terminal editor ActiveX that obviously needs to have focus to type in.

I've tried setting Form_GotFocus and Form_Click to give focus to the activex component but to no avail. The only thing that works is if I set Form_Repaint to give focus, then it works fine. But repaint causes the window to constantly try to bring itself in front of other Microsoft apps like Word and Outlook and other VB apps when I drag them in front of it. And it keeps flashing in the task bar when I move something non-MS in front of it.

Is there a better way to keep focus on the activex terminal session when the form gets focus without using repaint?

Form Got Focus Or Lost Focus Don't Work
Hi, I have a form that I can't get the Lost Focus or Got Focus events to fire, would anybody know why?

Here is what I am trying to accomplish. I have an .exe vb6 application(MainApp) that opens another .exe vb6(ChildApp) application using the shell command. The main application has a list view with a bunch of records. The ChildApp is used to Insert, Delete or UPdate records from the MainApp. So when an Insert, Update or Delete take place on the Child App, I'd like to refresh the listview on the MainApp because the records have changed. How can I accomplish this? Is there a way to call the form in the Main Application from the Child Application even they are 2 different .exe files? I really need help on this please.

Refresh A Form Not In Focus From A Form That Is In Focus
When in a program with mulitple forms, I would like to refresh a form that is not currently in focus from a form that is currently in focus.

I have a parent form that contains status information. I call a child form to change information that will affect the satus information display.

Currently I go back to the parent that was not in focus, and perform and perform a manual refresh, via a command button which changes the entries in the status line.


All variables in a common module and declared as public.

What instruction process can I use to change information on the parent form when changes are made on the child form.

Old Problem, Still No Solution? (modal Form Losing Focus When Parent Form Is Minimize
Hi everyone,


I have a problem with modal forms that's very easy to reproduce, and
practically locks up the application:


When closing Form1 I display a modal from (Form2), more or less to
request
the user if he's sure, etc. That works fine if Form1 is in normal
window
state and visible.
If I minimize Form1 in the windows Taskbar before closing it using the
system menu, Form2 appears, but is grayed and cannot receive mouse or
keyboard input. Because Form2 is displayed and modal, I cannot do
anything
else with the application. As far as the user is concerned, it's dead
and
frozen.


Form2 does not receive a Deactivate or LostFocus event, where I could
possible "repair" things.

Cheers, Marek

Once Form Opened, How To Shift Back Focus On Sheet While Form Is Still Open?
Hi,

Once I run my macro and my form is opened, the focus is entirely on the form and I cant select my excel workbook( or any workbook for that matter).

Is there any way that my macro is still runnin, i.e. form is still open (maybe a minimize option..) while i can select and change some values in my workbook..

I tried the myworksheet.activate but it doesnt solve the problem. Any help?

Thanks...

Show A Form On Top Of Another Form, But Keep Focus On The Lower Form?
I've attached a picture of a scheduling section for my applicaiton. The Tooltip window is a seperate form with transparency and no border. I would like the form to show on top of the scheduling form as in the screenshot, but I want the focus to remain on the lower form.

I have seen code somewhere that does this but I can't seem to find it anywhere?

Getting Text To Show Highlights On Form Behind Form In Focus
Title sounds kind of funny. I'll see if I can explain better.

With my text editor, when I have the (Find/Replace) Form up, and I do a Find or Replace... I have it coded to "highlight" the text using .SelLength, however, it doesn't show the text as selected until I switch focus BACK to the main form (by clicking on it, or tabbing). When I click (or tab) back to the find box, the highlighting goes away.

For example, open up Notepad and paste some stuff in it, do a "Find", you'll see when it finds the text, it will be highlighted while the Find box is still in focus.

This is how I'd like my application to behave. Any ideas?

I'm using a RTB control.

No Access To Form Unless And Event Occurs On Form W/ Focus
How do I make it so a user cannot access the form that does not have focus unless an event occurs on the form with focus?

Form Not Taking Focus On Form.show
I need to know how to make a form not take focus when doing form.show. Thanks for any help you can give me.

Form Subclassing Question...I Don't Want A Form To Get Focus
I have 2 forms.
I do not want one form to get focus.
This can be done by disabling the form...but I don't want to do this and more to the point, I can't do this. I have my reasons.

I am subclassing the form and somehow how have to trap for the "get focus" event.
I think if I ignore this message the form won't get focus...I think

What event is it I'm looking for here? Is there such thing as I a "get focus" event on a form...Hmmmm...It's late and I'm tired.

Whimper

Giving A Form Focus Over Any Form
Hello,

I have some forms lets say 5 in this example. then I have a form that appears when something special is done. lets call this FrmSpecail, how do I make it so that this form is always in front of the other forms even if the forms are enabled say that if they click on the other forms this form will not go behind them till they have closed this form.

I tryed this:

Code:
form lost focus
FrmSpecial.setfocus
end sub

but it does not work

I even tryed this on the other 5 forms but nothing happened im quite confused.


Code:
form gotfocus
FrmSpecial.setfocus
end sub

I know i could use a timer to make them go to the front which is what i'm doning at the moment but this is a bit rubish really. I wondered if any one know a better way.

Thanks for your help!

Get Focus For My App And Form
First, excuse me for my weak english. I'll try it anyway.

I have written an internet application that shows messages in normal vb forms as soon as it receives the command to do so. The application runs in back and the user is working with an independent application when the message appears.

My problem is: Win2000 does not allow to focus my own form in my own applicaiton anymore. I tried it with various API Functions such as BringWindowToTop, PutFocus, SetForegroundWindow, SetWindowPos... My form starts blinking foolishly in my taskbar, but I want it to get the focus, so the user may click the default button using the ENTER key.

I hope you understand my problem and can bring me further...

yours, Daniel

Form Focus?
Hi, i wanna do something like lock the program. only admin can unlock. when i click Lock, another form will pop out. then how do i make tt form fix on top and not allow to change behind of it. something like keep on focusin the form

How To Know If A MDI Form Is Getting The Focus
Hi all

I have a procedure that loads a msgbox made by me, that shows itself in a form (that form is not a mdi child) and set enabled to false the MDI form, and when the users click ok, then the msgbox dissapear and return the MDI form to normal

The problem is that when you click in other program and return to click in the vb program you see the mdi form bloqued but you can't see the msgbox (note that the msgbox has the property ShowInTaskBar set to False)

Is there a way to do that when the MDI form get the focus shows the other form?

Set Form To Not Focus
Is there a way to set a form to not focus?

Form Focus
I have a form that, that get set focus to every so often, by a timer....so when the form get the focus, the MDI form alos gets focus to. Is there anyway to make it so only the form get's the focus but not the MDI form, and MDI childs

the form i am trying to set focus to is not a MDI child.

About The Focus Of A Form
Any one know how to program to make a form get focus?

please give me some advice!

Set The Focus On A Form
I want to set the focus on my form so that i can use keycodes when i set the tabstop of all objects to false. I know its something like set focus = true or something like that. Can any1 help?

Form Focus?
Hum... Well Im making program for project but it needs to be that my form is in focus all times. I mean not vbmodal as that is not what I want. I want that it be in focus over everything, not forms only. I have found lots of posts with this information but I not need vb6, but vb.net... many posts like this: http://www.xtremevbtalk.com/showthread.php?t=187126 do not work in vb.net as it says there problem is with "hwnd."

Can anyone please help for I need this lots. I please apologise for my bad speaking, I live in england only short time but I am practising. Sorry.


Thank you
Raaj


EDIT: I am sorry I notice "vb.net General" forum now, for post like this. I would have place it there but my friend said to post it here in so I did not look at other places. I am sorry, Please move post if needed.

Form Focus
How do I know if my form has focus or not?

Thanks, Spyru

Form Focus
how can i found out if my form has focus?
thx

Focus On Form
Ok, this one probably is very simple, but im a little slow

how do i bring a form into focus, basically if another form is placed over the top of a form and I click a certain button, that form in the background moves to the foreground. Any ideas?

Keep Form On Top, But Not Got Focus
How to I get a form to stay on top of my programs Main form, but still be able to edit text in the Main form - just like the "Find / Find Next" in VB6?

Do Something When Form Gets Focus?
Hello,

How can I do something (for example: display a messagebox) when I either:

- Alt+tab back to the form,
- Click the form when I have another program in front of it,
- Click on the taskbar thingy of the program?

I tried Form.OnFocus but that didn't work.

SharQueDo

Set A Form As On Top, But Do NOT Take Focus?
Is this even possible?

I'm struggling with a script which every 10 or so seconds... pops up a window (like MSN does) at the bottom right with data to inform the user but the window takes focus automatically meaning the user has to close it or wait for it to disappear before they can continue.

Any ideas?

No Focus Form
I'm working on a mark-up project with two parts. One is the marked up reference and the other is the document being worked on.

I want to be able to phase the reference form in and out of view while continuing to work on the active form below. The form below may or may not be part of my program.


The trouble is that when the top form is phased nearly out I want to still be able to work in the form below. In fact when I click on the bottom form to work I'm actually clicking on the top form and setting the focus back to the top form.


Does anyone know how to keep the top form visible and maximized (although phased out), but continue to keep the focus on the bottom form. I dont want the form on top to receive the focus until I'm ready.

thanks in advance for any help.

No Focus Form
I'm working on a mark-up project with two parts. One is the marked up reference and the other is the document being worked on.

I want to be able to phase the reference form in and out of view while continuing to work on the active form below. The form below may or may not be part of my program.


The trouble is that when the top form is phased nearly out I want to still be able to work in the form below. In fact when I click on the bottom form to work I'm actually clicking on the top form and setting the focus back to the top form.


Does anyone know how to keep the top form visible and maximized (although phased out), but continue to keep the focus on the bottom form. I dont want the form on top to receive the focus until I'm ready.

Has My Form The Focus
I am looking on how to know when my form losses the focus and goes to another program in windows....

I am trying subclassing but I havent found the correct message to expect...

Can anybody help me?
Thanks

A Form That Will Never Get Focus
I need help to create a form that will never get focus.

Now immediately I will get ideas for SetFocus and stuff but I need the form never to even enter the execution of being clicked as this would make the form for that millisecond lose focus. In order for the program I am creating to work I cant afford this.

All that I am doing is creating a form with a picture box to create a custom form but I cant let the use click the program and the form must remain in the center on the screen.

Does anyone know how I could achieve this?

Thanks,

Set Focus On Form
hi friends,

i am displaying a normal form in a MDI form. please note that it just a normal form i have not set the MDIchild property true for that form.
My problem is when the focus is on that form then in the taskbar the application tab is not pressed i mean it is showing as if i am out of the application ie. it is deactivated.
i think i am not clear.......
thanx,

Form On Top (No Focus)
How to keep an form on top, without giving it focus?

Set Focus On A Form
Can I set the focus on a form based on it's hwnd or it's caption?

Get Focus Of Form
I am writing a program where I am using two forms with a command button on the first form. When I click on the command button on form 1 I need to have form 2 appear in the same location as form 1 with form 2 having the focus.

Any suggestions?

Thanks

Which Form Has Focus?
how do i find out which form has focus on screen at any given time? I have an ms agent on another form and i want to put context-specific help for each form behind the agent_click event or suchlike... the agent's form is always loaded but not visible so that the agent stays up no matter what main form is loaded...

Cheers

Des

Form Focus
Alright, this is my problem. I am programming a sort of keystroke logger for my computer. I've got it almost all done, however, when somebody clicks on an application or whatever, and turns the focus off of the program, it wont log the keys. How do I make it so that it will still log it even after the focus is not on it?

Form With Focus
Is there anyway to know which form has focus?

Form Focus
I have set up the following procedure.

Form A comes up. If a particular error occurs, a smaller form B is visible and instructs how to correct the error. An "Exit" button on Form B is pressed and Form B is unloaded and the user continues on Form A.

Since Form B is smaller than Form A, the user could mouse click on Form A and not do what is required by Form B.

Question: Is there a command or settting that will give Form B focus until the Form B "Exit" button pressed?

I know message boxes can be set like that, but I can't use a message box. Form B "lostfocus" does not work either. Any suggestion will be sincerely appreciated.

How Do I Now Which Form Has Focus?
Hey!

I have created a nifty window that lists all the active forms of my project, so that the user can close them or switch to them in case he has a lot of open windows.

As an extra, I'd like to highlight the form that is currently active. So that the nifty window checks which is active and highlights this entry.
Question 1: How do I do that? A property like form.focus = true would be great...

Question 2: In order to, for example, highlight the window-entry the mouse is hovering over, I'd have to do that from each form, or is there a more elegant way?

Question 3: Why can't I unload my controls when the container is open? Do I have to make them invisible to unload them or is there no way?

Question 4: Is there a different measuring unit for the top and the height property?? My button is heigh=195 but top=60, although another such button would not fit between it and the top form border!

OK, thank you!!!

Holger

Form Focus/ Always On Top
I have a Main form and a second form...

The Second form has the "Always on top" set up...

What I need to know is how to make the second form lose its Always on top when both form lose focus...

then have it return when the focus is given back?

Thanks.

-Geoff

Form In Focus
i thought keeping form on top would do it but it doesn't....I need to keep this in focus some how so that the hotkeys work even when program isn't selected...like when playing a game i need to be able to use hotkeys..i have found anything on the web about it yet... any help?

Form Focus
I want to know if the form is on focus or not
windows Zorder or something

Set A Form To Focus
So, I wanna load a form... But sometimes the form when it loads up., I just can't see it, But when I close every window, then I will see the form... Can I like load the form , and let it display on the top so users will see it?

Focus Of A Form
How easy/hard it is to simply say that when a form loses the focus, (lets say) label1.caption = "INACTIVE" and when it gets it back, it changes to "ACTIVE". Now I tried doing it with GetFocus, LostFocus, Activate and Deactivate events, but they do not work.

?


-JR-

Does That MDI Form Have The Focus??
I need to get the handle of an MDI form (child window) that has the focus. When I use the GetForeGroundWindow API, all it does is return the parent window's handle.

How do I get the handle of the active child window?

Thanks,
Jordan

Form Focus
I have written a program to install an application patch on remote machines.
This is done by mapping a drive to a PC that is listed in a database, then using the copyfolder command installs the new patch. The program, then disconnects the mapping and moves to the next PC in the list.
My problem comes if I wish to end the program early. Because this program runs in a do while database is not EOF, the form will not respond when I click on the exit button, or any other button as if it has lost focus or is busy copying the files.
Is there a way that I can stop the form from loosing functionality while thing is in the loop.

Thanks
Steveknight@tencel.com

Form Focus
Can anyone help. I need to determine if my form has lost or regained the focus using the win32api.

Set Focus On A Form
Hello,

I am pretty new on this forum but I have a question about programming in visual basic in Access.

I have a form and in this form there are 3 subforms.
When I change something in one of the subforms, I want to refresh the main form data.

But I can't seem to find out how i can set the focus to the main form so I can refresh it.

This is probably a simple thing to do but can somebody please help me with this problem.

Regards

Bert

Form Does Not Have Focus
I have a program that does some behind the scenes things, then displays a form.
I have form's key preview set to true, maximised, control box false. The form should and does fill up the whole screen. I have windows taskbar set to autohide, so all I see on the screen is my form.
The form expects user to press ENTER key to do its thing.
Problem is that form displays how I want it to, but if there is another program in the taskbar, if I press ENTER, that other program sees the keypress. I have to mouse click on the form and then it will see the keypress.
I have searched for a way to give the form focus, but I cant find it. Me.SetFocus gives me an error.
Appreciate any help..
TIA.

Copyright © 2005-08 www.BigResource.com, All rights reserved