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

Application.OpenForms

FrameWork 2

Hi.

Can anyone say how I prevent the error: "'Function' is not a member of
'System.Windows.Forms.Form'".

I have a form where I have many public functions created for me. The user
will can open 'x' forms(the same form.) and I'm accessing this forms with
the new function "OpenForms".
I named the forms: "MyForm_" & i.tostring.
But when I try put my function is returned the error.
The code:
' Here I open the forms.

Dim i As Integer = 0
Dim _frmMensagens(2) As FrmMensagens

For i = 0 To 2
_frmMensagens(i) = New FrmMensagens
QtdeFormsMsgs += 1
With _frmMensagens(i)
.FormDono = Me
.Name = "TelaMensagem_" & i.ToString
.Posicao = i
.Show()
End With
Next

'Here I try to access my function in form, but is returned de error.
Dim i As Integer = 0

For i = 0 To QtdeFormsMsgs
With Application.OpenForms("TelaMensagem_" & i.ToString)
.MyFunction(Me.Left - PosicaoInicialLeft, Me.Top -
PosicaoInicialTop)
End With
Next

[]'s
Luis Gustavo
Sorry for my English
Mar 15 '06 #1
1 4233
"Luis Gustavo" <lu**********@medtech-angola.com> schrieb:
Can anyone say how I prevent the error: "'Function' is not a member of
'System.Windows.Forms.Form'".


You'll either have to turn 'Option Strict' off to use late binding to
dynamically access the member or cast the reference returned by 'OpenForms'
to the form type containing the member.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Mar 15 '06 #2

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

Similar topics

1
by: dusiapapa | last post by:
Hi everybody! I've already posted this in the "microsoft.public.dotnet.framework.windowsforms". I have windows forms application containing a lot of MDI (shown with ..Show()) and modal (shown...
3
by: c_shah | last post by:
VB 2005 and windows form application I am having difficulty putting my question into words but.. Is there a way to determine whether my win form application has focus or it is active or being...
13
by: Garry | last post by:
Why is it that my installation od vs2005 will not accept My.Application.OpenForms saying that it is not part of My.Application??? Dim frm As Form For Each frm In My.Application.OpenForms Next...
8
by: Rodrigo Juarez | last post by:
Hi I'm using Visual Studio 2005 with visual basic, developing winforms applications I'm adding try catch blocks for error handling and I want to close the application when I got an error....
3
by: vovan | last post by:
In a new WindowsForm project with default settings I wrote a loop: For Each frm In My.Application.OpenForms If frm.Name <"MDIMain" Then frm.Close() End If Next
2
by: aagarwal8 | last post by:
Hi, I have a chat application which i have created using WinForms 2.0 (C# lang). The situation i am faced with is that i need to close all the opened (chat, public chat, chat invite, chat...
4
by: =?ISO-8859-15?Q?Albe_V=B0?= | last post by:
In my Application, I need to make a certain graphical refresh, interrogating SqlServer, only if Application has focus (i.e. the title bar is blue). Interrogating .Focused property of various...
6
by: pamela fluente | last post by:
Hello friends, I have a simple question. If I have an application with several forms, you see on the windows bar, usually on the bottom of your screen, the various tags for the various forms. ...
4
by: =?Utf-8?B?Z2luYWNyZXNzZQ==?= | last post by:
I am trying to close/dispose multiple instances of a form but because they are modal and hidden, they do not show up in My.Application.OpenForms. They must be modal, so making them modeless is not...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
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,...

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.