|
You could try to write a custom control to do that. Good luck, it won't be trivial.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Vinay Srivastava wrote: Dim temp(10) As String
Doesn't this create an array with 10 strings ? what if there's more than 10 chars in the string ? why create an array of strings and not chars ? This is very bad code.
I also don't see how it helps, he didn't ask to flip the string, but for it to show backwards, in general use, I assumed.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Try this code
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
TextBox1.Text = e.KeyChar & sender.text
e.KeyChar = Nothing
End Sub
some more validations has to be add as per your requirement.
Thanks
Rajesh B
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
yeah, this is a start. The cases to watch are, where is the cursor ? What happens if the user uses the arrows ? What if they press delete ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
@ Christian Graus
If u observe my answer,
very first line i wrote
" Try this code" : that means am not giving conformation it will 100% works. and am not giving 100% Solution. am just giving a suggestion.
and last line i wrote,
" some more validations has to be added......"
that mean Programs has to add his default validations like u wrote
"The cases to watch are, where is the cursor ? What happens if the user uses the arrows ? What if they press delete ? "
====================================
here is the code
If Char.IsLetterOrDigit(e.KeyChar) Then
TextBox1.Text = e.KeyChar & sender.text
e.KeyChar = Nothing
End If
Thanks
Rajesh B
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Yes, I saw what you said, I was not contradicting you. I was more adding to it, if he wants to build on your code, I was being more specific. You said 'some more validations...' and you were right. I was suggesting what some of those may need to be.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello
How i can change the color of the selected item in a listbox ?
Thanks in advance
Assaf
modified on Sunday, June 22, 2008 6:53 PM
|
|
|
|
|
Hi,
you can draw the listbox items yourself when you modify DrawMode and provide
a DrawItem handler. That way you are fully in charge of position, size, color, whatever.
|
|
|
|
|
Hi!
I Need to check javascript in a richtextbox for errors at the click of a button,
I know that this is no small task, and every attempt I can think of or have tried
just loops through the textbox, highlighting and checking each and every word
and repeating this time and time again for every single function or method used.
It is Ridiculously Slow.
Is there an engine or perhaps some code out there that will allow me to do this reasonably
Quickly?
Thanks!
MrWolfy
|
|
|
|
|
Hi,
I would suggest you forget about the RTB and check the JavaScript in memory;
only touch the RTB (if you must) when there is something to report.
|
|
|
|
|
Thanks!
That helps a lot, but i still can't seem to figure out just how to check the javascript for
errors accurately, any advice?
Thanks Again!
MrWolfy
|
|
|
|
|
Hi,
MrWolfy wrote: i still can't seem to figure out just how to check the javascript for errors accurately, any advice?
it all depends on how far you want to take this. Maybe Google[^] will help you?
|
|
|
|
|
Hi Again!
Thanks for the link, problem solved!
Thanks Again
MrWolfy
|
|
|
|
|
Hello
How can i put the data of my dataset into my multiline textboxe
please help
Thanks in advance
Assaf
|
|
|
|
|
Loop through each row of the dataset, add it to a StringBuilder and then set the Text property on the textbox to the ToString() output of the StringBuilder.
Why wouldn't you just display the dataset in a datagrid?
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Hi there are Tow ways to do that but in both ways u should bind each TextBox alone
The First way
TextBox1.DataBindings.Add("Text", DataSetName, "TableName1.ColumnName1")
NumericUpDown1.DataBindings.Add("Value", DataSetName, "TableName1.ColumnName2")
And The 2nd way
Dim NewBind As New Binding("Text", DataSetName, "TableName1.ColumnName3")
TextBox1.DataBindings.Add(NewBind)
where:
"Text" and "Value" is the Property that u want to bind your data to as u see you should pass it as text
DataSetName is your DataSet
"TableName.ColumnName" is Your DataMember
Excuse my English
|
|
|
|
|
do anybody know where i can get advance and works on traning on mobile programming, buliding distributed application using .net 2008 and dba mssql 2008 in india
|
|
|
|
|
Ebube wrote: using .net 2008
You mean Visual Studio 2008, right? .net only goes up to version 3.5
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi All,
I have a big VRML model of a building which I divided into small vrml files such as: floor1.wrl, floor2.wrl, roof.wrl, and so on. Basically, I used 'Inline' node to import all of these small vrml files into my mother vrml file called 'building.wrl'.
I am using VB.NET form interface to allow the user to interact with the geometry. It works fine when I load any of the small vrml files (e.g. floor1.wrl) and then I can obtain the name of 3D elements in floor1 so that the user can change their texture. The problem is that when I load the main vrml file 'building.wrl' I am unable to interact with 3D elements inside the 'Inline' node.
So my question: how can I interact with the element/geometry inside an 'Inline' wrl file? Any feedabck or suggestion is very appreciated. I searched the internet for solution but could not find any.
Please please help
Thanks
|
|
|
|
|
I have searched everywhere for an answer and I
cannoit find one.
I have a LOT of forms with a standard list "List"
and I call a subroutine in VB6 that accepts the
form and fills the list. Example:
Sub ListFill(byVal aForm as Form)
' get RS from database'
'...
Do while Not Rs.EOF
aForm.List.AddItem Rs("Name")
Rs.MoveNext
Loop
End Sub
Can someone please help me figure out how to
translate this code into .NET?
Aloha and thanks in advance, Tony.
|
|
|
|
|
That code uses late binding to access the list in the form. You can only use late binding if you turn of strict checking, which you shouldn't.
There are basically two ways to do this:
1. Create an abstract base class that contains a property that returns a reference to the list. Make the forms inherit the base class, and implement the property.
2. Use the FindControl method to get a reference to the list.
Alternatively, make the method take a reference to the list instead of a reference to the form.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thank you for the reply.
I tried this code and it still doesn't work.
Public Sub ListBoxFill(ByRef aControl As System.Windows.Forms.Control)
Dim n As Integer
For n = 1 To 5
aControl.additem("Ciao")
Next
End sub
Am I doing something wrong with the reference to the list?
Aloha, Tony.
|
|
|
|
|
Sorry, let me clarify. It tells me that
AddItem is not a member of System.Windows.Forms.Control
|
|
|
|
|
Never mind, I am still thinking too much like VB6!
AddItem is a VB6 command, of course it didn't work.
Anyway, your suggestion to pass the control seems
to work. Thank you!
|
|
|
|