Jump to content

Nice, GUI with Application behind (but to slow)


Rigobert
 Share

Recommended Posts

Hi,

This is my first post on this forum. Since 2 months Iam programming in AutoIt and I like it a lot.

Ive learned much in a short time, thanks to you all here.

Normally Iam programming databases in Filemaker, but I dont like the interface (blue titlebar and menu), so I would like to create my own.

Ive created a Gui as a layer on top of an application (you can test it either with Notepad or Filemaker). In this Gui, Ive made a Gap/hole by creating a image that works like a transparent (you can click through it.

Another nice feature is that you can click the gui everywhere you like and drag it over the screen. (not on the text)

Problem

1. When I resize the Gui, the application behind (notepad or filemaker) follows to slow, so you can see it.

2. My CPU is quite high. Between 15 and 30

Questions

1. How to resize so that the behind application follows that fast, that I wont see it.

2. Lower the CPU (I know about the sleep(10) etc.) but are there more possibilities?

3. Will this parent and child in combination with the transparent give problems for Windows Vista?

4. Are there other techniques to get the same/better result?

5. What other language could be a good option to program this in? (c#, studio.net, vb, java and can I also create .exe with them?)

Testing?

For testing it I would be grateful. :)

You can download it here.

(It's a little large 17 mb, sorry, this is because of the filemaker.exe, but it will give you a good idea of how it can work)

I wrote comments in my script to understand what Im doing and why.

To test the Gui with Filemaker runtime choose 2 on line 9. Test it with Notepad choose 1.

Click the transparent button to see what is behind te Gui.

Comment

Most of you would think of AnyGui But Ive created it a bit different.

Tips about my way of programming are welcome, I would like to learn it the good way.

Regards,

Rigo

(The Netherlands)

Link to comment
Share on other sites

Hi,

This is my first post on this forum. Since 2 months Iam programming in AutoIt and I like it a lot.

Ive learned much in a short time, thanks to you all here.

Normally Iam programming databases in Filemaker, but I dont like the interface (blue titlebar and menu), so I would like to create my own.

Ive created a Gui as a layer on top of an application (you can test it either with Notepad or Filemaker). In this Gui, Ive made a Gap/hole by creating a image that works like a transparent (you can click through it.

Another nice feature is that you can click the gui everywhere you like and drag it over the screen. (not on the text)

Problem

1. When I resize the Gui, the application behind (notepad or filemaker) follows to slow, so you can see it.

2. My CPU is quite high. Between 15 and 30

Questions

1. How to resize so that the behind application follows that fast, that I wont see it.

2. Lower the CPU (I know about the sleep(10) etc.) but are there more possibilities?

3. Will this parent and child in combination with the transparent give problems for Windows Vista?

4. Are there other techniques to get the same/better result?

5. What other language could be a good option to program this in? (c#, studio.net, vb, java and can I also create .exe with them?)

Testing?

For testing it I would be grateful. :)

You can download it here.

(It's a little large 17 mb, sorry, this is because of the filemaker.exe, but it will give you a good idea of how it can work)

I wrote comments in my script to understand what Im doing and why.

To test the Gui with Filemaker runtime choose 2 on line 9. Test it with Notepad choose 1.

Click the transparent button to see what is behind te Gui.

Comment

Most of you would think of AnyGui But Ive created it a bit different.

Tips about my way of programming are welcome, I would like to learn it the good way.

Regards,

Rigo

(The Netherlands)

I don't want to download 17 mB, so can you show anything in a small sample script?

It sounds like you are hiding the app behind your script, but maybe it would be easier to make the app a child of your script. That way there is no need for a transparent section and no problem when you resize.

;code for Beta 3.2.11.1

#include <windowsconstants.au3>
#include <constants.au3>

$hGui1 = GUICreate('Parent',800,600,100,100, BitOr($GUI_SS_DEFAULT_GUI,$WS_CLIPCHILDREN))
$iBtn1 = GUICtrlCreateButton("fit",560,10,100,21)
$hLV1 = GUICtrlCreateListView("lvexample",410,50,300,300)
GUISetState()
Run("notepad.exe")
Sleep(300)
WinMove("Untitled","",0,0,395,600)
Sleep(300)
DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle("Untitled"), "hwnd", WinGetHandle('Parent'))
Sleep(200)

While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then Exit
    
WEnd

EDIT:Changed script by deleting things I hadn't meant to leave in it.

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Hi Martin,

Thanks, Ok, it sounds logic.

What you say is that I should make the application the child.

But that is not what I want, because then I resize my application instead of the gui.

I don't want to see te borders and titlebar of my app.

I know it would be easier, but it won't give me the result I want.

I've would like to try your code but it gives a error. WARNING: $GUI_SS_DEFAULT_GUI: possibly used before declaration.

How can I fix this?

You can download a smaller file here to see what I try to explain. (without the filemaker)

Thanks

Gui.au3

Link to comment
Share on other sites

Hi Martin,

Thanks, Ok, it sounds logic.

What you say is that I should make the application the child.

But that is not what I want, because then I resize my application instead of the gui.

I don't want to see te borders and titlebar of my app.

I know it would be easier, but it won't give me the result I want.

I've would like to try your code but it gives a error. WARNING: $GUI_SS_DEFAULT_GUI: possibly used before declaration.

How can I fix this?

You can download a smaller file here to see what I try to explain. (without the filemaker)

Thanks

I'll have a quick look at the simpler example.

I out the version I used to run the code I gave, but you can probably make it run by changing

#include <windowsconstants.au3>

to

#include <guiconstants.au3>

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Sorry Martin,

I don't think its the same. Please take a good look again.

It cost me a lot of time to create it and to post it.

Your gui dos not do the same. Please read my post carefully to understand what I am trying to reach.

Thanks for your time..

Tips are welcome!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...