Question about Operating Systems

1 Answer

To form a jumbled words

Consider two textboxes text1 and text2 res, text1 contains original text and i need text2 be with jumbled words

Posted by on

  • Folusho Adeyanju
    Folusho Adeyanju May 11, 2010

    What program are you using?

×

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Novelist:

    An expert who has written 50 answers of more than 400 characters.

    Scholar:

    An expert who has written 20 answers of more than 400 characters.

  • Expert
  • 160 Answers

Using VB as an example

Dim intLength as Integer
Dim y as Integer
Dim arrOut( ) as String
Dim TempLetter as String
intLength=len(text1.text)
ReDim arrOut(intLength)
Randomize
dim boolDone as boolean ' flag to track unfilled positions

Write a loop that gets each letter from text1, then choose a random number from 1 to intLength

Get the existing letter, then put it into a different position in the arrOut, based on the random number. If something is in that position, try again:

for y=1 to intLength
tempLetter = mid(text1.text,y,1)
boolDone=false
do while boolDone=false
r =CInt(Int((y * Rnd()) + 1)) 'Get random # from 1 to length
if arrOut(r) ="" then 'see if spot has been used
arrOut(r) = tempLetter
boolDone = true
end if
loop
next 'get next letter in text1

text2.text=join(arrOut,"") ' concatenate arrOut, no delimiter.


Hope that helps.





Posted on Jul 18, 2008

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Word .doc vanished


When a Word document file is corrupted, then you can try several methods to recover it:
1. First of all, you can try the recovery function integrated with Microsoft Word, as follows:
1) On the File menu, click Open.
2) In the Look in list, click the drive, folder, or Internet location that contains the file that you want to open.
3) In the folder list, locate and open the folder that contains the file.
4) Select the file that you want to recover.
5) Click the arrow next to the Open button, and then click Open and Repair.
The "Recover Text from Any File" converter has limitations. For example, document formatting is lost. Additionally, graphics, fields, drawing objects, and any other items that are not text are lost. However, field text, headers, footers, footnotes, and endnotes are retained as simple text.
1. In Word 2007, click the Microsoft Office Button, and then click Open.
2. In Word 2010, click the File Menu, and then click Open.
3. In the Files of type box, click Recover Text from Any File(*.*).
4. Click the document from which you want to recover the text.
5. Click Open.
After the document is recovered by using the "Recover Text from Any File" converter, there is some binary data text that is not converted. This text is primarily at the start and end of the document. You must delete this binary data text before you save the file as a Word document.
Here's something to look at:http://support.microsoft.com/default.aspx?scid=kb;en-us;87856
https://community.office365.com/en-us/f/172/t/269739

I have had great success with the Word Recovery Toolbox application from http://www.oemailrecovery.com/word_repair.html
They have a free version you can try. I would suggest you run the deep scan in order to get the best data set to look through.

Try also to restore the file using this online service. I found it in Google. https://onlinefilerepair.com/en/rtf-repair-online.html

Apr 10, 2016 | Operating Systems

2 Answers

HOW DO I CHANGE FONT SIZE IN WINDOWS 8.1? AND FONT SIZE IN AOL 9.7 FAVORITES.


Each version of windows does have an option to change the DPI
In effect that will make text larger, whilst not changing the size of the textboxes, and other controls on the form.
HOWEVER I strongly recommend that no one ever uses that setting, as it is an 'unclean' (not Kosher) solution to a problem.
Instead you should either -
- Get a bigger monitor
or
- Use a screen magnifier
The one I use is -
http://www.workerscollection.com/wcollect/english/html/mg_pro.html
It is not too expensive.
Once installed, tweak the settings so that it displays full screen, with no border.
I have been using this for years, and love it.
I have set the Scroll Lock key on my keyboard to turn it on and off
When I click it, the screen doubles in size. (2x magnification)
Thus everything is twice as big.
If you move your mouse to the top left of the screen, then you are seeing the top left 25% of the original screen.
Wherever you move your mouse, you are seeing that 25% of your original screen.
It is not an image, it is the actual screen magnified. So you can still click things, and type into boxes, etc.

I am 73, and refuse to wear glasses.
That program is invaluable to me.
If I were sent to Mars, and could only take 10 programs with me, that would be one of them.

Jan 15, 2015 | Operating Systems

1 Answer

Yahoo support


If text changes when you type, it is either the keyboard or the program to which you are addressing your data to. If you use a word processing program, go to that program, open it and type a message. If that message is exactly as you want, no errors, etc; then the keyboard is fine. You may try and write some material in a word processing program and do a COPY of that data and Paste it into an email message to see if the content is exactly the as you typed it. If it changes, then your Email or Internet application is defective.

Dec 11, 2013 | Operating Systems

1 Answer

How can i display an even number if i enter an odd number in visual basic 6.0


To display an even number when an odd number is entered you can add 1.
n= val(text1.text) 'Take the value of n from the textbox.
If n mod 2 =1 then 'If n is an odd number n=n+1 'You make it an even number end if
text2.text = n 'Display it in another textbox.

Please give a good rating to this answer so that I will be encouraged to support people like you having problems with VB6.

Sep 22, 2011 | Operating Systems

1 Answer

I cant fill in a form sent to me in an attachment


The chances are that it is either a PDF type form meant for printout (unless you have the full adobe suite) or another form of LOCKED document.

In this case you would have to print it out and fill it in by hand then scan or fax it back to the source

An alternative would be to make it a background picture or similar in Microsoft word and then position the text in the correct places.

You could also take a look a FOXIT software if it is a PDF file as they have a program that would also allow you to type in the correct text areas.

Bob
Moderator

It would be very decent of you to consider the quality of our expert’s answers and judge them accordingly as you pass through FixYa.

Thank you

Mar 11, 2010 | HP Operating Systems

1 Answer

How to do Undo and Redo in Visaul Basic Project ? I wanna do in my application(Project). Suggest me Code for it .


Undo command: if you want an undo command, the best way to do it is to 'send' key strokes to the textbox that you want to use. You will need to send Ctrl+Z. You can do this with this code:
'=========================
'General Declarations
Private Declare Function MapVirtualKey Lib "user32" Alias "MapVirtualKeyA" (ByVal wCode As Long, ByVal wMapType As Long) As Long Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const KEYEVENTF_KEYUP = &H2
Private Sub Command1_Click() 'The procedure that will run the undo command
Text1.SetFocus 'The textbox that you want to 'undo'
'Send Ctrl+Z
keybd_event 17, 0, 0, 0
keybd_event 90, 0, 0, 0
'Release Ctrl+Z
keybd_event 90, 0, KEYEVENTF_KEYUP, 0
keybd_event 17, 0, KEYEVENTF_KEYUP, 0
End Sub
'===================================

Another way to do this is to use the SendKeys statement. However, the API function gives you more control.
'===================================
Private Sub Command1_Click() 'The procedure that will run the undo command
Text1.SetFocus 'The textbox that you want to 'undo'
'Send Ctrl+Z
SendKeys "^Z"
End Sub
'====================================

Apr 22, 2009 | Microsoft Windows XP Professional

1 Answer

How to connect vb with ms access


se Adodc OR Even better.. ADODB. for this you need to get MDAC fromMicrosoft free download.(check under project_References- Microsoft DataActiveX objects.. the current no is 2.8. if it is not there download invb directory.

next, you can learn about creating a DSN from control panel, ODBC. onceyou learn this, connection becomes a piece of cake. get some free vbtutoriasl from WWW.

then

you need to use DAO or ADO to connect to the database. better study both but since ADO is current, i am showing that code.
under Menu Project_References, put a check mark on Microsoft ActiveXData Objects latest version (though it works for all, currently 2.8with sp pack 1 ).

at the general declarations:
dim conn as adodb.connection, rec as adodb.recordset, esql as string,esql1 as string
Private Function connect()
Set rec = New ADODB.Recordset
Set conn = New ADODB.Connection
esql = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "D:VBDesigndhana2.mdb" & ";Persist Security Info=False"
'here you put the correct path of your mdb file. and check if you have jet 4.0

conn.Open (esql), , , 0
End Function

private sub form_Load()
connect
end sub
and for adding records:
say let us say you have 3 fields. then have 3 textboxes and 1 command button on the form.

private command1_click()
esql1="select * from Yourtablename"
rec.open(esql1),conn,, adOpenDynamic, adLockOptimistic
rec.AddNew
rec.Fields(0) = text1.Text
rec.Fields(1) = Text2.text
rec.Fields(2) = text3.text
' you need to check if in your access table design you have Allowed Zero length .. set it to Yes for all text fields.
rec.update
if not rec.eof then rec.movenext
rec.close
conn.close
set conn to nothing
end sub

this will add new records to access table from VB.
' for picture store the full path of the path and the picture file nameint the text field. and in the picturebox of VB form for viewingrecords again you need ADO or ADODC and here you code:picture1.picture=Loadpicture(rec.fields(3) ' depending on where thepicture field is located. you need to make a few trials.
under Menu Project_References, put a check mark on Microsoft ActiveXData Objects latest version (though it works for all, currently 2.8with sp pack 1 ).

at the general declarations:
dim conn as adodb.connection, rec as adodb.recordset, esql as string,esql1 as string

Private Function connect()
Set rec = New ADODB.Recordset
Set conn = New ADODB.Connection
esql = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "D:VBDesigndhana2.mdb" & ";Persist Security Info=False"
'here you put the correct path of your mdb file. and check if you have jet 4.0

conn.Open (esql), , , 0
End Function

private sub form_Load()
connect
end sub

and for accessing records:

private command1_click()
esql1="select * from Yourtablename where id =" & val(text1) ' for integers

esql1="select * from Yourtablename where name=" & "'" & text1 & "'" ' for string

rec.open(esql1),conn, adOpenstatic, adLockreadonly

label1.caption =rec.Fields(0)
label2.caption= rec.Fields(1)
label3.caption= rec.Fields(2)
' you need to check if in your access table design you have Allowed Zero length .. set it to Yes for all text fields.

rec.close
conn.close
set conn to nothing
end sub


' similarly there are routines to ADD, Delete, Edit, View etc.

Feb 26, 2009 | Operating Systems

2 Answers

Vb code for automatic number change


You want the code for when you press enter in textbox it automatically change to 1.

I am typing C# code you can easly covert it to VB.Net code

make an event for key press for textbox
and write the followting code in the event
IF textbox1.text = ""
textbox1.text = "1"
End IF

I hope your problem will solve with this If need more assistance let me know. If your problem is solved then don't forget to make answer my thread.

Regards

Nov 17, 2008 | Operating Systems

1 Answer

TEXTBOX CONTROL IN VISUAL BASIC 6


Sorry we can set one font style in one text box..

Mar 04, 2008 | Operating Systems

Not finding what you are looking for?
Operating Systems Logo

Related Topics:

107 people viewed this question

Ask a Question

Usually answered in minutes!

Top Operating Systems Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18298 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Prashant  Sharma
Prashant Sharma

Level 3 Expert

1127 Answers

Are you an Operating System Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...