473,699 Members | 2,488 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Invoke does not exist in the current context

Hello, I seem to be getting the following error in one class, but not
in a form. The name 'Invoke' does not exist in the current context.

The code I am trying to execute is:

Invoke(d, new object[] { text });

all my using statements are:

using System;
using System.Collecti ons.Generic;
using System.Text;
using System.Text.Reg ularExpressions ;
using System.Windows. Forms;

Any help regarding this issue would be greatly appreciated, thankyou

Sep 19 '06 #1
2 13566
Unless your class implements ISynchronizeInv oke (which all classes
deriving from Control do), you won't have the Invoke method implemented.

You need to make the call on a class that implements this interface
(anything derived from Control will do).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

<Th***********@ gmail.comwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.com...
Hello, I seem to be getting the following error in one class, but not
in a form. The name 'Invoke' does not exist in the current context.

The code I am trying to execute is:

Invoke(d, new object[] { text });

all my using statements are:

using System;
using System.Collecti ons.Generic;
using System.Text;
using System.Text.Reg ularExpressions ;
using System.Windows. Forms;

Any help regarding this issue would be greatly appreciated, thankyou

Sep 19 '06 #2
thank you Nicholas, you solved my problem.

Sep 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
23882
by: CuriousGeorge | last post by:
I've upgraded a .Net 1.1 web app to 2.0 and am having a heck of a time getting resources to work again. From what I understand if I move my strings.resx file into the App_GlobalResources folder I should magically be able to reference my strings using the syntax Resources.strings.string1. This isn't working for me. Is there something I'm missing other than moving the file itself and rebuilding? I get this error: "The type or namespace...
2
5618
by: aarepasky | last post by:
I am using ASP Web 2005 express and I have a textbox in a user control. Now when I try to use it in another user control, I get the error that it "does not exist in current context. These 2 user controls are each in a panel on the page. riprip
3
1870
by: j-in-uk | last post by:
Hi, It seems as though Profiles have replaced session variables in visual studio 2005. The Profile needs to be defined in the web.config : <anonymousIdentification enabled="true" /> <profile enabled="true"> <properties> <add name="EmpNum" defaultValue="??" allowAnonymous="true" /> </properties> </profile>
1
7502
by: Arjen | last post by:
Hi, I do this inside a repeater: <% if ((Boolean)((DataRowView)Container.DataItem) == true) { %> <%} %> I get this message: CS0103: The name 'Container' does not exist in the current context
2
9916
by: Jeff | last post by:
hey asp.net 2.0 (C'#) In the code behind file I have this method: public String AddBR(Object param) { String text = (String) param; return text; }
0
1917
by: Dave | last post by:
I have an ASPX page that I can't seem to do anything with the dropdowns. The error that I'm getting is "The name 'EmployeeDropdownList' does not exist in the current context. I have all the necessary references in place...System.Web...System.Web.UI.WebControls.... Why am I getting the context error when trying to Databind a dropdown control?
2
3063
by: =?Utf-8?B?QyNub3ZpY2U=?= | last post by:
Like my name says I am a total novice at C#. I am trying to following examples in a book that I have but unfortunately they do not provide you with code for the whole project. Up till now I could figure out what is causing my problems but now I am stuck. I added in the books code into a Windows Application: using System; using System.Collections.Generic; using System.Windows.Forms; namespace WindowsApplication1
1
2997
by: avecreep | last post by:
Hi, i was trying to find a web application and i found one open source on the internet. i put the code folders on the root folder and when i tried to acces via web browser it all worked fine ( i am using IIS). But i want to make some custom changes on the forms and some functionalites. To do so, i created my own project on Visual Studio 2005, and copied the origanal code folders to my project folder and added those existing items on visual...
6
28442
by: cbellew | last post by:
G'day, I have encontered what appears to be a common problem, but unfortunately the typical solution i have found has not worked for me. I have just copied the files from an "ASP .NET Web Site" to an "ASP .NET Web Application" because i have learned about the differences and have decided to move to the latter. I simply copied and pasted all the .aspx (with respective .aspx.cs code-behind files) and some other files such as scripts etc into...
0
8615
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9034
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8883
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7750
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6534
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5874
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4376
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3057
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2347
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.