dcsimg
Results 1 to 13 of 13

Thread: pls help me....

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    4

    Wink pls help me....

    im beginers...
    pls help me, how solve my problem in vb6 aplication..
    my question:
    how to code this..when i clik the command buton, the result
    of text2.text is look like this....





    hope u solve this
    Last edited by yaw-ogil; Nov 20th, 2007 at 12:53 AM.

  2. #2
    Addicted Member TBeck's Avatar
    Join Date
    Apr 2006
    Location
    Ontario, Canada
    Posts
    254

    Re: pls help me....

    how exactly do you need to rearage the letters, what is the method or is it random?

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    4

    Re: pls help me....

    Quote Originally Posted by TBeck
    how exactly do you need to rearage the letters, what is the method or is it random?
    look carefully @ the result text2.text...
    the first letter is "H" dats the last letter of inputtext..next is "A" first leter of
    inputtext next is "G" 2nd to d last next "B" ..did u gets bro..



    pls how to code dat

  4. #4
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: pls help me....

    Depends on the requirement of your instructor... whether you have to iterate or if you can use string function for reversing it... you should take the time to do some research on the basics rather than relying on someone else to make the code... being spoon fed leaves you without solid foundation for more complex topics, defeats the purpose of training at school, and you won't learn other necessary skills (eg. debugging, research, etc).

  5. #5
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: pls help me....

    Welcome to the Forum

    You are able to post in here, even with screenshots.
    so you should be able to search in this forum.
    I guess "String manipulation" would be some good keywords for a strat!
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  6. #6
    Lively Member
    Join Date
    Nov 2007
    Location
    Rochester, NY
    Posts
    111

    Re: pls help me....

    Searching 'Scramble String' is a nice start.. Here's a couple posts that it pulled up:

    http://vbforums.com/showthread.php?t=441620
    http://vbforums.com/showthread.php?t=227030
    http://vbforums.com/showthread.php?t=96189
    Please use the search function prior to posting a question and see if someone's already answered it.
    -If I helped you, please rate me, as I'd do the same for you =)
    -Remember to select the Resolved option for your post when you've gotten the answers you need.

  7. #7
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: pls help me....

    Welcome to the forums.

    We will help you help yourself. Have you even tried this on your own?
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  8. #8
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    Re: pls help me....

    look carefully @ the result text2.text...
    It generally is better to explain what you want in detail than to have us guessing what to make of a picture.

    My guess:
    You work the string left to right, until you reach the middle of the string.
    The characters will be in even places in the result, starting with 2.
    You work the string right to left, until you reach the middle of the string.
    The characters will be in odd places in the result, starting with 1.

    Right?
    Last edited by jeroen79; Nov 20th, 2007 at 01:29 PM.

  9. #9
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: pls help me....

    Quote Originally Posted by yaw-ogil
    look carefully @ the result text2.text...
    the first letter is "H" dats the last letter of inputtext..next is "A" first leter of
    inputtext next is "G" 2nd to d last next "B" ..did u gets bro..



    pls how to code dat
    The more important question and the purpose of the exercise is, "Do YOU get it?" Try to work it out on your own first. Three processes are involved in the algorithm; selection of source, identification of destination, and transfer/swapping. Create relevant code for each process and integrate them.

    Also, bear in mind its an IPO (Input-Process-Output). You can reformat the string to suit your needs in the process part, such as dividing it into two groups, or converting string to a byte array, etc. You don't have to stick with string "ABCDEFGH" and with only one other variable for output all through out the process.
    Last edited by leinad31; Nov 20th, 2007 at 07:52 PM.

  10. #10

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    4

    Re: pls help me....

    Quote Originally Posted by Neato
    Searching 'Scramble String' is a nice start.. Here's a couple posts that it pulled up:

    http://vbforums.com/showthread.php?t=441620
    http://vbforums.com/showthread.php?t=227030
    http://vbforums.com/showthread.php?t=96189
    thanks bro for your posting link...thanks to all reply...
    actually im very newbie of visual basic.....

  11. #11
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: pls help me....

    Quote Originally Posted by yaw-ogil
    actually im very newbie of visual basic.....
    We understand. We also hope you understand that it's not just about getting the working code for submission to instructor, but more on understanding, learning and internalizing the development tools/IDE and process... something like; research and analysis -> prototyping -> testing & debugging -> documentation...

    Consider this... do you really expect to apply an algorithm that swaps letters in an accounting, banking, insurance, etc system when you become a professional programmer? Probably for encryption but that wouldn't be something most developers will develop or maintain on a daily basis.

    If you don't acquire necessary research skills (Neato had to do it for you) and build up your own knowledge base/links, then you'd find it more difficult to absorb other concepts/trainings/knowledge when your out of school where it's all constrained to what's in the syllabus or materials provided. If you don't sharpen you analytical and debugging skills then you will be overwhelmed when your tasked to update/maintain modules of mid/large size company systems. And if you don't practice and observe proper documentation then you'd be singled out by information system auditors more often than not.

    Remember, later on it isn't just about the code.
    Last edited by leinad31; Nov 21st, 2007 at 10:34 PM.

  12. #12
    Member
    Join Date
    Oct 2005
    Posts
    34

    Re: pls help me....

    you can use the left and right function within a for.. next statement like
    Dim cnt as long
    Dim tmpstr as string
    tmpstr=""
    for cnt=1 to fix(len(text1.text) /2)
    tmpstr=tmpstr & Mid(text1.text,len(text1.text)-cnt,1) & Mid(text1.text,cnt,1)
    next
    text1.text=tmpstr

    Pay attention on the length of text, (odd or even), (I did not test)
    You can use Div function (in any) instead of fix

  13. #13

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    4

    Wink Re: pls help me....

    THANK U FOR UR ADVICE DANIEL31...

    TO doanhtn..>>>THANKS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width