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

Referencing a Form(.NET)?

Hi, I created a Form and need a pointer to it so that I can reuse it again
and again instead of recreating it all the time.. something like this...

Form1.h

// .... snipped for brevity

#include "Form2.h"

// class def ... snip

Form2 *Preferences;

Preferences = new Form2();
Preferences->Parent = this;
Preferences->Show();
// ERROR

There is indeed a Form2 and it is found, no errors in the including of it.
Form2 is a .NET created form using the wizard. Nothing is done to it yet, no
controls etc... but I cannot reference Form2* Preferences nor create a Form2
with that pointer.

I get an unrecognized error... not sure what this is...

This should be programming 101, but for some strange reason.
Nov 17 '05 #1
1 876
Can you type or paste the error ?

"Lynn Morrison" <Cranky@__whisp.com> wrote in message
news:u1**************@TK2MSFTNGP09.phx.gbl...
Hi, I created a Form and need a pointer to it so that I can reuse it again
and again instead of recreating it all the time.. something like this...

Form1.h

// .... snipped for brevity

#include "Form2.h"

// class def ... snip

Form2 *Preferences;

Preferences = new Form2();
Preferences->Parent = this;
Preferences->Show();
// ERROR

There is indeed a Form2 and it is found, no errors in the including of it.
Form2 is a .NET created form using the wizard. Nothing is done to it yet, no controls etc... but I cannot reference Form2* Preferences nor create a Form2 with that pointer.

I get an unrecognized error... not sure what this is...

This should be programming 101, but for some strange reason.

Nov 17 '05 #2

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

Similar topics

3
by: Rea Peleg | last post by:
Hello I'd like to use .NET framework namespaces in client side java script. For example i'd like to import System.Activator, in order to call Activator.CreateInstance() method inside a client side...
2
by: SSRoy | last post by:
Hi all, The type library is an important file for COM interop, without which unmanaged code can't interact with managed code. When I use .NET 2003, I can sucessfully generate .tlb file from a .NET...
4
by: Tim Mavers | last post by:
I am having a problem that I swore I read about a long time ago and it was a ..NET service-pack/hotfix bug. The problem right now is that whenever I try to postback on form, it simply does...
5
by: Jerry | last post by:
In ASP (pre .NET) I referenced components by MyObj = Server.CreateObject("DllName.Classname") In .NET, I know that to reference the Sql namespace I use <%@ Import...
0
by: Shilpa | last post by:
Hi, I have an excel file with Macros. The macros are written in VB 6. I want to include a .Net Remoting Services Project. The following namespaces are referenced by the .Net project System...
0
by: martin.bonneville | last post by:
Hi, I have a .Net Form. When I call the ShowDialog from unmanaged code (C++ compiled in VS2005 /clr), the dialog don't appear... it seem to be behind the main window. If I change the...
0
by: nareshkumarhk | last post by:
hai all, i would like to have a help here. How to drag and drop data from contols in atlas. the senario is: i want to drag and drop the containing values in the listbox1 to listbox2 how to...
0
by: PaulR | last post by:
Hi, I have a project containing all of my Domain object classes. I have another project containing my Crystal Reports. I cannot seem to reference my Domain objects on my Crystal...
2
by: riyasath | last post by:
Hi I have a windows form with 2 textbox ,3 combobox. i want to write a progrma in such a way when i run the form it must give a message box saying " the form has 2 textbox control and 3 combobox...
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: 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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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...

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.