Solved

Calling a void from another windows form.

Posted on 2004-08-31
3
178 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

687 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