Solved

Attn Mr or Mrs Smarty - Clear Textbox

Posted on 2000-05-02
23
342 Views
Last Modified: 2008-02-01
hi,
I have been looking and playing with  the properties of the textbox background colors and I am at a loose as to how to creat a clear background for a textbox or an invisible, but functional textbox. Thank you.

diek
0
Comment
Question by:diek_nf
23 Comments
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
use a label instead...or go to projects -> components and choose the microsoft forms 2.0 library and use the textbox that comes in there
0
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
or make it flat and set its back color to that of the color of its container (e.g. the form's backcolor)
0
 

Author Comment

by:diek_nf
Comment Utility
AzraSound,
I need to be clear so the user can see under it. I will try the things you mentioned. Thanks.
diek
0
 

Author Comment

by:diek_nf
Comment Utility
Adjusted points from 5 to 40
0
 

Expert Comment

by:jhw74
Comment Utility
Set the textbox's BackStyle property to
transparent

(fmBackStyleTransparent)

Then set its' border style to none (fmBorderStyleNone)
0
 

Author Comment

by:diek_nf
Comment Utility
AzraSound
I am going to try reposting this question. You are the only one who replied. I am increasing the points, I only had 5 at the the time. The bottom line is I need a clear textbox. It has to be a textbox because of the properties.

diek
0
 

Author Comment

by:diek_nf
Comment Utility
This question has a deletion request Pending
0
 
LVL 3

Expert Comment

by:darinw
Comment Utility
This question is no longer Delete Pending since an answer has been proposed.

darinw
Customer Service
0
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
jhw, the textbox doesnt even have a backstyle property

diek nf, did you try using the textbox that comes with the Forms 2.0 Library?  it has all the functionality of the regular textbox and then some, including transparency.
0
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
after adding the Forms 2.0 component, the textbox control in your toolbox looks like this "ab|"
its somewhat deceptive as it appears to look like a label control.
0
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
jhw, didnt realize you were referring to the Forms 2.0 textbox...I apologize...however, why propose an answer when I am the one who proposed the solution?  All you did was clarify that my answer was correct.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:diek_nf
Comment Utility
jhw,
I don't know what you are talking about, there is no such property,as BackStyle and even for background there is no Transparent. It must have a value but what is it?

diek
0
 

Author Comment

by:diek_nf
Comment Utility
AzraSound,
jhw only has one proposed answer and no comments, who are you writing to? I'll be back tomorrow, it is time to hit the hay.
Thank you for replying and trying to help me. My query comes from a previous ques, and a proposed answer by omaha,on when do you know if a user has entered a date with a date time picker:
'====================================================
' We got around this one by placing a clear text box
' over the dtpicker. In form load, we set the dtpicker
' value to dtpicker.mindate. When the text box gets
' focus we activate the dtpicker and the user can use
' it normally. In code, we check to see if the dtpicker
' value is equal to the dtpicker.mindate (not changed)
' if so, then we know that the date should be null.
' resetting the variables on exit
diek
0
 
LVL 28

Accepted Solution

by:
AzraSound earned 40 total points
Comment Utility
I am writing to you...next time you open your project, on the menu...

Click Properties -> Components
Scroll down until you see Microsoft Forms 2.0 Library
Check that box and press OK
Now in your toolbox where all your controls are, you will see one that looks like this:  "ab|"
This is the textbox that comes with the Microsoft Forms 2.0 Library.  It supports having a transparent background. Go to the properties window for this textbox you just added to your form.  In its properties, set its BackStyle to fmBackStyleTransparent and then set its Borderstyle to fmBorderStyleNone.  This will create a flat transparent textbox on your form
0
 
LVL 1

Expert Comment

by:RobMWilliams
Comment Utility
AzraSound,

Although you can use Microsoft Forms 2.0 objects, you won’t be able to distribute your app since Microsoft doesn’t allow you to distrubute those objects.  

Rob
0
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
I am aware of that.  I am under the impression this is a personal project...and I had suggested the label as an alternative but it appears it will not support all the properties he requires.  The only alternative to that would be to create his own activex control which I think may be a bit extreme for this situation.  
0
 

Author Comment

by:diek_nf
Comment Utility
rob or/and azrasound,
Where can I find the copyright/distribution stuff, ie what I can and cannot distribute, for  reference. It is not a personal project. Like I pointed out omaha had to perform this for his project.

diek
0
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
http://support.microsoft.com/support/kb/articles/Q224/3/05.ASP

that talks about the redistribution of fm20.dll
0
 

Author Comment

by:diek_nf
Comment Utility
AzraSound,
I am using forms 2.0, all I have to do according to MS is install the free activex control panel, on the client, to use forms 2.0 with my program. Anyways I still need to create a clear textbox.
0
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
then use the forms 2.0 if its not going to be a problem...i pointed out how to do it above
0
 

Author Comment

by:diek_nf
Comment Utility
AzraSound,
I had ms forms , under designer, as opposed to components picked. I guess I should smarten up and read what people send me.

If it no too long and if have the time what is the purpose/difference/relationship of designers and components.

Thank you very much for all of your help.

diek
0
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
to be honest with you i'm not sure i even know what you are referring to when you say designers...so i guess i cant explain this for you...sorry
0
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
oh the designers tab...cant say i've ever used it...heres some info from msdn:


A designer provides a visual design window in the Visual Basic development environment. You can use this window to design new classes visually. Visual Basic has built-in designers for forms and — in the Professional and Enterprise editions — ActiveX controls and documents.

Objects created from the classes you design in this fashion have separate design-time and run-time behavior and appearance, although many objects — such as forms and controls — look very similar in the two modes.

In addition to its built-in designers, Visual Basic allows third parties to develop designers for use in the Visual Basic development environment. These ActiveX designers work just like the built-in designers in Visual Basic, making them easy to learn and use.

ActiveX designers can provide visual interfaces for tasks that otherwise might require a great deal of code. For example, the UserConnection designer included in the Enterprise Edition of Visual Basic provides visual tools for defining complex database queries. At run time, these queries can be invoked with very little code.

Similarities between ActiveX Designers and Built-in Designers
ActiveX designers are like form designers in the following ways:

ActiveX designers produce classes from which you can create objects. These classes appear in the Project window, just like form classes.


Each class you create with an ActiveX designer has its own code module, in which you can write code for the event procedures provided by the designer.


You can customize a class, by adding your own properties, methods, and events to the ones provided by the ActiveX designer.


The objects created from classes you design can have different characteristics at design time and run time.


An ActiveX designer's design window is fully integrated into the development environment. It can be sized and arranged just like built-in design windows.


You can add as many instances of an ActiveX designer to your project as you need, just as you can add as many form designers as you need.


ActiveX designers are extremely flexible. Some, like the UserConnection designer, create classes whose run-time instances are programmable, but not visible. Others, like the Microsoft Forms designer used by Microsoft Office, produce visible objects similar to Visual Basic forms.

ActiveX designers that have visible run-time components may be able to host ActiveX controls. In effect, they become alternate forms packages, which can be used in addition to Visual Basic's native forms.

The following list compares classes produced with ActiveX designers to those produced with built-in Visual Basic designers.

If an object created from an ActiveX designer class is visible at run time, it has its own window. It is not contained within another form, as ActiveX controls are.


Like form classes, but unlike ActiveX controls, the classes produced by ActiveX designers are private classes. If you're using the Professional or Enterprise Edition of Visual Basic to create ActiveX components, you cannot declare public methods that use these classes as argument types or return types.
For example, the following method declarations produce compile-time errors if they appear in a public class:

Public Function A() As UseConnection1       'Error
Public Sub B(CallBack As UseConnection1)    'Error

Caution   Although it is possible to pass references to private objects outside your project, by declaring return values As Object, this is very bad practice, and may destabilize your program. For more information, see Creating ActiveX Components in the Component Tools Guide.

Using ActiveX Designer Objects at Run Time
Like the built-in form designer, ActiveX designers are available only in the development environment. Once you make your project into an executable, it only uses the ActiveX designer's run-time .dll. This may be much smaller than the design-time .dll, because it doesn't include the visual design tool. Figure 9.15 illustrates this concept.






0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now