Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,158 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,387 people online right now. Registration is fast and FREE... Join Now!




VB2008 express, howto?

 
Reply to this topicStart new topic

VB2008 express, howto?, I want to know how to do a few simple things in VB

Keterna
11 Jul, 2008 - 08:19 PM
Post #1

New D.I.C Head
*

Joined: 11 Jul, 2008
Posts: 2

Hello!

My name is John, and I am brand new to Visual Basic! I know some C++, and a good amount of XML and LUA. Now, what I want VB for, is to make my scripting of LUA and XML scripts easier, an example of what I want it to do..

If I were the press the "New Script" button, it would put all of the neccesary header lines, just a few lines of script, into an RTF box off to the right portion of the app. Such as:

CODE

--Created using The Uber Script Maker
ModuleAddName;
ModuleAddAge;


Then, I would push the, well for an example, "Add Name" button, and it would turn text in a form, such as "Bob" into name{bob} This is just an example, the best way I learn is by doing, and I wanna do this! So to sum it up, I want to be able to do two things, first, add one bit of text in a text box into a line of script, secondly, add text from two or three text boxes into one script )Name: Bob, Age: 25. "Name={Bob, 25}" And I wan't this all put inside an RTF box, and finally, exportable with a save command into an XML and/or an LUA file

So, anyone wanna give me tips, or show me a good tutorial that will show me how to make an application like this?

Thanks,
John

This post has been edited by Keterna: 11 Jul, 2008 - 08:22 PM
User is offlineProfile CardPM
+Quote Post

AdamSpeight2008
RE: VB2008 Express, Howto?
11 Jul, 2008 - 11:23 PM
Post #2

LINQ D.I.C.
Group Icon

Joined: 29 May, 2008
Posts: 863



Thanked: 54 times
Dream Kudos: 2250
My Contributions
First thing VB2088 is .Net language so future request of help could be better if placed in the VB.Forum anime2.gif VB.Net Forum

Lets start

File -> New Project
Select "New Windows Application"
Enter a project name (for now the default will do)
Click OK

This will open the main development enviroment
On the left is a panel called Toolbox, which contains components that can be dragged & dropped onto the form.
To the right of the Toolbox is the main GUI designer for ""Form1"

In the Toolbox look for the component called Textbox.
Click and drag one on to the Form1 GUI Designer.
Hover over the control and bring up the menu, select Properties.

This opens a another panel which contains all of the properties of the textbox.
Look through the properties for one called "(Name)";- This ID name of the control, change the name from "TextBox1" to "Txt_Name".

Go back to the Toolbox and drag another textbox on to form, name it "Txt_Greeting"

Go back to the Toolbox and drag a button on to form.
Change its name to "But_Welcome"
Change its text to "Welcome"

In the the form double click on the button.
This opens another window, which contains all the VB code related to Form1
You'll see the following
vb

Public Class Form1

Private Sub But_Welcome_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_Welcome.Click

End Sub
End Class



Click on the blank line before the End sub
Type the following code
vb

Txt_Greeting.Text="Welcome to </Dream.In.Code> " & Txt_Name.Text

This takes the text contained within the Textbox Txt_Name and joins it the end of the string "Welcome to </Dream.In.Code>"
Then place the result inside the textbox Txt_Welcome

Run the application by clicking on the green arrow
Enter your name and click on the button.

To stop the Application click the blue square. or close icon of the form.

To save. File -> Save All -> Save

I hope this is enough to get you started and welcome to forum.

This post has been edited by AdamSpeight2008: 12 Jul, 2008 - 06:57 AM
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: VB2008 Express, Howto?
12 Jul, 2008 - 05:48 AM
Post #3

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Moved to VB.NET smile.gif
User is offlineProfile CardPM
+Quote Post

Keterna
RE: VB2008 Express, Howto?
12 Jul, 2008 - 07:29 PM
Post #4

New D.I.C Head
*

Joined: 11 Jul, 2008
Posts: 2

Thanks,

That works for the original portion, and a few aspects, but what about when code is in the middle?

For example, if text1 contains "bob" and I need to it be inputted as "name={bob}"How can I insert the text to the first part? Secondly, what about multiple text boxes into one like, like text1="Bob" and text2="27" therefore "name={bob, 27}"

Thanks,
John
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 02:41AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month