Link to home
Start Free TrialLog in
Avatar of ugeb
ugebFlag for United States of America

asked on

visual basic errors from MS sample

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.
ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ugeb

ASKER

Fantastic, thank you for the DDE .net link, it's exactly what I've been searching for!