Re: AllScreen
- From: "Lloyd Dupont" <net.galador@ld>
- Date: Fri, 15 Dec 2006 09:16:51 +1000
What language is this??
Is this Managed C++ 1.0? (as opposed to ManagedC++ 2.0) I don't know it's
syntax well, so I could only guess.
But I would bet that
"using System.Windows.Forms;" is wrong, it should (probably be) "using
namespace System::Windows::Forms;"
" Screen [] screens = Screen.AllScreens;" is wrong, it should probably be "
array<Screen*>* screens = Screen::AllScreens;"
etc...
you should read the Managed C++ 1.0 documentation to learn the proper syntax
or ask the managed C++ group (there are probably some peoply who used the
old syntax and might answer your questions)
"jainharsh" <jain.personal@xxxxxxxxx> wrote in message
news:1166120911.283127.172090@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi
This is the part of my code...
.... Code.....
...
...
#ifdef SIMWIN
using System.Windows.Forms;
#endif
void screeninfo(void)
{
int num_screens;
int i = 0;
int j = 0;
int cord=0;
int width,height;
char pstr[10];
Symbol *s;
#ifdef DEBUG
printf ("screeninfo\n");
#endif
#ifndef SIMWIN
...........Code for Unix
#else
int upperBound;
Screen [] screens = Screen.AllScreens;
upperBound = screens.GetUpperBound(0);
s = (Symbol *) emalloc(sizeof(Symbol));
s->type = ARRAY;
SetArrayClass(s);
s->memory_size = 1;
s->u.sym = (Symbol **)ecalloc(1, sizeof(Symbol *));
j = num_screens;
#endif
s->num_elements =j;
PushSymbol(s);
}
and I am getting this error now:
c:\harshwork\com\src\simmacro\code.c(9572): error C2059: syntax error :
'.'
c:\harshwork\com\src\simmacro\code.c(9572): error C2143: syntax error :
missing ';' before '.'
c:\harshwork\com\src\simmacro\code.c(9572): error C2873: 'System' :
symbol cannot be used in a using-declaration
c:\harshwork\com\src\simmacro\code.c(9641): error C2059: syntax error :
']'
c:\harshwork\com\src\simmacro\code.c(9641): error C2065: 'Screen' :
undeclared identifier
c:\harshwork\com\src\simmacro\code.c(9642): error C2065: 'screens' :
undeclared identifier
c:\harshwork\com\src\simmacro\code.c(9642): error C2228: left of
'.GetUpperBound' must have class/struct/union type
type is ''unknown-type''
am i doing something wrong?
Jakob Christensen wrote:
Did you create a reference to System.Windows.Forms and put a using
statement
at the top:
using System.Windows.Forms;
HTH, Jakob.
--
http://www.dotninjas.dk
"jainharsh" wrote:
Hi Guyz,
I am trying to get the number of screens and its resolution in windows.
When I do this...
Screen [] screens = Screen.AllScreens;
upperBound = screens.GetUpperBound(0);
I get this error:
error C2059: syntax error : ']'
error C2065: 'Screen' : undeclared identifier
error C2065: 'screens' : undeclared identifier
error C2228: left of '.GetUpperBound' must have class/struct/union type
Any help would be appreciated...
Thanks,
Harsh
.
- References:
- AllScreen
- From: jainharsh
- Re: AllScreen
- From: jainharsh
- AllScreen
- Prev by Date: find dialog box
- Next by Date: RE: Publishing Multilanguage Resources
- Previous by thread: Re: AllScreen
- Next by thread: Using Variables to assign a value to a textbox
- Index(es):
Relevant Pages
|