473,625 Members | 3,306 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PIL show moves focus

Hi!

I have an application where images (jpeg) have to be annotated by an
operator. I use PIL like:

import Image
im = Image.open(Path )
im.show()
raw_input(Path + ':')
.....

Python runs in a console window. Then show starts some application (in
my case "Windows picture and FAX viewer") and the picture goes to this
application window.
Then operator enteres the annotation as prompted by raw_input. So far
so good. I understand, that the approach is very minilalistic, but
suffisient for what has to be done.

Unfortunatelly after im.show focus moves to thw "Windows picture ..."
and stays there until I move it back using the mouse.

Question: is there any way of returning the input focus to the console
window?

Jun 12 '06 #1
1 1610
Is the console necessary?
if not, you can easily disable the console by rename the ext to .pyw

el*******@hotma il.com wrote:
Hi!

I have an application where images (jpeg) have to be annotated by an
operator. I use PIL like:

import Image
im = Image.open(Path )
im.show()
raw_input(Path + ':')
....

Python runs in a console window. Then show starts some application (in
my case "Windows picture and FAX viewer") and the picture goes to this
application window.
Then operator enteres the annotation as prompted by raw_input. So far
so good. I understand, that the approach is very minilalistic, but
suffisient for what has to be done.

Unfortunatelly after im.show focus moves to thw "Windows picture ..."
and stays there until I move it back using the mouse.

Question: is there any way of returning the input focus to the console
window?


Jun 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1860
by: David | last post by:
I have something analogous to this: <a href="#content">jump to content</a> <div id="content"> <h1>blah<h1> <a>blah</a> </div>
0
2144
by: Stephen Bedford | last post by:
I am developing an application that is primarily keyboard not mouse driven. Navigation is very difficult within some controls (list boxes, radio groups etc) unless the focus rectangle is visible. When an application starts the focus rectangle for a control is never visible and only becomes visible once the TAB key is pressed. After that everything works OK. In a list box I have looked at the ChangeUICues event of the control and there is a...
1
1486
by: DomGo | last post by:
Hi, I try to open a form, that automatically loses focus to the window, that had the focus immediatly before the new form has been opened. The new form is topmost and displays a message only for a certain time, while the user can work on his current window. Everthing works except the fact, that the opened form gets the focus. I tried to catch the WindowsActivated Event to pass the focus back to the "LostFocus"-Window. But for any...
3
2590
by: CLH | last post by:
I've written a project that uses a notify icon. The program periodically checks my SQL server, and when certain criteria are met, it pops up a reminder that a task needs to be completed. So far, it works great. However, when the reminder pops up, it takes focus from whatever 3rd party application the user is running. Does anyone know how to show up a form without having it take focus?
1
1928
by: Daniel Friend | last post by:
Hi have a window (FormBorderStyle=NONE) and the form is a MDI child. For some reason the form is not getting focus. I have tried the following code and nothing seems to work. sForm.Show() sForm.Focus() sForm.Activate() sForm.BringToFront()
3
3970
by: jab3 | last post by:
Hello. I"m new to this group, and to JavaScript in general, so please forgive me if I breach local etiquette. I'm trying to implement some client-side 'dynamic' validation on a form. I'm having a couple of problems, which I'll try to describe. But this e-mail will only reproduce one of them, in a "short" example. What I'm generally doing is having each form entry contained in a div, which as a label, an input with some event handlers,...
1
2179
by: osmarjunior | last post by:
I override the OnShown event of a form and call both methods Select() and Focus() of a RadioButton. The RadioButton is selected, but the focus rect is not visible. If I press Tab key to exit the RadioButton, and press Shift+Tab to back to the control, then the focus rect is visible... But I wanna make the focus rect visible as soon as the form is shown. How can I ensure this? Thanks.
3
3147
by: Johnny Jörgensen | last post by:
I've a form that opens a tool window. The problem is that when the tool window is opened, the main form itself passes focus to the toolwindow. What I want and need is a toolwindow that works like a control with tabstop=false, i.e. it doesn't get focus when the window is opened, but focus is retained at the main form. And when you click a button on the toolwindow, it processes the click event and returns focus to the main form. Is that...
3
2398
by: agarwalsunitadhn | last post by:
hello i am working in C#.net. I want to know how to close one form and show another one. I had done the following code this.Hide(); MainForm frm = new MainForm(); frm.Show(); frm.Focus(); frm.Activate(); but when i close the last form activated then still it shows that the application is running. how can i completly close the first form
0
8256
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8694
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6118
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4089
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4193
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1500
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.