Tab Positions In A TextBox?

Feb 18, 2011

Is it possible to add text to a multiline textbox in a particular column? Like so:

Sugar 10 Ohio
Coffee 50 Texas

Or should I be using a different contro

View 5 Replies


ADVERTISEMENT

Find Current Positions Of Cursors In A Textbox Or Listbox?

Jun 18, 2010

How to find current positions of cursors in any textbox or listbox?

View 1 Replies

Manipulating Pictureboxes Positions?

Dec 18, 2011

i'm creating a game like text twist. that when i press letter a, i need to determine which picturebox contains letter a and display it to different location. that also goes to the proceeding letter a's. for example, i have a jumbled letters "aamba". in my code, it only gets the first letter a and removes it form the screen, it's nowhere to be found. and it won't recognize that i still have other letter a's i'm pretty sure about the location that i set it to be placed.here is my

(it's kind of brute force i think)
ElseIf e.KeyChar = Chr(97) Then
counter1 = 0[code].....

View 7 Replies

Allow Certain Characters In Certain Positions In Text Box?

Feb 10, 2010

For example I only the second character in each line to be an x, while the 3nd to 10th character must be a hex digit.At the moment I use a Select Case, then check the position of the caret (using textbox.selectionstart) and see if the key being pressed is a "legal" character.Is there a better way of doing this as it slows down on large amounts of text.

This is the code I have at the moment:
Select Case TextBox1.SelectionStart
Case TextBox1.GetFirstCharIndexOfCurrentLine + 1

[code]......

View 4 Replies

Changing Picturebox X / Y Positions

Mar 5, 2011

I'm trying to make my own clone of space invaders as it's been about a year since I've done any programming, and I imagine this will be a good way to get back into it. The main issue that I am having right now, is that I am basically clueless as to how I go about moving the player on a keypress. I have the code for the keyboard input correct, how to move my picturebox.

Here's my code so far (in a nutshell):
Dim PlayerPositionX as integer
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Select Case e.KeyCode
Case Keys.Left
[Code] .....
I imagine I probably messed up very badly on this, but I'm completely lost!

View 4 Replies

Set Positions Of Many Pictureboxes Efficiently?

May 23, 2011

I have 20 PictureBoxes named PictureBox2 through to PictureBox 21, where I need to conditionally set the positon of them. I was wondering if there is a more efficient way to set their positions than to copy the code out 20 times. This is what I have so far:

For NextPos As Integer = 2 To 21
Select Case Direction
Case 1

[code]....

View 4 Replies

VS 2008 Get The Icons Positions?

Aug 5, 2010

how i could get the icons positions i made some code to get the file names and everything but wanted to know how i could get there positions! also i found some codes with google but most of them where in vb6?

View 10 Replies

IDE :: Remember Tear-off Window Positions?

Jan 12, 2010

I like to put my Code windows on my 2nd monitor. But after I close them they always reappear as tabs on my primary monitor. How can I get VB2010 to remember to put them on the secondary monitor instead?

View 1 Replies

Make Student Positions In Class?

May 19, 2012

i am working on an examination system. the system has to compute the grades and position of each student per stream and per class.each class has got 4 streams. I save the studentsmarks in the database. i want the system to determine the positions of students and the position of each student to appear on the rtf.. report, for example:

Position in stream:4
Position in Class: 21

[code].....

View 3 Replies

Change The Positions This Small Circle In The Graphics?

Sep 28, 2010

I am attaching a sample working program. But in this program i need to do some changes,those changes i have explained in the .docx file.

View 5 Replies

Nested Splitcontainers: Remember Splitter Positions?

Jul 2, 2008

I have 3 splitcontainers on my form. Each splitcontainer has vertical splitter orientation

This forms 3 'panels' which are resizable by dragging their respective splitters.

Each vertical 'panel' is then split horizontally by adding another splitcontainer with horizontal splitter orientation. I now have 3 column 'panels' each of which is split into 2 'rows'

My question is :
In a nested splitcontainer scenario
When a user drags splitters and resizes panels,
how can I remember the last splitter location
so that when the form is closed and reopened,
it remembers the last used positions ?

View 13 Replies

Possible To Rotate Characters In String By Some Number Of Positions

Apr 12, 2010

For a project I need to do a String strX is said to be a cyclic rotation of a String strY if it's possible to rotate the characters in strY by some number of positions, n, such that strY becomes strX. I don't mean rotate in a Caesar sense here but in a left-right (or right-left) sense. For instance, strX = abanan is a cyclic rotation of strY = banana because rotating the characters in banana to the right by n=1 (i.e., by one position), wrapping accordingly, yields abanan. Similarly is strX = anabana cyclic rotation of strY = banana because rotating the characters in banana by n=3.I need to write an application that returns True if strX is a cyclic rotation of strY otherwise the result is False. I'm looking into how to do this, I know it will involve and if then statement and possibly some loops. Is there anyone who can help me better understand what I should do?

View 4 Replies

Randomize Positions Of Arrow And Add Points To Score?

Jan 13, 2010

I am making a game that is similar to Dance Dance Revolution. As you know, there are moving arrow keys, but when i run the program, only one arrow moves up in a loop. I don't understand what is wrong with the code. Also, the score is messed up. It doesn't add or minus points.
Code:
<!--c1-->
CODE

View 3 Replies

Switch Positions Of StateImage And IndexImage For TreeNode

Jan 17, 2012

I would like to know if it is possible to switch the position of a StateImage with that of an IndexImage for a TreeNode in a Winforms TreeView? Please refer to the image below for an illustration. The first TreeNode has a stateImage and the second one doesn't. My aim is for all IndexImages to align to the left and the StateImage (if any) to be to the right of the IndexImage. The resulting tree would look something like: I think I have to set the tree DrawMode to OwnerDraw and override OnPaint. I read this msdn link but nothing there was said about drawing images.

View 1 Replies

VS 2005 Swapping Collection Members' Positions?

Jul 22, 2009

This I'm almost certain is an easy problem for those with more experience than me. I just need a routine that trades the places of 2 members of a collection class.

For example: If there are 5 objects stored in a CList of() collection class, I want to swap item # 3 and #5 (or any pair of indexes), what would be the code?

This simple problem has my head spinning because once you remove a member all the indexes change.

View 8 Replies

Working Out The Point Positions Along A Straight Line?

Jul 22, 2010

I have two points (x1, y1) and (x2,y2) and have a straight line between the 2 points, from this I can work out the distance between the 2 points lets say it is 50.What I want to do is increase or decrease the length of the line by a predefined amount lets say 10.So If I increase the line length by 10 (from 50 to 60), What I want to work out is what point(x3,y3) would be at the end of the increased line.Hope this makes sense.I have tried to work out the new point using the angle but it does not work correctly, it does not seems to produce a perfectly straight line and the angle from point (x1,y1) to the new (x3,y3) is not the same as the angle from point (x1,y1 to x2,y2).

This is what I have tried:
:I work out the angle
aAngle =Math.Atan((Y2 Y1) / (X2 X2))

[code].....

View 1 Replies

VS 2008 Setting The Index Positions And Lenghth To A Specific Number?

Mar 23, 2010

I dont want to be setting the index positions and lenghth to a specific number becuase when i choose a different name from the listbox that is at a different position or longer it wont display it properly. explain to me another way around this so as it will allow any details to be selected and read???

[Code]...

View 16 Replies

Why Doesn't Picture Box Clear And Get Duplicate Displays At Different Positions On 2nd Click

Jun 13, 2011

When btnSetup is clicked, 7 rows with 24 colored predefined rectangles are displayed in the pbColors picture box as as intended. The controls on the first page of a tab control. I would like this display to remain intact when I change tab pages but when I return to this tab page the picture box is cleared. If I click the button, for some reason the group of colors is displayed twice, one after the other, instead of once as intended.

[Code]....

View 3 Replies

Interface And Graphics :: GetDIBits : Return The Pixel Positions In The Image At Which They Are First Located Adjacent To One Another?

Sep 24, 2008

how I could search a given bitmap, say "test.bmp" or a printscreen, for two pixels that are next to each other and that have specified color values? The colors are: &H486596 and &H213D66. I then want to return the pixel positions in the image at which they are first located adjacent to one another. I'm only after the first instance of the occurrence. I wish to use GetDIBits as I hear that it's quicker. So I want to find the first instance where the color value for pixel (x,y) = &H486596 and (x+1, y) = &H213D66.

View 11 Replies

Security - Textbox On Form - User Inputs Data ( During Runtime ) Data Remains In Textbox For Good And Textbox Becomes Read Only ?

Jan 8, 2010

Is it possible to have a Textbox on a form that when the user inputs data, ( during Runtime )that data remains in the Textbox for good and the Textbox then becomes read only ? Is it also possible to make it so that the CD with the programme on, is in the PC when the programme is being used. Perhaps writing the Textbox data back onto the CD ?

View 1 Replies

Detect If Press Enter In The Textbox Change Event And Not In Textbox Keypress?

Dec 13, 2011

how can I detect if press Enter in the Textbox Change event and not in Textbox Keypress?

View 3 Replies

Drag And Drop Em Um Textbox Para O Mesmo Textbox Com Scroll Automatic

Aug 24, 2009

Tenho um Listbox com 70 linhas. Fa no Listbox um Drag do ltimo item para mov-lo para o primeiro item, entretanto quando o mouse atinge o alto do Listbox a lista n vai para cima automaticamente. Algu sabe como fazer isto? Obrigado!Lindolfo

View 1 Replies

Moving A TextBox - User Will Have To Move A (selected Textbox) By Clicking A Button

Feb 11, 2010

I am building an app. that needs some input from the user, the user will have to move a (selected textbox) by clicking a button. The TextBox will have to move 20 points down or up from corent location by clicking a button.

View 10 Replies

VS 2008 Make A Textbox Change Some Letters Within Textbox When Click A Button

Jun 29, 2009

I want to make a function in VB 2008 with which u can make a textbox change some letters within the textbox when u click a button. So example: Textbox1 has got in it: url...Then when I click button 1, it has to change ....

View 8 Replies

VS 2010 Take Multiple Lines Of Data From Textbox Split And Organize Them To New Textbox

Feb 18, 2012

i need to take data input from a textbox such as this

[Code]...

and get it so i push a button and it seperates it out so it adds and looks like this inside a display field

[Code]...

View 6 Replies

.net - Decimal.TryParse Is Failing On TextBox.Leave And TextBox.LostFocus?

Dec 22, 2010

I have a TextBox in a Windows Forms application in VB 2008 (.NET 3.5) where a user can key an estimate amount. I am allowing them to key dollars and cents, and I want to round to the nearest dollar. The original code had the rounding down when the data was written back to a table, and that worked fine - I have this code in a "Save" routine that fires when the user moves to a different screen or record:

Dim est As Decimal : Decimal.TryParse(txtEstimateAmount.Text.Trim, est)
Dim estimatedAmount As Integer = Math.Round(est)

I decided that it might be nice to actually do the rounding as soon as they leave the field instead, so they're not surprised when they reload the screen and find that 1822.60 is now 1823. So I took the exact same code and added it to the TextBox.Leave event handler. And the weirdest thing happened: instead of the variable est being populated with 1822.60 after the parse, it gets set to -1! What the...?

Debugging the handler shows that the value goes into the parser correctly, and if I do the parsing manually via the Immediate window, it parses correctly, but when I let the code do it, it invariably gets set to -1. What's even weirder is that any number gets parsed as -1, not just decimals, and any non-number gets parsed as 0 (which is correct).

Has anybody else ever run into this before? I tried moving the code to the TextBox.LostFocus event instead, but with the same results. I have no idea what in the heck is going on, and obviously there are workarounds galore for this, but it just makes no sense whatsoever.

EDIT: Here's the full event handler (current behavior for which is to put -1 in the TextBox):

Private Sub txtEstimateAmount_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtEstimateAmount.Leave
' Take any dollars-and-cents amount and round to the nearest dollar
Dim est As Decimal

[code]....

View 2 Replies

Checkboxes And 1 Textbox In Webform If I Type In Textbox 1,2 Then Checkbox1 & 2 Will Be Checked?

Nov 13, 2010

I have 4 checkboxes and 1 textbox in webform if i type in textbox 1,2 then checkbox1 & 2 will be checked !

directly after if i type 3,4 in textbox then the all 4 checkboxes will be checked But i want the checkbox will be checked accorcding to the data displayed in text box ..if textbox1.text =1,2 then only checkbox1 and checkbox2 will be checked and others are remain unchecked ...

and if i checked checkbox3 and checkbox4 then only 3 and 4 will be checked and others are unchecked...

how to do that in page load event I want to do this with 50000 checkboxes ..and more.... which displayed in my webform

[Code]...

But if i type 1,2 in textbox then checkbox 1 and 2 would be checked and agin i type 3,4 then checkbox1,2,3 and 4 all the checkbox will be checked ...but i want ...what everi type in text box only that checkboxes will be checked and others will remain unchecked.....

View 3 Replies

Create A New Textbox Every Time Previous Textbox.text Is Entered?

Jan 16, 2010

How to create a new textbox every time previous textbox.text is entered?

View 7 Replies

Current Date Is Inserted Into A Textbox And The Focus Is Transfered To The Textbox?

Jul 1, 2009

when clicking a button, the current date is inserted into a textbox and the focus is transfered to the textbox.

the problem is that Textbox15.focus() select the text inside the textbox. i wish to give that control the focus but place the cursor at the end of the text, with no selection.

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
TextBox15.Text = TextBox15.Text & DateTime.Now & " "
TextBox15.Focus()
End Sub

View 2 Replies

Display Queried Results In Textbox Where Criteria In Another Textbox 1 Form

Jun 21, 2010

I have a database I am creating with about 50 users over a network. There are about 6 groups of users and these users are spread across 10 branches. I want to block/allow users from particular forms and views. For example I want branch users forms to be filtered by their branch number but depending on the group they are in they can only see some forms. i.e. 50 users, 10 branches, each branch has about 5 ppl of where 1 is in group A and 4 are in group B. I want all users that belong to branch 1 to see the information they enter, but Group B enter data but cannot approved or delete, and group A can enter, approve and delete. So then. On my login form I have the user type his/her username but the i want LEAVE function to update 2 textbox where I have named GroupName and BranchNo. Basically to run a query and look for the username and return in one textbox that user's groupname and the other textbox the user's branch no. This information will be used to filter forms and block the user from certain controls. This is the code I have so far but still can't figure how to display the results.

Private Sub UsernameTextBox_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles UsernameTextBox.Leave
'Make Connection to database

[Code].....

It keeps highlighting the BranchNumber and UserGroup and giving error "Value of type 'String' cannot be converted to System.Data.OledbCommand

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved