473,386 Members | 1,758 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,386 software developers and data experts.

please help me debug

33
please can somebody help me debug this code. i wrote a code that will display a form within an interval but the is generating alot of errors. the code is as shown below. (am using visual basic.Net).

The timer code is coming from the splash and the form (mainForm) has already been designed.


Expand|Select|Wrap|Line Numbers
  1. Dim myTimer As New System.Timers.Timer
  2. myTimer.Enabled = True
  3. myTimer.Interval = 70
  4. Me.Close()
  5. mainForm.Show()
the errors generated are as shown below

1. variable 'cancelButton' conflicts with property 'cancelButton' in the base class 'Form' and so should be declared 'Shadows'.
2. variable 'cancelButton' conflicts with property 'cancelButton' in the base class 'Form' and so should be declared 'Shadows'.
3. variable 'cancelButton' conflicts with property 'cancelButton' in the base class 'Form' and so should be declared 'Shadows'.
4. Reference to a non-shared member requires an object reference.
5. variable 'cancelButton' conflicts with property 'cancelButton' in the base class 'Form' and so should be declared 'Shadows'.
Jun 18 '07 #1
1 1582
nateraaaa
663 Expert 512MB
please can somebody help me debug this code. i wrote a code that will display a form within an interval but the is generating alot of errors. the code is as shown below. (am using visual basic.Net).

The timer code is coming from the splash and the form (mainForm) has already been designed.


Expand|Select|Wrap|Line Numbers
  1. Dim myTimer As New System.Timers.Timer
  2. myTimer.Enabled = True
  3. myTimer.Interval = 70
  4. Me.Close()
  5. mainForm.Show()
the errors generated are as shown below

1. variable 'cancelButton' conflicts with property 'cancelButton' in the base class 'Form' and so should be declared 'Shadows'.
2. variable 'cancelButton' conflicts with property 'cancelButton' in the base class 'Form' and so should be declared 'Shadows'.
3. variable 'cancelButton' conflicts with property 'cancelButton' in the base class 'Form' and so should be declared 'Shadows'.
4. Reference to a non-shared member requires an object reference.
5. variable 'cancelButton' conflicts with property 'cancelButton' in the base class 'Form' and so should be declared 'Shadows'.
Based on the limited information that you have provided my guess is that you declared a variable named cancelButton but also have a button named cancelButton. You should try using a different variable name or change your button id to btnCancel.

Nathan
Jun 18 '07 #2

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

Similar topics

4
by: Lloyd Sheen | last post by:
So MS where is the error that is reported on last line, says 1 failed. No indication as to what failed. VS 2003, (reinstalled more times than should have been). ------ Build started: Project:...
3
by: Mahmood Ahmad | last post by:
Hello, I have written a program that reads three types of records, validates them acording to certain requirements and writes the valid records into a binary file. The invalid records are...
4
by: pshindle | last post by:
DB2 Team - I just downloaded and unzipped the new Fixpack 9 for DB2 ESE V8 for Windows (FP9_WR21350_ESE.exe). I then burned the unzipped Fixpack files to a CD. I proceded to install this...
10
by: darren | last post by:
hi iam righting aprogram that creates its own desktop shotcut and a want to add a command line switch so i want to have a string like this "C:\Documents and Settings\Darren\My Documents\Visual...
2
by: Claire Streb | last post by:
Dear Microsoft, You make some great products, really, but I have a request: Please stop taking away functionality from your users. 1) In Visual Studio 6, we had two output folders, Debug and...
4
by: Pete H | last post by:
I would like to have my new C++ projects start out with two configurations, UnicodeDebug and UnicodeRelease, instead of the standard Debug and Release configurations that Visual Studio always...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
4
by: Warren Sirota | last post by:
Hi, Please let me know if I am interpreting this correctly. I've done a little testing of the difference between passing parameters byVal and byRef, and the results were slightly non-intuitive,...
36
by: Cap'n Ahab | last post by:
I have used VB3 - VB6, so learning all this OO stuff is reasonably new to me (although I looked at Java a few years ago). Anyway, I thought I would write a small class to begin with, with a...
61
by: warint | last post by:
My lecturer gave us an assignment. He has a very "mature" way of teaching in that he doesn't care whether people show up, whether they do the assignments, or whether they copy other people's work....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.