|
Hi,
Check out JNI (Java Native Interface) for this.
|
|
|
|
|
hi everybody.I am newbie in managed c++.I have few questions for you.how do i send data to serial port with using event handler. Before sending the data, do I need to create an object class for serial port or is it already in windows library.I mean in .NET 2005 with framework 2.0 there is a namespace System::IO::Port but I use framework 1.1 with .net 2003 and i haven`t find something like that.
I post what I write below without comments sorry about it
Moreover when the mouse cursor is in the panel coordinates cpu usage rises 100% what should i do to decrease that usage
thanks a lot for your help
Note: Sorry about my pour english
public __gc class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitForm();
InitializeComponent();
MouseWheel+=new MouseEventHandler(this,Wheeled);
panel1->MouseUp += newMouseEventHandler(this,Joystick_MouseUp);
panel1->MouseMove += new MouseEventHandler(this,Joystick_MouseMove);
panel1->MouseDown += new MouseEventHandler(this,Joystick_MouseDown);
this->panel1->SetStyle( ControlStyles::AllPaintingInWmPaint, true);
this->panel1->SetStyle( ControlStyles::DoubleBuffer, true );
}
protected:
void Dispose(Boolean disposing)
{
if (disposing && components)
{
components->Dispose();
}
__super::Dispose(disposing);
}
private: System::Windows::Forms::Panel * panel1;
private: System::Windows::Forms::Label * label1;
private: System::Windows::Forms::Button * button1;
private: System::Windows::Forms::Button * button2;
private: System::Windows::Forms::Button * button3;
private: System::Windows::Forms::Button * button4;
private: System::Windows::Forms::Button * button5;
private: System::Windows::Forms::Button * button6;
private: System::Windows::Forms::Button * button7;
private: System::Windows::Forms::Button * button8;
private: System::Windows::Forms::Button * button9;
private: System::Windows::Forms::Button * button10;
private: System::Windows::Forms::Button * button11;
private: System::Windows::Forms::Button * button12;
private: System::Windows::Forms::Button * button13;
private: System::Windows::Forms::Button * button14;
private: System::Windows::Forms::Button * button15;
private: System::Windows::Forms::Button * button16;
private: System::Windows::Forms::Button * button17;
private: System::Windows::Forms::OpenFileDialog * openFileDialog1;
private: System::Windows::Forms::VScrollBar * vScrollBar1;
private: System::Windows::Forms::TextBox * textBox1;
private: static int x=40;//x degeri
private: static int y=88;//y degeri
private: double diameter;
private: Pen* rubberband;
private: Graphics* g;
private: Point offset;
private: LineCap endCap;
private: bool mouseLock;
private: bool mouseDown;
private: double magnitude;
private: int radius;
private: SolidBrush* insideColor;
private: Point cursorLocation;
private:
///
/// Required designer variable.
///
System::ComponentModel::Container * components;
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
void InitializeComponent(void)
{
System::Resources::ResourceManager * resources = new System::Resources::ResourceManager(__typeof(HaloControl::Form1));
this->panel1 = new System::Windows::Forms::Panel();
this->label1 = new System::Windows::Forms::Label();
this->button1 = new System::Windows::Forms::Button();
this->button2 = new System::Windows::Forms::Button();
this->button3 = new System::Windows::Forms::Button();
this->button5 = new System::Windows::Forms::Button();
this->vScrollBar1 = new System::Windows::Forms::VScrollBar();
this->textBox1 = new System::Windows::Forms::TextBox();
this->button6 = new System::Windows::Forms::Button();
this->button7 = new System::Windows::Forms::Button();
this->button8 = new System::Windows::Forms::Button();
this->button9 = new System::Windows::Forms::Button();
this->button10 = new System::Windows::Forms::Button();
this->button11 = new System::Windows::Forms::Button();
this->button12 = new System::Windows::Forms::Button();
this->button13 = new System::Windows::Forms::Button();
this->button14 = new System::Windows::Forms::Button();
this->button15 = new System::Windows::Forms::Button();
this->button16 = new System::Windows::Forms::Button();
this->button17 = new System::Windows::Forms::Button();
this->openFileDialog1 = new System::Windows::Forms::OpenFileDialog();
this->SuspendLayout();
//
// panel1
//
this->panel1->BackColor = System::Drawing::SystemColors::Desktop;
this->panel1->Cursor = System::Windows::Forms::Cursors::Cross;
this->panel1->Location = System::Drawing::Point(272, 136);
this->panel1->Name = S"panel1";
this->panel1->Size = System::Drawing::Size(160, 160);
this->panel1->TabIndex = 0;
this->panel1->Paint += new System::Windows::Forms::PaintEventHandler(this, panel1_Paint);
//
// label1
//
this->label1->BackColor = System::Drawing::SystemColors::Desktop;
this->label1->Image = (__try_cast<system::drawing::image *="">(resources->GetObject(S"label1.Image")));
this->label1->Location = System::Drawing::Point(16, 16);
this->label1->Name = S"label1";
this->label1->Size = System::Drawing::Size(152, 64);
this->label1->TabIndex = 1;
//
// button1
//
this->button1->BackColor = System::Drawing::SystemColors::Desktop;
this->button1->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button1.BackgroundImage")));
this->button1->Cursor = System::Windows::Forms::Cursors::PanWest;
this->button1->Location = System::Drawing::Point(224, 208);
this->button1->Name = S"button1";
this->button1->Size = System::Drawing::Size(40, 25);
this->button1->TabIndex = 2;
this->button1->Click += new System::EventHandler(this, button1_Click);
//
// button2
//
this->button2->BackColor = System::Drawing::SystemColors::Desktop;
this->button2->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button2.BackgroundImage")));
this->button2->Cursor = System::Windows::Forms::Cursors::PanEast;
this->button2->Location = System::Drawing::Point(440, 208);
this->button2->Name = S"button2";
this->button2->Size = System::Drawing::Size(40, 25);
this->button2->TabIndex = 3;
//
// button3
//
this->button3->BackColor = System::Drawing::SystemColors::Desktop;
this->button3->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button3.BackgroundImage")));
this->button3->Cursor = System::Windows::Forms::Cursors::PanNorth;
this->button3->Location = System::Drawing::Point(336, 88);
this->button3->Name = S"button3";
this->button3->Size = System::Drawing::Size(25, 40);
this->button3->TabIndex = 4;
//
// button5
//
this->button5->BackColor = System::Drawing::SystemColors::Desktop;
this->button5->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button5.BackgroundImage")));
this->button5->Cursor = System::Windows::Forms::Cursors::PanSouth;
this->button5->Location = System::Drawing::Point(336, 304);
this->button5->Name = S"button5";
this->button5->Size = System::Drawing::Size(25, 40);
this->button5->TabIndex = 11;
//
// vScrollBar1
//
this->vScrollBar1->BackColor = System::Drawing::SystemColors::Desktop;
this->vScrollBar1->Location = System::Drawing::Point(512, 160);
this->vScrollBar1->Maximum = 40;
this->vScrollBar1->Name = S"vScrollBar1";
this->vScrollBar1->Size = System::Drawing::Size(24, 112);
this->vScrollBar1->TabIndex = 7;
this->vScrollBar1->Value = 20;
this->vScrollBar1->Scroll += new System::Windows::Forms::ScrollEventHandler(this, vScrollBar1_Scroll);
//
// textBox1
//
this->textBox1->BackColor = System::Drawing::SystemColors::InactiveCaptionText;
this->textBox1->Location = System::Drawing::Point(32, 216);
this->textBox1->Name = S"textBox1";
this->textBox1->Size = System::Drawing::Size(176, 20);
this->textBox1->TabIndex = 9;
this->textBox1->Text = S"textBox1";
//
// button6
//
this->button6->BackColor = System::Drawing::SystemColors::Desktop;
this->button6->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button6.BackgroundImage")));
this->button6->Cursor = System::Windows::Forms::Cursors::Default;
this->button6->Location = System::Drawing::Point(624, 152);
this->button6->Name = S"button6";
this->button6->Size = System::Drawing::Size(40, 25);
this->button6->TabIndex = 12;
//
// button7
//
this->button7->BackColor = System::Drawing::SystemColors::Desktop;
this->button7->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button7.BackgroundImage")));
this->button7->Cursor = System::Windows::Forms::Cursors::Default;
this->button7->Location = System::Drawing::Point(680, 152);
this->button7->Name = S"button7";
this->button7->Size = System::Drawing::Size(40, 25);
this->button7->TabIndex = 13;
//
// button8
//
this->button8->BackColor = System::Drawing::SystemColors::Desktop;
this->button8->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button8.BackgroundImage")));
this->button8->Cursor = System::Windows::Forms::Cursors::Default;
this->button8->Location = System::Drawing::Point(568, 272);
this->button8->Name = S"button8";
this->button8->Size = System::Drawing::Size(40, 25);
this->button8->TabIndex = 14;
//
// button9
//
this->button9->BackColor = System::Drawing::SystemColors::Desktop;
this->button9->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button9.BackgroundImage")));
this->button9->Cursor = System::Windows::Forms::Cursors::Default;
this->button9->Location = System::Drawing::Point(680, 192);
this->button9->Name = S"button9";
this->button9->Size = System::Drawing::Size(40, 25);
this->button9->TabIndex = 15;
//
// button10
//
this->button10->BackColor = System::Drawing::SystemColors::Desktop;
this->button10->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button10.BackgroundImage")));
this->button10->Cursor = System::Windows::Forms::Cursors::Default;
this->button10->Location = System::Drawing::Point(624, 192);
this->button10->Name = S"button10";
this->button10->Size = System::Drawing::Size(40, 25);
this->button10->TabIndex = 4;
//
// button11
//
this->button11->BackColor = System::Drawing::SystemColors::Desktop;
this->button11->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button11.BackgroundImage")));
this->button11->Cursor = System::Windows::Forms::Cursors::Default;
this->button11->Location = System::Drawing::Point(568, 192);
this->button11->Name = S"button11";
this->button11->Size = System::Drawing::Size(40, 25);
this->button11->TabIndex = 4;
//
// button12
//
this->button12->BackColor = System::Drawing::SystemColors::Desktop;
this->button12->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button12.BackgroundImage")));
this->button12->Cursor = System::Windows::Forms::Cursors::Default;
this->button12->Location = System::Drawing::Point(568, 232);
this->button12->Name = S"button12";
this->button12->Size = System::Drawing::Size(40, 25);
this->button12->TabIndex = 16;
//
// button13
//
this->button13->BackColor = System::Drawing::SystemColors::Desktop;
this->button13->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button13.BackgroundImage")));
this->button13->Cursor = System::Windows::Forms::Cursors::Default;
this->button13->Location = System::Drawing::Point(624, 232);
this->button13->Name = S"button13";
this->button13->Size = System::Drawing::Size(40, 25);
this->button13->TabIndex = 4;
//
// button14
//
this->button14->BackColor = System::Drawing::SystemColors::Desktop;
this->button14->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button14.BackgroundImage")));
this->button14->Cursor = System::Windows::Forms::Cursors::Default;
this->button14->Location = System::Drawing::Point(680, 232);
this->button14->Name = S"button14";
this->button14->Size = System::Drawing::Size(40, 25);
this->button14->TabIndex = 4;
//
// button15
//
this->button15->BackColor = System::Drawing::SystemColors::Desktop;
this->button15->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button15.BackgroundImage")));
this->button15->Cursor = System::Windows::Forms::Cursors::Default;
this->button15->Location = System::Drawing::Point(624, 72);
this->button15->Name = S"button15";
this->button15->Size = System::Drawing::Size(96, 25);
this->button15->TabIndex = 17;
//
// button16
//
this->button16->BackColor = System::Drawing::SystemColors::Desktop;
this->button16->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button16.BackgroundImage")));
this->button16->Cursor = System::Windows::Forms::Cursors::Default;
this->button16->Location = System::Drawing::Point(624, 272);
this->button16->Name = S"button16";
this->button16->Size = System::Drawing::Size(96, 25);
this->button16->TabIndex = 18;
//
// button17
//
this->button17->BackColor = System::Drawing::SystemColors::Desktop;
this->button17->BackgroundImage = (__try_cast<system::drawing::image *="">(resources->GetObject(S"button17.BackgroundImage")));
this->button17->Cursor = System::Windows::Forms::Cursors::Default;
this->button17->Location = System::Drawing::Point(568, 152);
this->button17->Name = S"button17";
this->button17->Size = System::Drawing::Size(40, 25);
this->button17->TabIndex = 19;
//
// Form1
//
this->AutoScaleBaseSize = System::Drawing::Size(5, 13);
this->BackColor = System::Drawing::SystemColors::ControlDarkDark;
this->ClientSize = System::Drawing::Size(744, 358);
this->Controls->Add(this->button17);
this->Controls->Add(this->button16);
this->Controls->Add(this->button15);
this->Controls->Add(this->button12);
this->Controls->Add(this->button9);
this->Controls->Add(this->button8);
this->Controls->Add(this->button7);
this->Controls->Add(this->button6);
this->Controls->Add(this->textBox1);
this->Controls->Add(this->vScrollBar1);
this->Controls->Add(this->button5);
this->Controls->Add(this->button3);
this->Controls->Add(this->button2);
this->Controls->Add(this->button1);
this->Controls->Add(this->label1);
this->Controls->Add(this->panel1);
this->Controls->Add(this->button10);
this->Controls->Add(this->button11);
this->Controls->Add(this->button13);
this->Controls->Add(this->button14);
this->Font = new System::Drawing::Font(S"Franklin Gothic Book", 8.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, (System::Byte)0);
this->ForeColor = System::Drawing::SystemColors::ControlText;
this->Icon = (__try_cast<system::drawing::icon *="">(resources->GetObject(S"$this.Icon")));
this->Name = S"Form1";
this->Text = S"Form1";
this->ResumeLayout(false);
}
void InitForm()
{
//pen
this->rubberband = new Pen(Color::Blue, 5);
//point offset
//this->offset= Point(,0);
this->insideColor = new SolidBrush(Color::Thistle);
this->mouseDown = false;
this->mouseLock = false;
}
private: System::Void Joystick_MouseUp(Object* sender, MouseEventArgs* e)
{
mouseDown = false;
if(!mouseLock)
{
this->panel1->Refresh();//Invalidate();
}
}
private: System::Void Wheeled (Object *sender,MouseEventArgs* e)
{
// i will use here later
}
private: System::Void Joystick_MouseMove(Object* sender, MouseEventArgs* e)
{
//static Point offset;
offset = System::Drawing::Point(e->X,e->Y);
if(e->Button == MouseButtons::Left || e->Button == MouseButtons::Right)
{
String *text = new String("");
//text = text->Concat( S" Veli ", S" Veli" );
text = text->Concat(offset.X.ToString(), S",", offset.Y.ToString());
this->textBox1->Text = text;
}
if(mouseDown)
{
offset.X = e->X;
offset.Y = e->Y;
this->panel1->Refresh();// same as Invalidate(System::Drawing::Rectangle(0,0,160,160), false);
}
else if( !mouseLock)
{
offset.X = radius;
offset.Y = radius;
this->panel1->Refresh();
}
//this->Invalidate(System::Drawing::Rectangle(100,100,150,150), false);
}
private: System::Void Joystick_MouseDown(Object* sender, MouseEventArgs* e)
{
if(e->Button == MouseButtons::Left)
{
mouseDown = true;
mouseLock = false;
offset.X = e->X;
offset.Y = e->Y;
this->panel1->Refresh();// same as Invalidate();
}
else if(e->Button == MouseButtons::Right)
mouseLock = true;
}
/* GUI joystick (mouse stick) in panel */
private: System::Void panel1_Paint(System::Object * sender, PaintEventArgs * e)
{
this->g = e->Graphics;
GraphicsPath* serge = new GraphicsPath();
SolidBrush *sb = new SolidBrush(Color::Cornsilk);
SolidBrush *sb2= new SolidBrush(Color::Blue);
serge->AddEllipse(this->panel1->ClientRectangle);
g->FillEllipse(sb2,System::Drawing::Rectangle(0,0,160,160));
g->FillEllipse(sb,System::Drawing::Rectangle(5,5,150,150));
this->panel1->Region = new System::Drawing::Region(serge);
g->DrawLine(rubberband,offset.X,offset.Y,80,80);
// in order to solve flickering i have to use double buffering
this->SetStyle( ControlStyles::AllPaintingInWmPaint, true);
this->SetStyle( ControlStyles::UserPaint, true);
this->SetStyle( ControlStyles::DoubleBuffer, true );
}
};
}
|
|
|
|
|
In C# project I could include any file in my assembly and access them with
Assembly.GetManifestResourceStream(...)
Is it possible to do the same thing in ManagedC++ projects?
How?
|
|
|
|
|
found it:
project properties => configuration properties => linker => input => embeded managed resource file
|
|
|
|
|
Hi
I have a project where by I define a pre-processor variable entitled PROEDITION. In the project where I define this variable some .cpp files seem to understand that the variable PROEDITION has been defined. Unfortunately one of the most important .cpp files does not seem to pick up this pre-processor variable. Is there a reason why this would happen? It's not just this pre-processor variable, it could be any of them that I define at project scope. It just seems that one of my .cpp files does not understand the pre-processor variables at all.
Any help on this would be appreciated.
Dave
|
|
|
|
|
Where did you define PROEDITION?
Best,
Jun
|
|
|
|
|
I defined PROEDITION in the Pre Processor Definitions
WIN32;_DEBUG;_WINDOWS;_USRDLL;PROEDITION
That is what is in there currently.
Dave
test
|
|
|
|
|
Is the last separator a ":" or a ";"? I am asking because there is a smiley there and I am not sure if this forum uses (thats a test - Semicolon P) as a smiley or :P (another test - Colon P) or maybe both.
Edit: OK. It uses both.
Worth a try, though.
*Test ends*
|
|
|
|
|
Is there a possible redefinition / undef of the same variable in that .cpp file ?
Darka [Xanya]
|
|
|
|
|
no unfortunately not.. It just seems to be ignoring anything that I put in as a preprocessor variable.
|
|
|
|
|
bugger, i suppose you've checked spelling, etc.
Darka [Xanya]
|
|
|
|
|
Yeah, it's the wierdest thing. I mean it uses precompiled headers via stdafx.h
I am not sure why this is not working. The other thing that is sort of unique is that the MIDL compiler has a preprocessor variable as well. I don't think that should matter though, but I am pretty sure that is rare.
The IDL is compiling correctly though with the preprocessor doing what it should.
|
|
|
|
|
Can anyone tell me how can I overcome the following error:
Error 39 error C2440: '=' : cannot convert from 'void *' to 'System::Data::DataColumn ^'
Here is the code which is generating error:
CPtrList* MYpclFields; // this is working fine
POSITION MYposField; // is having the right value
DataColumn^ pColumnInfo; // System::Data::DataColumn object
...
...
...
pColumnInfo = MYpclFields->GetNext (MYposField); // error lies here
actually GetNext() fn. returns a (void *) and I want to convert that into (DataColumn^).
Plz...
Thanks...
|
|
|
|
|
Handle (^) and pointer (*) are not castable. The former is managed; the latter is unmanaged.
Best,
Jun
|
|
|
|
|
What should I do to get rid of it?
I need to convert void* to System::Data::DataColumn^
It's very important.
-- modified at 8:32 Thursday 13th July, 2006
Eariler I converted managed (^) to unmanaged (*)
pclFields->AddTail ((void *) pclFieldInfo);
Where pclFiledInfo is of type DataColumn^ and it's working perfectly fine.
|
|
|
|
|
Handle(^) walks through the managed heap, while pointer(*) walks through the unmanaged heap. They don't see eye to eye.
arvindbhateja wrote: I need to convert void* to System::Data::DataColumn^
You can't.
arvindbhateja wrote: Eariler I converted managed (^) to unmanaged (*)
pclFields->AddTail ((void *) pclFieldInfo);
This is wrong. By doing so, you may have corrupted GC (garbage collection) on the managed heap. On the other hand, the managed C++ provides a mechanism to pin an object on the managed heap. The pinning is a process to temporarily keep the contant address of an object on the managed heap. Here is some sample code extracted from the C++/CLI spec:
void f(int* p) { *p = 100; }
int main() {
array<int>^ arr = gcnew array<int>(100);
pin_ptr<int> pinp = &arr[0];
f(pinp);
}
You could consider this as a temporary "conversion" from managed to unmanaged. But I'm not aware of any "conversion" in the reverse direction.
Best,
Jun
|
|
|
|
|
Thanks for the response.
Is there any alternate to CPtrList which I can use in C++/CLI?
|
|
|
|
|
Yes, there are a whole bunch of collection tyeps you can choose from: link.
Best,
Jun
|
|
|
|
|
Thanks for replying.
If I don't get a solution then I'll have to rewrite a very big logic. Actually I'm migrating an application from VC6 to VC8.
|
|
|
|
|
Hopefully, you don't need to write much logic. CPtrList is just a pointer list (MFC class). It can be easily replaced by a simple list (.NET class), which stores a pointer to a node.
Best,
Jun
|
|
|
|
|
Thanks for helping me so much.
Can u tell me just one more thing - What is the alternate to CMapStringToOb MFC class in C++/CLI. Plz can u suggest me what should I do to write the code in C++/CLI for the code shown below:
<br />
int nCount = clRecSet.GetFieldCount();<br />
CDaoFieldInfo* pclFieldInfo;
CMapStringToOb clTables;
CPtrList* pclFields = NULL;
<br />
for (int ii = 0; ii < nCount; ii++)<br />
{<br />
pclFieldInfo = new CDaoFieldInfo;<br />
clRecSet.GetFieldInfo(ii, *pclFieldInfo, AFX_DAO_SECONDARY_INFO);<br />
if (clTables.Lookup (pclFieldInfo->m_strSourceTable, <br />
(CObject*&) pclFields) != TRUE )<br />
{<br />
pclFields = new CPtrList;<br />
clTables.SetAt (pclFieldInfo->m_strSourceTable, pclFields);<br />
}<br />
pclFields->AddTail ((void *) pclFieldInfo);<br />
}<br />
...<br />
...<br />
<br />
POSITION pos = clTables.GetStartPosition();<br />
while (pos != NULL)<br />
{<br />
pclFields = NULL;<br />
CPtrList* pclFields;<br />
CDaoFieldInfo* pFieldInfo;
<br />
clTables.GetNextAssoc (pos, strCurrTbl, (CObject*&) pclFields);<br />
POSITION posField = pclFields->GetHeadPosition();<br />
int nIndex = 0;
while (posField != NULL)<br />
{<br />
pFieldInfo = (CDaoFieldInfo *) pclFields->GetNext (posField);<br />
<br />
.....<br />
<br />
In the the above code I can replace :
CMapStringToOb -> ?
CPtrList -> ArrayList
CDaoFieldInfo -> DataColumn (Problem with fetching the database table name not the table name which comes from dataset object)
In DataColumn I can't get the name of the table, the column actually belongs to as we can do in CDaoFieldInfo::m_strSourceTable. Actually I've to map the name of the table with it's corresponding column and put that into a CMapStringToOb object.
|
|
|
|
|
CMapStringToOb doesn't seem to have a counterpart in .NET collection classes. It looks you have some work to do.
Best,
Jun
|
|
|
|
|
in VC++.Net I have drawn a Rectangle on the form.
My task is ,when i keep the cursor on Rectangle and (move the Mouse + Mouse Left Button Down) it should move accordingly.
Suggest me..
Thanks In Advance
Bye....
Nagaraju
-- modified at 7:58 Thursday 13th July, 2006
|
|
|
|
|
You should handle some of the mouse events such as MouseEnter, MouseDown, MouseUp, MouseMove and MouseLeave.
Best,
Jun
|
|
|
|
|
that is not my problem.
I have drawn Rectangle On the Form Using Graphics Class.
My code is
Graphics ^gr=this->CreateGraphics();
gr->DrawRectangle(gcnew Pen(Color::Black),90,50,60,60);
and when I keep the mouse on drawn Rectangle
MouseMove+LeftClickMOuse ,the rectangle should move accordingly
plz suggest me
Nagaraju
|
|
|
|
|