473,941 Members | 3,556 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

KixForm, a (little) GUI for Python + PyWin32 ?

Hi!

I had found (since only 2 hours) that KixForm can to do used by Python +
PyWin32

At the end of the message, a very small example

It's an Active-X, in one file (.DLL), and one help-file (.CHM)

It is limited, but simple

Download here :
http://www.kixforms.org/assets/files...Xforms_230.zip
@-salutations

Michel Claveau


# -*- coding: cp1252 -*-

import time
import win32com.client

kgui = win32com.client .Dispatch('Kixt art.System')

def rgb(r,g,b):
return (r*256+g)*256+b

form=kgui.Form( )
form.ClientSize =(520,220)
form.Font = "Verdana"
form.Text = "Titre de la fenêtre"

label = form.Controls.L abel()
label.Font = "Verdana",
label.FontSize = 18
label.ForeColor = rgb(127,0,0)
label.FontBold = True
label.Text = "(vide)"
label.Top=40
label.Left=40
label.Size=(550 ,30)

bouton1= form.Controls.B utton()
bouton1.Size=(8 0,30)
bouton1.Text="v raiment"
bouton1.Font = "Verdana",
bouton1.FontSiz e = 12
bouton1.OnClick ="BT1"
bouton1.Left=20
bouton1.Top=100

bouton2= form.Controls.B utton()
bouton2.Size=(8 0,30)
bouton2.Text="O n"
bouton2.Font = "Verdana",
bouton2.FontSiz e = 12
bouton2.OnClick ="BT2"
bouton2.Left=12 0
bouton2.Top=100

bouton3= form.Controls.B utton()
bouton3.Size=(8 0,30)
bouton3.Text="a "
bouton3.Font = "Verdana",
bouton3.FontSiz e = 12
bouton3.OnClick ="BT3"
bouton3.Left=22 0
bouton3.Top=100

bouton4= form.Controls.B utton()
bouton4.Size=(8 0,30)
bouton4.Text="s oif."
bouton4.Font = "Verdana",
bouton4.FontSiz e = 12
bouton4.OnClick ="BT4"
bouton4.Left=32 0
bouton4.Top=100

bouton5= form.Controls.B utton()
bouton5.Size=(8 0,30)
bouton5.Text="t rès"
bouton5.Font = "Verdana",
bouton5.FontSiz e = 12
bouton5.OnClick ="BT5"
bouton5.Left=42 0
bouton5.Top=100

btquit= form.Controls.B utton()
btquit.Size=(16 0,30)
btquit.Text="Te rminer "
btquit.Font = "Verdana",
btquit.FontBold = True
btquit.FontItal ic = True
btquit.FontSize = 18
btquit.OnClick= "QUIT"
btquit.Top=170
btquit.Left=180
form.Show()
txt=''
while form.Visible:
action=kgui.App lication.DoEven ts()
if action=='BT1': txt=txt+' '+bouton1.Text
if action=='BT2': txt=txt+' '+bouton2.Text
if action=='BT3': txt=txt+' '+bouton3.Text
if action=='BT4': txt=txt+' '+bouton4.Text
if action=='BT5': txt=txt+' '+bouton5.Text
if action=="QUIT": break
label.Text=txt
time.sleep(0.5)

print 'Résultat :',label.Text


Dec 29 '05 #1
0 1171

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

Similar topics

0
1594
by: Andrea Gavana | last post by:
Hi All, I have a very simple python script that tries to put a rectangular shape in a worksheet and then add some text inside that shape. The main problem, is that as usual Excel doesn't like input strings longer than 200 and something characters. So, by just recording a macro in Excel, I tried to append the text in the shape by dividing it in chunks. For example, I tried this little script: #----------------------------------
7
4511
by: vml | last post by:
Hello, I am trying to promote python in my job, my collegue only see matlab and microsoft scripting language. I understood that there willl be no backward compatibility between python 2.x and 3.0, does it means that: - my script using pywin32 for the COM layer and scipy for the maths won't work under 3.0
4
2762
by: Xavier | last post by:
Hi, I try to access to a Bluetooth GPS data-logger with Python. I use pySerial. Sending and receiving little messages (~100 char) works fine. However, when I ask the GPS to dump the trails, it returns some Mbytes and here is the problem : in the stream of bytes, I randomly losts chunks of ~100bytes.
2
1779
Subsciber123
by: Subsciber123 | last post by:
I am working on a program that would make firefox accessible to locked-in patients. What I need to be able to do is from python, find all the links and buttons on the active web page. I need to be able to find their physical locations on the screen, and I need to be able to tell the browser to follow ("click on") them later. Does anybody know how I would go about doing this? I do not know how to write an extension for firefox, and barely...
0
11117
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
11296
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,...
0
9860
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8218
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
7390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6080
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
6299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4908
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
4487
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.