473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Hello world, I need a "hello world"

8,435 Expert 8TB
Hi all.

I'm wondering whether the Bytes community can help me out a little.

As some of you know, I've worked with VB6 (and earlier versions) for many years, and enjoy answering questions in the VB6 forum when possible.

Sometime last year I installed Visual Studio 2012 and have been planning to learn VB.Net.

I did eventually get around to giving it a shot. Ugh! what a disaster. After hours of wracking my brain, I gave up trying to create even the simplest program. Seriously, I couldn't work out how to achieve the most basic, fundamental task in my code such as showing a form or setting a control property.

Since then, many months have gone by. I've been too busy, too lazy, and if I'm honest with myself, probably too intimidated to really try again. I realise VB.Net has all sorts of things going for it, and that there are good reasons for the major changes. But that doesn't change the fact that there's a very steep early learning curve in going from one to the other. This is made worse by a couple of factors:
  • First, the VB6 conversion tool provided with earlier .Net versions has been removed. Thanks a ton, MS. Otherwise I'd convert one of my old programs and go from there.
  • Second, the upgrade-related information I've been able to find seems entirely interested in the differences between the prior version and 2012 - not terribly helpful.
Now I have finally got hold of a very helpful-sounding book on VB6 to VB.Net upgrade, and started making my way through it. It's in PDF form, and I'm not sure of the actual name of the book, or the authors. Plus, it was written in the early .Net days so will undoubtedly leave me with quite a bit of version-specific stuff to pick up. I can live with that. I've always been a dabbler and fiddler in the programming world, and will pick up the rest - if I can just get started! So far it's just teaching me why .Net is better, why MS decided to make the break with ActiveX, philosophical differences between ActiveX and the .Net framework, and so on. And on. And on. Interesting enough if I had the time, but pretty slow going.

So here's what I'd like to ask.

Could someone here please throw together in VB.Net (latest version you have handy) a very simple "hello world" application and post it here, so I can load into VB2012 as a starting point to play with. It doesn't need to have comments, or demonstrate or explain anything. Just a simple form, with say a text box, and a button which will copy the text box contents to a label. The sort of thing I could slap together in about 30 seconds in VB6, and I assume it's just about as simple in .Net if you know what you're doing. With that as a starting point, I'll have great fun picking apart how it works and teaching myself the rest.

In fact, perhaps it could be attached to an article in the appropriate section, for the benefit of others trying to make the leap.
Jul 18 '13 #1
2 1445
Rabbit
12,516 Expert Mod 8TB
This is what I did in VS2008.
  1. Created a Windows Forms Application project.
  2. Dragged a button and label to the form.
  3. Put the following in the code.
Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2.     Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
  3.         Label1.Text = "Hello World!"
  4.     End Sub
  5. End Class
Jul 18 '13 #2
Killer42
8,435 Expert 8TB
Thanks for that, Rabbit. I'll go have a play agin.

As far as I can recall (it's been a while) some of the biggest problems I had were in trying to do things like showing another form or changing visibility of controls. Anyway, like I said I'll spend some time playing with it again.
Jul 19 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Robert Maas, see http://tinyurl.com/uh3t | last post by:
System login message says PHP is available, so I tried this: http://www.rawbw.com/~rem/HelloPlus/h.php It doesn't work at all. Browser just shows the source. What am I doing wrong?
24
by: Andy Sutorius | last post by:
Has anyone successfully created a Hello World program without using Visual Studio.NET? If so, what IDE did you use and what namespaces did you import? Thanks! Andy Sutorius
17
by: Tim Judd | last post by:
I must not be grasping anything here. Just a simple application, as follows (as any first-program is...) ---- #include <iostream.h> int main() { cout <<"hello world"; return 0;
33
by: ankursinha | last post by:
Hi, Is it possible to write a C program that prints "Hello World" on screen without having a single semi-colon in the entire program? The extra constraint here is that u r not allowed to use...
8
by: vijay | last post by:
Hello, As the subject suggests, I need to print the string in the reverse order. I made the following program: # include<stdio.h> struct llnode { char *info;
3
by: Bupkas | last post by:
using System.Windows.Forms; class MessageBoxHelloWorld { public static void Main() {
3
by: lovecreatesbeauty | last post by:
Both `K&R C, 2nd' and `C: A reference manual, 5th' introduce the "hello, world" thing using the name "string-constant". But `ISO/IEC 9899:TC2' does not include this kind of thing in section `A.1.5...
18
by: arnuld | last post by:
i compiled the "hello world" programme from K&R2: #include<stdio.h> int main() { printf("hello world\n"); }
11
by: cj | last post by:
Perhaps someone knows how to do this. When I open a new ASP.NET web service application in VS 2008, it opens with a simple Hello World web service already written. I want to see this work. ...
3
by: =?Utf-8?B?QkM=?= | last post by:
Hello, I just created a Hello World webservice in VB2005 (this is my first webservice ever). I ran it in debug mode and the page that came up said Hello World and said to change the webservice...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.