I have a program written in vb.net 2003 which has text boxes for integer input. When the boxes appear, they are filled with the default value of zero. When the program is run on a computer running Windows XP the cursor appears in front (to the left) of the zero, but when run on Windows 7, the cursor appears behind (to the right) the zero.
In xp, if the user enters 1 (one) a 10 is diplayed and the user must delete the zero. In Windows 7, if the user enters 1, there is a leading zero which disappears once they have exited the text box. Is there a way to force one presentation or the other?
I'm trying to do two things. I have a Richtextbox which i'm continously adding text to from a standard text box. I want that new text to appear at the beginning of the existing text, not at the end of the existing text.I've got the following code but it's not working. The new text keeps going to the end of the existing text.
Dim newtext As String newtext = TextBox1.Text RichTextBox1.AppendText(newtext)
Suddenly whenever I build my applications, although I get a "build succeeded" result - the executables are either not updated or updated in the "wrong" place.So for example if after succesfully building I press <F8> to step through the code I get a message saying the "source is different from when the module was built"I have no idea how to begin tracking this down - how .net determines the placement of files and so forth.
I'm new with VB and a time program I'm trying to complete is incorporating a tick event. I have the code I need to use, and have the timer placed within the VB Designer but when I start the debugging process, 12:00:00 pops up in the text box. I would like to have it start incrementing after I set the hour, minute and second and initiate the Set Time click event. The code I have for the timer is
Im working on a program that is about to drive me nuts figuring out how to round and show only 3 or 4 numbers past the decimal placement and also show the scientific notation. Here is an example of the code.[code...]
The problem here is that most of these calulations turn up so long that my text boxes just show a small portion of the answer. I have really investigated rounding and decimal placement but nothing seems to work...does anyone have a solution?
I'm working on my final assignment for my Visual Basic class, and the last assignment is to create a program which stores CD collection information. It works fine, but the task is to create a structure for the input information and use it in the Add buttons click event code.I'm not asking to have my homework done for me, but i'd like some advice on where I should declare the structure and how. Everywhere I try and declare it, it ends up closing that particular sub procedure or section. I've tried looking up plenty of help sites to learn about structures, but sadly they and the book are both very vague. The instructor also mentioned padding each entry, but that I'm pretty sure I know how to do
I am trying to put an unbound button in the last column in a DataGridView control and it appears way, way off to the right when I run the app. I have to scroll all the way to the right to get to the buttons and then manually resize them to show up the way I want them to. I am using the Edit Columns feature found in the Smart Tag of the control. It works ok when I place them anywhere else in the columns! It only messes up when I try to place them at the end of the columns.
Basically, there's a Rich Text Box here, and it's read-only. The user can tab inside it, and move the arrow keys up and down it. If I can get my code to work (read the line where the cursor is). I am using the following code:
Code: Dim RTBLine As Integer = Me.RichTextBox1.GetLineFromCharIndex(Me.RichTextBox1.SelectionStart) If RTBLine < 2 Then RTBLine = 1 'used to prevent errors
I have a small chat app. Type a message, press enter and the message is sent. Works fine...except the cursor is moved the the second line of the text box and i can't seem to get it back to the beginning
Private Sub txtMessage_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtMessage.KeyDown Dim shiftPressed As Boolean = False
i am trying to bring up a text message when the cursor moves over a certain label . No problems using the cursor enter . But i can not figure out how to display a text message in a balloon without a background (transparent) . Tried using a form but get the following message when trying to set background as transparent "Control does not support transparent background colors." Also i have tried using a user control but again no success .
I'm going to write a program that can get text from anywhere in windows xp by using mouse pointer. in other words, when you point your mouse pointer to a text (eg. text on win xp icon) and my program can get the text of it.
2nd problem: how to display a tooltip baloon on my mouse pointer?
I have a very wired problem. I have a txtbox which i attempt to act like a password box (ie. everything you type becomes ****)
I use a simple counter that just shows a * for each time the text is changed.However the "typer" wount follow, it just stays in the beginning. so the result is that the code is spelled backwards.
I use the following code. try it for yourself if you dont understand
the program is that user add numbers in textbox through number buttons (its a calculatornow i have to add 2 more buttons. one <- and other -> and when press one of them the cursor moves in the text box left and right.i tried few things but none works. i have tired to insert "|" first and then try to move it but it either keep on adding or deleting the text.here is what i have tried so far . its not the whole code as i keep on adding and removing.
Dim str As String Dim loc As Integer If txtInput.Text.Length > 0 Then
I have 9 Text boxex and one command button and I'm looking for a code such that IF i set my cursor on a specific textbox using the mouse then I can be able to Input text in the textbox using the command button.
This VS010 solution is not providing my intended outcome as a custom override of a 'crosshair' or 'reticle' cursor e.Graphics.DrawPath() is the function that isn't working. This
WORKING solution demonstrates how it's supposed to work. The additonal PictureBox added to a Panel is, for reasons I don't understand, not allowing the 'new' cursor to appear.
Option Explicit On Option Strict On Imports System.Drawing
I'm trying to make it so that that user can enter predefined text by a button event (which will save them time typing). For example, they're writing a note in a textbox and then they click a 'Name" button which enters the name of the person into the text box at the place of the cursor, which will cut down on errors caused by typos.
So I need something like:
Button_click event() textbox.AddAtCursor(person.name) end sub
Is it possible to append text into a RichTextBox1 where the cursor is? (Ex: In-putting a string from TextBox1 to RTB1 where the user has the typing cursor at.)
I have a small application that displays a listbox under the cursor position when the user uses a shortcut key.
When the user double clicks a selection from the listbox I want to insert that selected text at the curser position of that opened window.
Example: user has microsoft word open. He/she uses a shortcut key that displays a listbox just under the cursor position. The listbox has a collection of text. When the user double clicks a selection that selected text is inserted at the cursor position.
I tried the following:
Private Sub ListBox1_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick Text.Insert(Cursor.Position, ListBox1.SelectedItem) End Sub
I am trying to work out how I can insert the string "End" into my textbox at a specific cursor point? (where the '???' is in the code below)As you can see by the code below this will happen when the user clicks return on the keyboard within the textbox.
I have the code to get the cursor index which is being stored as integer 'intcurrentcolumn'. Private Sub Enter_Click(ByVal Sender As System.Object, ByVal k As System.Windows.Forms.KeyEventArgs)
I have a routine that iterates thru a collection and I want to print each iteration into a TextBox without having the second iteration overprint the first and so on. How do I position the text cursor between each iteration thru the 'For Each' that I am using?
My program writes text to a multiline textbox. After the input is finished, the cursor is at the end of the text. I want the program to position the cursor at the start of the text so that I can see it.
MSDN suggests:- tbPositionCursor.Select(0, 0)
I believe the cursor is now repositioned, but I cannot see the start of the text. How do I scroll back automatically, refresh or whatever so that I can see the start of the text?
I am building a GUI for a touchscreen panel using VB2008 and am trying to set up a password change screen. I have an on-screen keypad set up so the operator can use it to enter the new/old password. How do I return the value from the key pressed to where the cursor is located?
Once I get to the bottom right corner of the cursor box, it scrolls to another line; I would like to know if there is a way to stop this happening ie once cursor reaches bottom right hand corner of text box, no further data entry is allowed.
I have a Rich text box in my program that works well for displaying a small screen and it never has had a cursor in it.I just added a couple of rich text boxes for some other parts of the same program, they are set up in properties EXACTLY like my original but there'sa cursor that's appearing on the 2 new boxes and I can't get rid of it.