Jump to content

Turn GUI Transparent, but leave GUI Image normal


nick21
 Share

Recommended Posts

Ok, I have been trying and looking around. I want to make the GUI 100% transparent, but leave the buttons,gui image normal so I can see them.

This is what it looks like.

Posted Image

This is what I want it to look like

Posted Image

I just want to gui border, and top bar gone, so it will just display the picture and buttons (if I want to move them around).

Thank You,

nick21

Link to comment
Share on other sites

Sample:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=fgtrgr.kxf
$Form1 = GUICreate("Form1", 633, 447, 245, 193, BitOR($WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_BORDER,$WS_CLIPSIBLINGS), 0)
$Button1 = GUICtrlCreateButton("Button1", 128, 192, 201, 65, BitOR($WS_GROUP,$WS_BORDER))
GUISetState(@SW_SHOW)
WinSetTrans($Form1,"",170)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
[size="5"] [/size]
Link to comment
Share on other sites

Ok, I have been trying and looking around. I want to make the GUI 100% transparent, but leave the buttons,gui image normal so I can see them.

This is what it looks like.

Posted Image

This is what I want it to look like

Posted Image

I just want to gui border, and top bar gone, so it will just display the picture and buttons (if I want to move them around).

Thank You,

nick21

Unless I misunderstand, I don't see the relevance of posts #2 and #3.

To make the parent gui transparent but not the child window you could create a mask for the parent so that only the child is visible. That won't work without some extra work if you want to move the child around in the parent, although if the parent is not visible moving the child around will be confusing anyway.

If you just want the controls on the parent to be visible but not the rest of the window to be seen then that is a bit easier and MrCreatoR has a udf for it in example scripts.

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

  • Moderators

:D nick21,

Like martin, I am unsure exactly what you are looking for.

If you want to have an inage of the "EndProgram - MayaStartUpWnd" GUI overlaid with your own buttons, then this might help:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$hGUI = GUICreate("Test", 400, 350, -1, -1, $WS_POPUP)

$hPic = GUICtrlCreatePic("Your_Image_Here", 0, 0, 400, 350)
GUICtrlSetState(-1, $GUI_DISABLE)

$hEnd_Button = GUICtrlCreateButton("End Now", 210, 290, 80, 40)
$hCan_Button = GUICtrlCreateButton("Cancel", 300, 290, 80, 40)

GUISetState()

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $hCan_Button
            MsgBox(0, "Message", "Cancelling")
            Exit
        Case $hEnd_Button
            MsgBox(0, "Message", "Ending")
            Exit
    EndSwitch

WEnd

if neither of us is close, please give us a bit more of a hint as to your requirements.

:huggles:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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...