Results 1 to 4 of 4

Thread: How do you make Msgboxw text selectable ?

  1. #1

    Question How do you make Msgboxw text selectable ?


    all in the title :

    How do you make Msgboxw text selectable -> Ctrl+C copy ?
    ThinBasic ALPHA - Windows 8.1 x64

  2. #2
    for the first time i know that while the msgBox is on if we press ctrl-C the msgbox text is copied to the clipboard. but selectable text seems not possible, look different approaches here:
    someone have an approach of using a TextBox

  3. #3
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Milan - Italy
    Blog Entries
    Rep Power
    You can create your own message box.

    Something like the following:

    USES "UI"
    begin ControlID
    end ControlID
    function MyMsgBox(byval hParent as long, byval sText as string, byval sCaption as string) as long
      DIALOG New Pixels   , Name frmMsgBox, 
                            -1, -1, 320, 240,
      CONTROL ADD Textbox , Name txtMessage  , frmMsgBox.Handle, %txt_Message   , "",  
                            5,  5, frmMsgBox.CW - 10,  frmMsgBox.CH - 100, 
      CONTROL ADD BUTTON  , Name btnOK , frmMsgBox.Handle, %btn_OK  , "OK",
                            frmMsgBox.CW/2-50, frmMsgBox.CH - 50, 100,  25, %BS_DEFAULT | %WS_TABSTOP
      txtMessage.Text = sText
      DIALOG SHOW MODAL frmMsgBox.Handle
    end Function
    CallBack Function frmMsgBox.OnLoad() As Long
      txtMessage.BackColor = Win_GetSysColor(%COLOR_BTNFACE)
    End Function
    ' Function fired when button Run me is clicked
    CallBack Function btnOK.OnClick() As Long
    End Function
    MyMsgBox(0, "Hi there" + $crlf + "from thinBAsic", "My Message Box") | |
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  4. #4

    Thumbs up

    Thanks both!

    @Primo, as stated in the link you provide Ctrl+C on the Msgbox is not user friendly as it catches the title and the 'OK' button texts.
    @Eros, I understand the 'own' message box.

    First, I thought that the stackO link gave me a third approach, quick & clean: the inputbox (InputBox$ in TB) but unfortunately it's not InputBoxW$. Thus, Eros, you did provide the answer I needed.

    Thanks both!
    ThinBasic ALPHA - Windows 8.1 x64

Similar Threads

  1. ListBox NonSelectable & Selectable
    By marcuslee in forum UI (User Interface)
    Replies: 3
    Last Post: 11-12-2009, 02:39
  2. Make video games
    By catventure in forum Gaming
    Replies: 1
    Last Post: 04-03-2009, 21:26
  3. Error for Make Directory
    By nrodes in forum File
    Replies: 3
    Last Post: 09-02-2009, 00:23
  4. How to Make a Cheap Multitouch Pad
    By ErosOlmi in forum Technology
    Replies: 6
    Last Post: 05-05-2008, 07:32
  5. Is there a way to make the DLL smaller?
    By Michael Hartlef in forum Module SDK (Power Basic version)
    Replies: 6
    Last Post: 28-02-2007, 00:12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts