Jump to content

Change color of border to black? (Dark Mode) [Solved]


Recommended Posts

Taking my first steps into making my own GUI.

Is it possible to change the border to black?

Capture.PNG.20d57d5798f7f76890280793dc757b10.PNG

I have seen a few similar topics but the samples are not working.

Seems like something that would be pretty simple. 

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


$SimpleGUI = GUICreate("                      Vital Site (Get/Add)",300, 120, -1, -1,$WS_BORDER,$WS_EX_WINDOWEDGE)
   WinSetTrans($SimpleGUI, "", 220)
   GUISetBkColor(0x000000)
$Button1 = GUICtrlCreateButton("Get Patient Info",18,18,125,25)
   GUICtrlSetFont (-1,8,800,0,"MS Sans Serif")
   GUICtrlSetColor($Button1,0xb8b8b8)
   GUICtrlSetBkColor ($Button1,0x545454)
$Button2 = GUICtrlCreateButton("Add Patient Info",158,18,125,25)
   GUICtrlSetFont (-1,8,800,0,"MS Sans Serif")
   GUICtrlSetColor($Button2,0xb8b8b8)
   GUICtrlSetBkColor ($Button2,0x545454)
$ExitButton = GUICtrlCreateButton("Exit",110,48,75,25)
   GUICtrlSetFont (-1,8,800,0,"MS Sans Serif")
   GUICtrlSetColor($ExitButton,0xb8b8b8)
   GUICtrlSetBkColor ($ExitButton,0x545454)

GUISetState(@SW_SHOW)


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

      Case $Button1
         MsgBox(0,"","Get")
            Exit
      Case $Button2
         MsgBox(0,"","Add")
            Exit
      Case $ExitButton
            Exit

   EndSwitch
WEnd

 

Edited by SkysLastChance

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

Link to comment
Share on other sites

  • 3 weeks later...

There you go

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ColorConstants.au3>
#include <StaticConstants.au3>

$SimpleGUI = GUICreate("", 300, 140, -1, -1, $WS_BORDER + $WS_POPUP)
WinSetTrans($SimpleGUI, "", 250)
GUISetBkColor(0x000000)
GUICtrlCreateLabel("Vital Site (Get/Add)", 10, 10, 280, 30, $SS_CENTER + $SS_CENTERIMAGE)
GUICtrlSetColor(-1, 0xb8b8b8)
GUICtrlSetFont(-1, 16)
GUICtrlCreateLabel ("", 10,40,280,3, $SS_SUNKEN)
$Button1 = GUICtrlCreateButton("Get Patient Info", 18, 50, 125, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xb8b8b8)
GUICtrlSetBkColor(-1, 0x545454)
$Button2 = GUICtrlCreateButton("Add Patient Info", 158, 50, 125, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xb8b8b8)
GUICtrlSetBkColor(-1, 0x545454)
$ExitButton = GUICtrlCreateButton("Exit", 110, 80, 75, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xb8b8b8)
GUICtrlSetBkColor(-1, 0x545454)

GUISetState(@SW_SHOW)

While 1
  $nMsg = GUIGetMsg()
  Switch $nMsg
    Case $GUI_EVENT_CLOSE
      Exit
    Case $Button1
      MsgBox(0, "", "Get")
      Exit
    Case $Button2
      MsgBox(0, "", "Add")
      Exit
    Case $ExitButton
      Exit
  EndSwitch
WEnd

 

Edited by Nine
Link to comment
Share on other sites

1 hour ago, SkysLastChance said:

Holy crap this looks great. Thank you!

lol, glad you like it.  But I must admit that the basic design of this small GUI interface was YOUR design (and if you agree, I may use it laterly).

So in fact, I just added a bit of what I would like to see...

Link to comment
Share on other sites

It is a good day if i am able to help anyone out on here. 

Feel free! I am trying to fine tune for a good dark mode GUI. I am still learning how to use a lot of the styles. 

I like how you used 

GUICtrlCreateLabel ("", 10,40,280,3, $SS_SUNKEN)

This has given me some ideas. 

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

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