Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Formatting test

Formatting test

Scheduled Pinned Locked Moved Visual Basic
questiongame-devtutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SyPTo
    wrote on last edited by
    #1

    I'm pretty new to VB programming however i'm trying to become better. i Play an online RP game , i want to make some sort of calculator with an cope and paste option so i can copy and paste info from the browser/clipboard into the program and format the text. the text might look like this : name sypto country trysto 12876 offense 12000 defense 10000 something liek that , not i need to have a way that it copies the 12000 and the 10000 for example into the calculator..how do i start this ?

    E 1 Reply Last reply
    0
    • S SyPTo

      I'm pretty new to VB programming however i'm trying to become better. i Play an online RP game , i want to make some sort of calculator with an cope and paste option so i can copy and paste info from the browser/clipboard into the program and format the text. the text might look like this : name sypto country trysto 12876 offense 12000 defense 10000 something liek that , not i need to have a way that it copies the 12000 and the 10000 for example into the calculator..how do i start this ?

      E Offline
      E Offline
      Edbert P
      wrote on last edited by
      #2

      If you're playing Utopia (http://games.swirve.com/utopia) there is a good calculator already (http://utopia.sourceforge.net/) :). Use the Clipboard object to get the text you just copied from the browser, and afterwards you can treat the text as string. I am assuming each line is separated by Char(13) and you can probably split them into an array using the Split() function and get the data you want from the array. Here's an example from MSDN on how to use clipboard (you need the namespace System.Windows.Forms): Private Sub button2_Click(sender As Object, e As System.EventArgs) ' Declares an IDataObject to hold the data returned from the clipboard. ' Retrieves the data from the clipboard. Dim iData As IDataObject = Clipboard.GetDataObject() ' Determines whether the data is in a format you can use. If iData.GetDataPresent(DataFormats.Text) Then ' Yes it is, so display it in a text box. textBox2.Text = CType(iData.GetData(DataFormats.Text), String) Else ' No it is not. textBox2.Text = "Could not retrieve data off the clipboard." End If End Sub 'button2_Click

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups