[Solved]Cased6 2instructions T Compatibility Mode Word Insert Design Layout References Mailings Re Q37204826
.![cased6-2instructions [T) [Compatibility Mode] - Word Insert Design Layout References Mailings Review View Tell me what you wa](https://media.cheggcdn.com/media%2Fa46%2Fa46266ce-ecf2-40dd-a228-50e9b7648c16%2Fphpbp8I3V.png)
![cased6-2instructions [T) [Compatibility Mode] - Word Insert Design Layout References Mailings Review View Tell me what you wa](https://media.cheggcdn.com/media%2F642%2F642db295-7432-428c-8ebb-72a8367129f9%2FphpjUikjy.png)
![cased6-2instructions [T) [Compatibility Mode] - Word Insert Design Layout References Mailings Review View Tell me what you wa](https://media.cheggcdn.com/media%2F421%2F421dee68-2e7c-422b-99c9-60d519cd425b%2Fphpu4bHH4.png)
![cased6-2instructions [T) [Compatibility Mode] - Word Insert Design Layout References Mailings Review View Tell me what you wa](https://media.cheggcdn.com/media%2Fca3%2Fca38c04a-96f0-4002-ba05-7f9b40005291%2FphpIDytuX.png)
![cased6-2instructions [T) [Compatibility Mode] - Word Insert Design Layout References Mailings Review View Tell me what you wa](https://media.cheggcdn.com/media%2Fecb%2Fecb3f523-9ac6-4842-a410-5960eb4557b7%2FphpH2sUZb.png)
cased6-2instructions [T) [Compatibility Mode] – Word Insert Design Layout References Mailings Review View Tell me what you want to do File Home Find Cut Ariel Replace c Replace Paste Copy B I U-х, х’ A·シ ーー ,-. 2x,w. Emphasis Heading-1 Normal! Strong ー Subtitle Title T No Spac Subtle Ern. itensee.. Quote IntenseQ ; C Select Clipboarcd Styles Lditing Variable name Holds the character re ng t he chosen delimiter Integer Holds the starting position in the string for the search Holds the Holds the l Holds the where the delimiter was lound in the stri of the input strin t string from the text box String Holds the extracted word from the string tempMord r, to skip over the delimiter Holds the number of characters to advance the Table 1 First, clear the list box in case there are items from a previous use. use an I f/로ktif/31se statement to validate that a delimiter has been selected. CR-LF means “carriage retum line feed, which causes a new line to be started. You will use a built-in constant to represent this, called CRLE. Nole that “ro CRLF is two characters long, while the other delimiters are only 1 character long. For the selected delimiter radio button, set the deliniter variable to the actual character and set the advances12e for that delimiter, using the values in Table 2: limiter character Comma CR-FL Use the Exit Bub statement to leave the Click event if no radio button was selected. Parse the text box contents Parsing a string to break out the words involves a loop and two pointer variables l&odex and exIndex) Both start at the beginning position, which is 0. aldsxwill atways point to the current starting position for the scan (and extraction). exIadex should be set to the position of the next delimiter. Inside the loop, do these 1. Scan the string from the starting position (oldtndax) until you find a delimiter. Set nexadex to the position of the delimiter Extract the word from the starting position (eldindex) up to but not including the delimiter position 2. Page 1 ot 3 1000 words O Type here to search ^ 4x 10:23 AM cased6-2instructions [T) [Compatibility Mode] – Word Insert Design Layout References Mailings Review View Tell me what you want to do File Find Cut Ariel Replace c Replace Paste Copy B I U-х, х’ A·シ ーー ,-. 2x,w. Emphasis Heading-1 Normal! Strong ー Subtitle Title T No Spac Subtle Ern. itensee.. Quote IntenseQ ; C Select Clipboarcd Styles Lditing inevIadex). Useto hold the extracted word 3. Trim off spaces, and load the extracted word into the list box. 4 Move the starting position (edex) forward past the extracted word and past the delimiter Hints: 1. Use a hile laop The condition to use will be whether o1dTndex has reached the end of the input string. You can determine this by gatting the length of the input string 2. Use the IndexCE method to scan for the selected delimiter, and assign the results of the Index0:E method to neIndes exIndex therefore points to the location of the next delimiter 3. Use the Mid function to extract the word. 4. Remember that the deimiter size has been assigned to adranceSize 5 Remember that there probably is no delimiter at the very end So when the scan no longer finds a delimiter, you must check to see if gldtadex is at the end of the string. If not, you should extract the remaining characters from aldIdex forward. Step 5- Add code in the Build Text From List button’s Click event to load the text box: This part is simpler! You will take the items in the list box, combine them with the delimiter, and put the final string into the text box. You will need the variables shown in Table 3 Variable name Type the chosen delimiter tring Holds the character Loop counter Holds the l Holds the i length of the input strin t string from the text box advance512 Integer Holds the number of characters to advance the pointer, to skip over the delimiter Table 3 First, clear the text box of ltems from a previous use Validate and set the delimiter This code will be identical to the code used in the Parse Text to List button’s click event to validate the delimiter choice You will need a loop to iterate through all of the items in the list box. For each item in the list, concatenate its value with the t 3tr1n variable If it is not the last ilern in the list, concatenate the sleeted delimiter also After all items have been concatenated into semg, assign i to the text box Hints: 1. You can use a For loop here, because you know the number af items in the list (the tema.Count property provides the count of items in the list box) You can test to see if the loop counter has reached the last item by comparing it with the 2. ItECouat Page 2 of 3 1000 words 10-28 AMM Type here to search cased6-2instructions [T) [Compatibility Mode] – Word Insert Design Layout References Mailings Review View Tell me what you want to do File Home Sign in Find Cut Ariel Copy Replace Paste Format Painter B IUu Clipboarcd u-х, х’ A·シ▲ー ーー ,-. 2x,w. [mphasis Heading 1-Normal! Strong Subtitle Title T No Spac Subtle Ern. itense E.. Quote IntenseQ…- C Select Styles Lditing property to determine if you need to add a delimiter for this item. Step 6 Finish up: Be sure to add the code for the Clear button and the Exit button Step 7: Save and run Save all files, then start the application. Test the pragram using various delimiters. Be sure to enter the data in the textbox using the delimiter you have selected. Figure 2 shaws a sample run using commas in the text box a List Irom a T Conna C Space Pae Ted to Build Tedfi Figure 2 Then change the delimiter and use the second button to load the textbox from the list box. Figure 3 shows the screen after changing the delimiter to CR-LF, and then clicking the Build Text from List button. Page 2 of 3 1000 words + 1006 ^ 4x 10:23 AM Type here to search cased6-2instructions [T) [Compatibility Mode] – Word Insert Design Layout References Mailings Review View Tell me what you want to do Sign in Share Find File Cut Copy Format Painter Ariel Replace Paste u-х, х’ A·シ▲ー ーー ,-. 2x,w. [mphasis Heading 1-Normal! Strong Subtitle Title T No Spac Subtle Ern. itense E.. Quote IntenseQ…- C Select Clipboarcd Styles Lditing Build Ted ho Lis Figure 2 Then change the delimiter and use the second button to load the textbox from the list box Figure 3 shows the screen after changing the delimiter to CR-LF, and then clicking the Build Text from List button. Build a L a TetBox C Conna CR-LF C Space Buld a Tin a List Faquure Nate: There is another way to parse a slring, but you need to use an array. The String method Split will split a string into its component pleces and place the pleces into an amay Page 2 of 3 1000 words ^ 4x 10:23 AM Type here to search cased6-2instructions [T) [Compatibility Mode] – Word Insert Design Layout References Mailings Review View Tell me what you want to do Sign in Share File Home Cut Ariel ab Replace Copy B I U-х, х’ A·シ ーー ,-. 2x,w. Emphasis Heading-1 Normal! Strong ー Subtitle Title T No Spac Subtle Ern. itensee.. Quote IntenseQ ; C Select Clipboarcd styles Lditing Chapter 6- Case 2 Parsing Strings Select a Build a List on a TestBoo Enterseparated by he chaten den Space Pane Ted igure Instructions In this case, you will create a Visual Basic solution that manipulates strings. It will parse a string containing a list of Rems within a text bax and put the individual items into the list box. t will build the textbox string by putting the list box Items together into a single string. Parsing is based on the selected delimiter Step 1: Create the Project: Create a Visual Basic Praject using the praject name StingParesu Step 2 – Design the Form: Design the form as shown in Figure 1. You will need three group boxes, three radio buttons, four button controls one text box, one list box, and two label controls. Step 3- Add code in the Form’s Load event to select the first radio button: In the Forms Load event, write code to select the Comma choice in the radio buttons group box Step 4 Add code in te Parse Text to List button’s Click event to parse and load the list box: You will need the varlables shown in Table 1 Page 1 ot 3 1000 words + 1006 O Type here to search ^ 4x 10:23 AM Show transcribed image text cased6-2instructions [T) [Compatibility Mode] – Word Insert Design Layout References Mailings Review View Tell me what you want to do File Home Find Cut Ariel Replace c Replace Paste Copy B I U-х, х’ A·シ ーー ,-. 2x,w. Emphasis Heading-1 Normal! Strong ー Subtitle Title T No Spac Subtle Ern. itensee.. Quote IntenseQ ; C Select Clipboarcd Styles Lditing Variable name Holds the character re ng t he chosen delimiter Integer Holds the starting position in the string for the search Holds the Holds the l Holds the where the delimiter was lound in the stri of the input strin t string from the text box String Holds the extracted word from the string tempMord r, to skip over the delimiter Holds the number of characters to advance the Table 1 First, clear the list box in case there are items from a previous use. use an I f/로ktif/31se statement to validate that a delimiter has been selected. CR-LF means “carriage retum line feed, which causes a new line to be started. You will use a built-in constant to represent this, called CRLE. Nole that “ro CRLF is two characters long, while the other delimiters are only 1 character long. For the selected delimiter radio button, set the deliniter variable to the actual character and set the advances12e for that delimiter, using the values in Table 2: limiter character Comma CR-FL Use the Exit Bub statement to leave the Click event if no radio button was selected. Parse the text box contents Parsing a string to break out the words involves a loop and two pointer variables l&odex and exIndex) Both start at the beginning position, which is 0. aldsxwill atways point to the current starting position for the scan (and extraction). exIadex should be set to the position of the next delimiter. Inside the loop, do these 1. Scan the string from the starting position (oldtndax) until you find a delimiter. Set nexadex to the position of the delimiter Extract the word from the starting position (eldindex) up to but not including the delimiter position 2. Page 1 ot 3 1000 words O Type here to search ^ 4x 10:23 AM
cased6-2instructions [T) [Compatibility Mode] – Word Insert Design Layout References Mailings Review View Tell me what you want to do File Find Cut Ariel Replace c Replace Paste Copy B I U-х, х’ A·シ ーー ,-. 2x,w. Emphasis Heading-1 Normal! Strong ー Subtitle Title T No Spac Subtle Ern. itensee.. Quote IntenseQ ; C Select Clipboarcd Styles Lditing inevIadex). Useto hold the extracted word 3. Trim off spaces, and load the extracted word into the list box. 4 Move the starting position (edex) forward past the extracted word and past the delimiter Hints: 1. Use a hile laop The condition to use will be whether o1dTndex has reached the end of the input string. You can determine this by gatting the length of the input string 2. Use the IndexCE method to scan for the selected delimiter, and assign the results of the Index0:E method to neIndes exIndex therefore points to the location of the next delimiter 3. Use the Mid function to extract the word. 4. Remember that the deimiter size has been assigned to adranceSize 5 Remember that there probably is no delimiter at the very end So when the scan no longer finds a delimiter, you must check to see if gldtadex is at the end of the string. If not, you should extract the remaining characters from aldIdex forward. Step 5- Add code in the Build Text From List button’s Click event to load the text box: This part is simpler! You will take the items in the list box, combine them with the delimiter, and put the final string into the text box. You will need the variables shown in Table 3 Variable name Type the chosen delimiter tring Holds the character Loop counter Holds the l Holds the i length of the input strin t string from the text box advance512 Integer Holds the number of characters to advance the pointer, to skip over the delimiter Table 3 First, clear the text box of ltems from a previous use Validate and set the delimiter This code will be identical to the code used in the Parse Text to List button’s click event to validate the delimiter choice You will need a loop to iterate through all of the items in the list box. For each item in the list, concatenate its value with the t 3tr1n variable If it is not the last ilern in the list, concatenate the sleeted delimiter also After all items have been concatenated into semg, assign i to the text box Hints: 1. You can use a For loop here, because you know the number af items in the list (the tema.Count property provides the count of items in the list box) You can test to see if the loop counter has reached the last item by comparing it with the 2. ItECouat Page 2 of 3 1000 words 10-28 AMM Type here to search
cased6-2instructions [T) [Compatibility Mode] – Word Insert Design Layout References Mailings Review View Tell me what you want to do File Home Sign in Find Cut Ariel Copy Replace Paste Format Painter B IUu Clipboarcd u-х, х’ A·シ▲ー ーー ,-. 2x,w. [mphasis Heading 1-Normal! Strong Subtitle Title T No Spac Subtle Ern. itense E.. Quote IntenseQ…- C Select Styles Lditing property to determine if you need to add a delimiter for this item. Step 6 Finish up: Be sure to add the code for the Clear button and the Exit button Step 7: Save and run Save all files, then start the application. Test the pragram using various delimiters. Be sure to enter the data in the textbox using the delimiter you have selected. Figure 2 shaws a sample run using commas in the text box a List Irom a T Conna C Space Pae Ted to Build Tedfi Figure 2 Then change the delimiter and use the second button to load the textbox from the list box. Figure 3 shows the screen after changing the delimiter to CR-LF, and then clicking the Build Text from List button. Page 2 of 3 1000 words + 1006 ^ 4x 10:23 AM Type here to search
cased6-2instructions [T) [Compatibility Mode] – Word Insert Design Layout References Mailings Review View Tell me what you want to do Sign in Share Find File Cut Copy Format Painter Ariel Replace Paste u-х, х’ A·シ▲ー ーー ,-. 2x,w. [mphasis Heading 1-Normal! Strong Subtitle Title T No Spac Subtle Ern. itense E.. Quote IntenseQ…- C Select Clipboarcd Styles Lditing Build Ted ho Lis Figure 2 Then change the delimiter and use the second button to load the textbox from the list box Figure 3 shows the screen after changing the delimiter to CR-LF, and then clicking the Build Text from List button. Build a L a TetBox C Conna CR-LF C Space Buld a Tin a List Faquure Nate: There is another way to parse a slring, but you need to use an array. The String method Split will split a string into its component pleces and place the pleces into an amay Page 2 of 3 1000 words ^ 4x 10:23 AM Type here to search
cased6-2instructions [T) [Compatibility Mode] – Word Insert Design Layout References Mailings Review View Tell me what you want to do Sign in Share File Home Cut Ariel ab Replace Copy B I U-х, х’ A·シ ーー ,-. 2x,w. Emphasis Heading-1 Normal! Strong ー Subtitle Title T No Spac Subtle Ern. itensee.. Quote IntenseQ ; C Select Clipboarcd styles Lditing Chapter 6- Case 2 Parsing Strings Select a Build a List on a TestBoo Enterseparated by he chaten den Space Pane Ted igure Instructions In this case, you will create a Visual Basic solution that manipulates strings. It will parse a string containing a list of Rems within a text bax and put the individual items into the list box. t will build the textbox string by putting the list box Items together into a single string. Parsing is based on the selected delimiter Step 1: Create the Project: Create a Visual Basic Praject using the praject name StingParesu Step 2 – Design the Form: Design the form as shown in Figure 1. You will need three group boxes, three radio buttons, four button controls one text box, one list box, and two label controls. Step 3- Add code in the Form’s Load event to select the first radio button: In the Forms Load event, write code to select the Comma choice in the radio buttons group box Step 4 Add code in te Parse Text to List button’s Click event to parse and load the list box: You will need the varlables shown in Table 1 Page 1 ot 3 1000 words + 1006 O Type here to search ^ 4x 10:23 AM
Expert Answer
Answer to cased6-2instructions [T) [Compatibility Mode] – Word Insert Design Layout References Mailings Review View Tell me what y… . . .
OR

