Solved

visual basic errors from MS sample

Posted on 2013-10-23
2
1,138 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

726 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