Solved

visual basic errors from MS sample

Posted on 2013-10-23
2
1,144 Views
Last Modified: 2013-10-23
Hi,

It's been quite a while since I worked with Visual Basic, and so I'm running into errors just trying to build a simple MS application using these instructions:  http://support.microsoft.com/kb/74861
I created the project as a Windows Forms Application.
Sub Form_Load ()
      'This procedure will start the VB source application.
      z% = Shell("SOURCE", 1)
      z% = DoEvents()   'Causes Windows to finish processing Shell command.
      Text1.LinkMode = NONE   'Clears DDE link if it already exists.
      Text1.LinkTopic = "Source|Form1"   'Sets up link with VB source.
      Text1.LinkItem = "Text1"           'Set link to text box on source.
      Text1.LinkMode = MANUAL            'Establish a manual DDE link.
      ManualLink.Value = TRUE            'Sets appropriate option button.
   End Sub

Open in new window

Other than my form being called Form1, I didn't change anything. However, I already get these errors:
Error	1	'z' is not declared. It may be inaccessible due to its protection level.	D:\Development\VB\MyDDE-VBtest\MyDDE-VBtest\Form1.vb	16	9	MyDDE-VBtest
Error	2	'z' is not declared. It may be inaccessible due to its protection level.	D:\Development\VB\MyDDE-VBtest\MyDDE-VBtest\Form1.vb	18	9	MyDDE-VBtest
Error	3	'DoEvents' is not declared. It may be inaccessible due to its protection level.	D:\Development\VB\MyDDE-VBtest\MyDDE-VBtest\Form1.vb	18	14	MyDDE-VBtest
Error	4	'LinkMode' is not a member of 'System.Windows.Forms.TextBox'.	D:\Development\VB\MyDDE-VBtest\MyDDE-VBtest\Form1.vb	20	9	MyDDE-VBtest
Error	5	'LinkTopic' is not a member of 'System.Windows.Forms.TextBox'.	D:\Development\VB\MyDDE-VBtest\MyDDE-VBtest\Form1.vb	22	9	MyDDE-VBtest
Error	6	'LinkItem' is not a member of 'System.Windows.Forms.TextBox'.	D:\Development\VB\MyDDE-VBtest\MyDDE-VBtest\Form1.vb	23	9	MyDDE-VBtest
Error	7	'LinkMode' is not a member of 'System.Windows.Forms.TextBox'.	D:\Development\VB\MyDDE-VBtest\MyDDE-VBtest\Form1.vb	24	9	MyDDE-VBtest
Error	8	'Value' is not a member of 'System.Windows.Forms.RadioButton'.	D:\Development\VB\MyDDE-VBtest\MyDDE-VBtest\Form1.vb	25	9	MyDDE-VBtest

Open in new window

Can anyone tell me what's going on here?  Is there a secret to building sample code from MS?  Unfortunately the article doesn't say anything about any additional references or libraries or anything that I need to add.

How do I fix this?

Thanks!

P.S. I'm using Visual Studio 2010 on Win 7. I have admin privileges.
0
Comment
Question by:ugeb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 63

Accepted Solution

by:
Fernando Soto earned 500 total points
ID: 39596088
Hi ugeb;

The link you posted is for Visual Basic prior to Visual Basic .Net. That code is not supported in the newer Visual Studio 2010 but will only compile under Visual Basic 6 or earlier.

Please see the following link for information on DDE and .Net Framework.
Using DDE in .NET to Communicate with WinWedge
0
 
LVL 11

Author Closing Comment

by:ugeb
ID: 39596330
Fantastic, thank you for the DDE .net link, it's exactly what I've been searching for!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question