Jump to content

_GUICtrlIpAddress_Create()'s Style?


sandin
 Share

Recommended Posts

Is there a way to change _GUICtrlIpAddress_Create()'s style? Try using this example script, and when u run the _GUICtrlIpAddress_Create() looks normal, though if u turn on the line 16, then it looks like "3D" and user can't see any dots, so is there a way to loose "3D" corners of the _GUICtrlIpAddress_Create()?

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <EditConstants.au3>
#include <GuiIPAddress.au3>

$Form2 = GUICreate("Form1", 160, 300, -1, -1, $WS_POPUP)
GUICtrlCreateGraphic(0, -1, 160, 301, $SS_BLACKFRAME)
$IP1 = _GUICtrlIpAddress_Create($Form2, 5, 90, 90, 20)
    GUICtrlCreateLabel(":", 96, 90, 3, 17)
$PORT1 = GUICtrlCreateInput("", 100, 90, 55, 20, $ES_CENTER+$ES_NUMBER)
    GUICtrlSetLimit(-1, 5)
$OK = GUICtrlCreateButton("OK", 2, 278, 78, 20)
    GUICtrlSetState(-1, $GUI_DISABLE)
$CANCEL = GUICtrlCreateButton("Cancel", 80, 278, 78, 20)
;~ DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form2, "int", 500, "long", 0x00040004) ;  <-- TURN THIS LINE ON/OFF TO NOTICE DIFERENCE
GUISetState(@SW_SHOW, $Form2)

While 1
    if GUIGetMsg() = $CANCEL then Exit
    Sleep(10)
WEnd
Link to comment
Share on other sites

Is there a way to change _GUICtrlIpAddress_Create()'s style? Try using this example script, and when u run the _GUICtrlIpAddress_Create() looks normal, though if u turn on the line 16, then it looks like "3D" and user can't see any dots, so is there a way to loose "3D" corners of the _GUICtrlIpAddress_Create()?

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <EditConstants.au3>
#include <GuiIPAddress.au3>

$Form2 = GUICreate("Form1", 160, 300, -1, -1, $WS_POPUP)
GUICtrlCreateGraphic(0, -1, 160, 301, $SS_BLACKFRAME)
$IP1 = _GUICtrlIpAddress_Create($Form2, 5, 90, 90, 20)
    GUICtrlCreateLabel(":", 96, 90, 3, 17)
$PORT1 = GUICtrlCreateInput("", 100, 90, 55, 20, $ES_CENTER+$ES_NUMBER)
    GUICtrlSetLimit(-1, 5)
$OK = GUICtrlCreateButton("OK", 2, 278, 78, 20)
    GUICtrlSetState(-1, $GUI_DISABLE)
$CANCEL = GUICtrlCreateButton("Cancel", 80, 278, 78, 20)
;~ DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form2, "int", 500, "long", 0x00040004) ;  <-- TURN THIS LINE ON/OFF TO NOTICE DIFERENCE
GUISetState(@SW_SHOW, $Form2)

While 1
    if GUIGetMsg() = $CANCEL then Exit
    Sleep(10)
WEnd
You can set style and ex-style.

_GUICtrlIpAddress_Create($hWnd, $iX, $iY, $iWidth = 125, $iHeigth = 25, $iStyles = 0x00000000, $iExstyles = 0x00000000)

When the words fail... music speaks.

Link to comment
Share on other sites

Just redraw the form after WinAnimate :) (somehow, it is not correctly drawn when using AnimateWindow)

_WinAPI_RedrawWindow($Form2)

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

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