Results 1 to 5 of 5

Thread: redacted

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2011
    Posts
    28

    Question redacted

    redacted
    Last edited by Reboh79; Jun 13th, 2015 at 06:08 AM. Reason: Redacting content

  2. #2
    Addicted Member
    Join Date
    Oct 2004
    Location
    Philippines
    Posts
    149

    Re: Show image inside of textbox

    Just make a borderless textbox with a picture box beside it. If you highlight https:// you'll notice that your cursor stops just after the image and I assume that the image is not inside the textbox
    Last edited by Zelot; Jan 8th, 2014 at 03:32 AM.

  3. #3

  4. #4
    Fanatic Member
    Join Date
    Oct 2011
    Location
    Sydney, Australia
    Posts
    756

    Re: Show image inside of textbox

    just place a picturebox "inside" the textbox with transparent background and borders
    My CodeBank Submissions
    • Listbox with transparency and picture support - Click Here
    • Check for a true internet connection - Click Here
    • Open Cash drawer connected to receipt printer - Click Here
    • Custom color and size border around form - Click Here
    • Upload file to website without user logins, includes PHP - Click Here
    • List All Removable USB Storage Devices - Click Here
    • Custom On/Off Slide Control - Click Here
    • Insert multiple rows of data into one database table using parameters - Click Here
    • Trigger USB/Serial Cash Drawer - Click Here

  5. #5
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Show image inside of textbox

    You can change the left margin of the text box with this code:
    Code:
      Private Declare Function SendMessage Lib "User32.dll" Alias "SendMessageW" ( _
       hwnd As IntPtr, _
       wMsg As Integer, _
       wParam As Integer, _
       lParam As Integer) As Integer
    
      Private Sub SetTextBoxLeftMargin(textBox As TextBox, margin As Integer)
        Const EM_SETMARGINS As Integer = &HD3
        Const EC_LEFTMARGIN As Integer = &H1
        SendMessage(textBox.Handle, EM_SETMARGINS, EC_LEFTMARGIN, margin)
      End Sub
    
      Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        SetTextBoxLeftMargin(TextBox1, 18)
      End Sub
    Above I changed the left margin to be 18 pixels which gives me enough room to place a small picturebox inside the textbox.

    Name:  TextBoxImage.png
Views: 666
Size:  1.6 KB
    Last edited by Joacim Andersson; Jan 13th, 2014 at 12:08 PM. Reason: Added line continuation characters just in case the OP uses an earlier version of VS

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
  •  



Click Here to Expand Forum to Full Width