• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 182
  • Last Modified:

Calling a void from another windows form.

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
Po_24
Asked:
Po_24
1 Solution
 
Svetlin_PanayotovCommented:
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now