Solved

Calling a void from another windows form.

Posted on 2004-08-31
3
172 Views
Last Modified: 2010-04-24
Hi,

I'm not too familiar with Visual C++.NET but I have to build a small software. I need to call a void from another windows form.

Lets say we have form1 and form2.

form2 need to access a void from form1 (in short its a refresh void that will refresh the form1)

How I need to declare the void and how I can access it? something bad thought is that I can't use #include "form1.h" because form1 already include the form2.h, and I found that if I include the 1st in the 2nd, I get an error.

I have tried to access the void with NameSpace::form1::voidX but its said that form1 isn't a member of my namespace.



0
Comment
Question by:Po_24
3 Comments
 
LVL 6

Accepted Solution

by:
Svetlin_Panayotov earned 50 total points
ID: 11949153
Try
#include "form1.h"
#include "form2.h"
but in stdafx.h.Also if form1.h and form2.h does not start with #pragma once - add this too.

Svetlin
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now