[Tut] Create A Transparent RichTextBox In Visual Basic
2013-12-03, 04:37 PM, (This post was last modified: 2013-12-11, 12:12 AM by Superhero99.)
#1
[Image: vMoZNYO.gif]
Hello. I made this tutorial as per a help request from andrewg03. First I thought Of PM'ing him this method, but then i decided to share this method with all of you!

[hide]
How To Make A RichTextBox Transparent?

Step 1: Insert A Rich Text Box Into Your Form

Step 2: Resize Your RichTextBox To Your Needs

Step 3: Go To Form Code And Add This Code

Code:
Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_TRANSPARENT = &H20&
Private Declare Auto Function SetWindowLong Lib "User32.Dll" (ByVal hWnd As IntPtr, ByVal nIndex As Integer, ByVal dwNewLong As Integer) As Integer

Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

    RichTextBox1.Text = ""
    SetWindowLong(RichTextBox1.Handle, GWL_EXSTYLE, WS_EX_TRANSPARENT)

End Sub

Private Sub RichTextBox1_TextChanged(sender As System.Object, e As System.EventArgs) Handles RichTextBox1.TextChanged
     Dim curPos As Integer = RichTextBox1.SelectionStart
     RichTextBox1.Select(0, RichTextBox1.TextLength)
     RichTextBox1.Select(curPos, 0)
     RichTextBox1.ScrollToCaret()
End Sub

On The Form It Will Be White In BackGround, But When You Debug, The Background Will Be Transparent!

This is very useful in making custom textboxes with various designs! Do not forget to leave a reply here if you face any debug errors! :)

[/hide]

Thankyou
-Superhero99

Join The Best Network Today And Earn REAL Money! The secret to success lies here.

[Image: jqE21u3.gif]
Reply
Share This Thread :

2013-12-03, 11:34 PM,
#2
thanks !
usefull tut
Reply
2013-12-04, 12:02 AM,
#3
Haha great for noobies, honestly I dislike when people use VB.net and don't take the time to learn how to use it. :/ its an easy language to learn.

repetition
Reply
2013-12-04, 02:10 PM,
#4
(2013-12-04, 12:02 AM)Required Wrote: Haha great for noobies, honestly I dislike when people use VB.net and don't take the time to learn how to use it. :/ its an easy language to learn.

Yes its easy and fun to learn! I like VB very much!

Join The Best Network Today And Earn REAL Money! The secret to success lies here.

[Image: jqE21u3.gif]
Reply
2013-12-04, 02:16 PM, (This post was last modified: 2013-12-04, 02:18 PM by sureshraina2001.)
#5
Awesome share :) I will try this soon .Bookmarked

By the way thank you for your signature service I really liked it :) And it was very much quick as well . LOL . I send message to (Banned for promoting another CPA Forum -=> As predicted: https://i.imgur.com/EBHx1Mo.png ) and within his response I saw your response with an image ;)
Reply
2013-12-04, 02:19 PM, (This post was last modified: 2013-12-04, 02:20 PM by Superhero99.)
#6
(2013-12-04, 02:16 PM)sureshraina2001 Wrote: Awesome share :) I will try this soon .Bookmarked

By the way thank you for your signature service I really liked it :) And it was very much quick as well . LOL . I send message to (Banned for promoting another CPA Forum -=> As predicted: https://i.imgur.com/EBHx1Mo.png ) and within his response I saw your response with an image ;)
Its ok, i was free and just did it. I was having a chat with (Banned for promoting another CPA Forum -=> As predicted: https://i.imgur.com/EBHx1Mo.png ), when he told about you. Enjoy!

Btw, i am waiting to see your journey updated!

Join The Best Network Today And Earn REAL Money! The secret to success lies here.

[Image: jqE21u3.gif]
Reply
2013-12-05, 12:04 PM,
#7
thank you for your time!
Reply
2013-12-05, 12:16 PM,
#8
thanks man but you should know guys, the code has some bugs
Reply
2013-12-05, 12:42 PM,
#9
what is the use of rich textbox anyways?
I dont usually use that on my projects

[Image: 4f3uTb7.gif]
Don't stare too much.
Reply
2013-12-05, 01:07 PM,
#10
(2013-12-05, 12:42 PM)Gumball Wrote: what is the use of rich textbox anyways?
I dont usually use that on my projects

It is very much similar to a textbox! you can use it instead of a textbox! Even i dont use it that much, only when i use live consoles in my project that Richtextbox comes handy!

Join The Best Network Today And Earn REAL Money! The secret to success lies here.

[Image: jqE21u3.gif]
Reply


Related Threads
Thread Author Replies Views Last Post
  [GET][HQ][TUT] Movie Locker Template ( Java, Search, Multiple-niche ) + Setup TuT ⭐️ Borislav ⭐️ 56 22,658 2018-07-18, 02:12 PM
Last Post: faithalo
  Create Your Own Landing Page Without Coding Knowledge! WealthyHustler 7 260 2018-07-17, 10:05 PM
Last Post: xTKSD
  [TUT] ● How To Make A Blogger Landing Page ● EnChanter 75 14,266 2018-07-13, 02:43 PM
Last Post: siddakrish
  [Tut] How to make a fake proof for your niche ( With picture) Gidash 70 17,307 2018-07-05, 08:28 AM
Last Post: affmarketer101
  How To Create & Implement Your A CPA Content Locker Into Your Landing Page WealthyHustler 11 737 2018-07-01, 04:33 PM
Last Post: rinkidi





About Us | Contact Us | CPA Elites | Advertise | Stats

© 2013-2018 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top