|
I have a vb2005 logon.aspx page and i have on that page i have the standered System.web.UI.WeControls.login. what im trying to find out is how to dynamicly poition the control in the centre of the page
I really do need help..... all this computer stuff is way over my head !!
|
|
|
|
|
Hi, using VB net(2003) I have 2 questions. First how to change dynamically the property of textAlign in a textBox, see my ex: property of textAlign in the textBox1 is already set to the right, what I would like to do is when I change the value in that txtBox would be that data move to left, and after I finish then hit tab button on keyboard data move back to the right. My second question is how to set a value like zero 0 as a default in that same textBox only when that textBox is empty. Thank you in advance for your help.
|
|
|
|
|
You just need to capture the events: Enter and Leave
This code might help you:
<br />
Private Sub TextBox1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Enter<br />
Me.TextBox1.TextAlign = HorizontalAlignment.Left<br />
End Sub<br />
<br />
Private Sub TextBox1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Leave<br />
Me.TextBox1.TextAlign = HorizontalAlignment.Right<br />
End Sub<br />
If you are using this code many times, you might wanna implement this code in your custom textbox, so you wont have to repeat this code for every textbox you have in your form.
-- modified at 16:54 Friday 27th October, 2006
Dave Kreskowiak (Below) is very right, For your second question, capturing the TextChanged Event would fire the same event again.
If you explain a little bit more about what you are trying to do, maybe someone could give you the best way of doing it.
Alexei Rodriguez
|
|
|
|
|
you can use this:
Private Sub Textbox1_TextChanged(byval .....)
if Textbox1.Text = "" then
Textbox1.Text = "1"
End if
Regard,
Adrian
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
That won't work because it will continuously fire the TextChanged event. If you change the Text property in the TextChanged event handler, you have to take precautions to tell that your in the handler a second time.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Is there a way to print a form to a printer at runtime?
|
|
|
|
|
A little search on MSDN for "printing a form" reveals this[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
I have access to a program, in which all of the text editing is done through table fields.
However the Delete key doesnt delete text. Only the backspace key will delete text.
Also, Ctrl-C/CtrlV is spotty at best.
Any ideas as to what might cause this?
|
|
|
|
|
Is this an app you wrote or you're using??
You question sounds like it's one you're using, in which case the answer would be because the developer didn't add support for the Delete key, or removed it, depending on the control he/she used.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
It's an application I'm using, but I have access to the source code, so I can change it if I need to.
From the looks of it, the controls used are PropertyGrids and DataGrids.
|
|
|
|
|
Hi,
I'm fairly new to vb.net and I'm trying to declare a class that is a collection of another class.
I believe this is possible in c# using syntax like the following
public class myList : List<myItems>
I'd be very grateful if any one can tell me the answer, even if it is that you can't do it in VB.
It makes the code a lot easier if you can refer to the list within the class as "me."
, also I'd like to be able to refer to some of the data types I've declared in myItems within myList
Thanks
Sean
|
|
|
|
|
Public Class myList : Inherits List(of myItems)
Keep in mind the only thing you can now add to the collection is objects that are of type myItems.
Mike Lasseter
|
|
|
|
|
Thanks Mike,
greatly appreciated.
I'd tried inherits and : but not both together !
Sean
Sean
|
|
|
|
|
A colon is just a statement seperator. It has nothing to do with declaring a class or inheritance. You can do the exact same thing like this:
Public Class myList
Inherits List(Of myItems)
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i'm a new member here and was wondering if y'all can help me with this project i'm about to start? i want to write a program that will track phone call durations on a landline using either visual basic.net or VB6. i want to ask if this is possible and how to go about things.
thanks everybody.
kofiwusu
|
|
|
|
|
On a land line? This isn't Voice over IP. VOIP is a phone call made over an IP network.
If you're talking about a land line, how is the machine going to know that the phone was even picked up? Or are you talking about some other hardware setup?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
thank you very much, i guess i didnt know the difference. i'm talking about the land line. i'm talking about how the machine is going to know about when the phone is up, duration and very thing. let me tell you what i really want to do:
I'm a student at the catholic university in Ghana, west africa, i want to use either visual basic 6 or .net to write a program for my project work. i want to write a program on monitoring phone calls (landline) using a pc. i'm thinking the program should be able to recognize the number been dailed, duration of the call so that i can use it to calculate the cost, also record incoming calls. i have done visual basic 6 and .net not into details but i hav no idea on how to start this project. anyway u can help me i'll be very grateful.
|
|
|
|
|
vb.net
how do i remove an event handler from a control, when i don't know, which one is currently connected to this control?
depending on the situation, i want to add different handlers to a button, and before adding a new one, i have to remove the old one.
|
|
|
|
|
The only way to do this is to take control of all event handlers yourself.
1. Remove all the Handles clauses that the designer puts in.
2. Explicitly define all your handlers using AddHandler.
3. Before adding new handlers always use RemoveHandler to remove all the handlers.
(It does not matter if the handlers are not added when you call remove)
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
|
I am writing a vb6.0 program that stores Pictures and Signatures in SQL Server 2000 database. I am also using the Crystal report viewer from cr8.5 for my reporting.
I want to display & print teh stored Pictures on my report
please any help to archieve this
t.aransiola
|
|
|
|
|
Hi guys
I am working in VB.net 2005 and using group feature too.
The problem is that it doesnt refresh the group headers when scrolling horizontally i.e. the group header is more wider then the data displayed on screen at the start of the application. So to see the remaining data if user scroll the listview horizontally n of course other than items group header is also at that offset screen area so items are ok with that scrolling but header doesn't display until the control is scrolled vertically.
Someone plz guide me for this asap.
thanks...
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|
|
How to get list of fonts used in a ms word file?
or
How to check if symbol font is used in a particular file?
Using VB.net/VBA
bkoti
|
|
|
|
|
create mecro for cheching of a font in all font list in VBA.
Pavan Pareta
|
|
|
|