Solved

Calling a void from another windows form.

Posted on 2004-08-31
3
177 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

737 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