Click here to Skip to main content
15,921,622 members
Home / Discussions / C#
   

C#

 
Questionrecognising db errors Pin
honeyman_can2-Oct-06 0:43
honeyman_can2-Oct-06 0:43 
AnswerRe: recognising db errors Pin
Colin Angus Mackay2-Oct-06 2:06
Colin Angus Mackay2-Oct-06 2:06 
QuestionIntegrate C and C# Codes Pin
Cassiopeiaxy2-Oct-06 0:31
Cassiopeiaxy2-Oct-06 0:31 
AnswerRe: Integrate C and C# Codes Pin
User 66582-Oct-06 2:13
User 66582-Oct-06 2:13 
GeneralRe: Integrate C and C# Codes Pin
Cassiopeiaxy2-Oct-06 21:28
Cassiopeiaxy2-Oct-06 21:28 
GeneralRe: Integrate C and C# Codes Pin
User 66583-Oct-06 0:43
User 66583-Oct-06 0:43 
AnswerRe: Integrate C and C# Codes Pin
Hamid_RT2-Oct-06 9:35
Hamid_RT2-Oct-06 9:35 
GeneralRe: Integrate C and C# Codes Pin
Cassiopeiaxy2-Oct-06 21:22
Cassiopeiaxy2-Oct-06 21:22 
Hi,
I find out that we can use the user32.dll to control the cursor. Do you
happen to know the difference between using the user32.dll and ::Cursor::Position?

Do you think it is easier if i convert my c coding to c++ using the ::Cursor::Position or should i try to use the user32.dll with the c coding?


I try to create a new C++ file with the following codes:

SAMPLE CODING:

#pragma once

namespace yg {

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;


public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}

protected:
///
/// Clean up any resources being used.
///

~Form1()
{
if (components)
{
delete components;
}
}

private:
///
/// Required designer variable.
///

System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

void InitializeComponent(void)
{
this->components = gcnew System::ComponentModel::Container();
this->Size = System::Drawing::Size(300,300);
this->Text = L"Form1";
this->Padding = System::Windows::Forms::Padding(0);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
}
#pragma endregion
};

void MoveCursor()
{
::Cursor::Position = Point(::Cursor::Position.X - 50,::Cursor::Position.Y - 50);
}

}


Errors Encountered:
error C3083: 'Cursor': the symbol to the left of a '::' must be a type c:\projects\yp\yg\yg\Form1.h 70
error C2039: 'Position' : is not a member of '`global namespace'' c:\projects\yp\yg\yg\Form1.h 70
error C2065: 'Position' : undeclared identifier c:\projects\yp\yg\yg\Form1.h 70
error C3083: 'Cursor': the symbol to the left of a '::' must be a type c:\projects\yp\yg\yg\Form1.h 70
error C2228: left of '.X' must have class/struct/union c:\projects\yp\yg\yg\Form1.h 70
error C3083: 'Cursor': the symbol to the left of a '::' must be a type c:\projects\yp\yg\yg\Form1.h 70
error C2228: left of '.Y' must have class/struct/union c:\projects\yp\yg\yg\Form1.h 70


Sorry for the trouble
Thanks alot

Jas
GeneralRe: Integrate C and C# Codes Pin
Hamid_RT3-Oct-06 1:07
Hamid_RT3-Oct-06 1:07 
QuestionHow to ... ? work with MS Excel Pin
Vasya - dragon1-Oct-06 22:42
Vasya - dragon1-Oct-06 22:42 
QuestionDatabase question, Smart PC, SQL Mobile,C# Pin
latso21-Oct-06 21:04
latso21-Oct-06 21:04 
Questionregistry values Pin
rzvme1-Oct-06 21:00
rzvme1-Oct-06 21:00 
AnswerRe: registry values Pin
Stefan Troschuetz1-Oct-06 21:10
Stefan Troschuetz1-Oct-06 21:10 
AnswerRe: registry values Pin
JacquesDP1-Oct-06 22:01
JacquesDP1-Oct-06 22:01 
QuestionPrint an html document Pin
Support1231-Oct-06 20:48
Support1231-Oct-06 20:48 
QuestionError : "current item cannot be removed from the list because there is no current item." Pin
Nadia Monalisa1-Oct-06 20:33
Nadia Monalisa1-Oct-06 20:33 
AnswerRe: Error : "current item cannot be removed from the list because there is no current item." Pin
LongRange.Shooter3-Oct-06 8:01
LongRange.Shooter3-Oct-06 8:01 
QuestionHow to play a sound from my program Pin
CodeItWell1-Oct-06 20:29
CodeItWell1-Oct-06 20:29 
AnswerRe: How to play a sound from my program [modified] Pin
Nadia Monalisa1-Oct-06 20:35
Nadia Monalisa1-Oct-06 20:35 
AnswerRe: How to play a sound from my program Pin
Corinna John1-Oct-06 20:50
Corinna John1-Oct-06 20:50 
GeneralRe: How to play a sound from my program Pin
CodeItWell1-Oct-06 23:02
CodeItWell1-Oct-06 23:02 
GeneralRe: How to play a sound from my program Pin
Christian Graus1-Oct-06 23:35
protectorChristian Graus1-Oct-06 23:35 
GeneralRe: How to play a sound from my program Pin
Corinna John2-Oct-06 1:07
Corinna John2-Oct-06 1:07 
AnswerRe: How to play a sound from my program Pin
Hamid_RT2-Oct-06 9:36
Hamid_RT2-Oct-06 9:36 
QuestionHow to use crystal reprts XI in vs2005 ? Pin
hdv2121-Oct-06 20:09
hdv2121-Oct-06 20:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.