?
Solved

Calling a void from another windows form.

Posted on 2004-08-31
3
Medium Priority
?
179 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 200 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month8 days, 21 hours left to enroll

765 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