CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2001
    Location
    UK
    Posts
    14

    transparrency and special effect in textbox

    I would like to have both a transparrency and raised effect on a textbox as is the case with Access. I have an application that I am currently converting and I am having to use a frame and 4 lines to create the effect of a raised surface. I cannot however get transparrency. Is there a simple way to acieve both of these in VB?

    Help appreciated


  2. #2
    Join Date
    Apr 2001
    Location
    Salt Lake City, UT
    Posts
    135

    Re: transparrency and special effect in textbox

    As far as I know, there is not a way to make a text box transparent. You can with a label, but that doesn't help much. Sorry

    "There are no stupid questions, but there are a lot of inquisitive idiots."

  3. #3
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: transparrency and special effect in textbox

    The 'simple' way I know of is to use a picturebox. Blt the background onto it to give a transparent effect. This method to make it transparent is effective as long as your background doesn't change frequently.

    You can now draw the textbox frame as you like it - raised or sunken. You'll have to create the caret yourself using related API functions. Fill in the text in the KeyDown event. Better make it a user control.


  4. #4
    Join Date
    Apr 2001
    Location
    UK
    Posts
    14

    Re: transparrency and special effect in textbox

    The problem I have with this method it that my system is a learning system that users move controls with the mouse to build up words and the backgrounds vary.
    I have converted most of the system already and as it is, if the text box does not require focus then replaced it with a lablel. Of course I cannot have a raised effect but I can modify the question designer to stup users doing this for transparrency.

    Thanks for responding

    John Lamb

    P.S I also have limited experience in using Blt and API functions, I shall go an research this now




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

Featured