|
I`m already doing this.. but it doesn`t work!
Doing this, I take all the pic and i what just a point of it.
How do I copy a point from a picturebox?
thanks!
cheers!
|
|
|
|
|
your post is not clear to me,..
But i will reply as i understand ur words..
i meant to get the clicked dimensioned x,y points w.r.t the pictureBox then
calculate this x,y again for the embeded piture and use DrawImage to draw the obtained small region or even pixel or point
Amr Abdel-Mohsen Hafez
Software engineer
Cairo
E g y p t
|
|
|
|
|
Hello...I have my code(algorithm) in visual studio 2005 and I want to make an interface in c# for this code. Can I load(run) my code from c++ in c# and make the connection with the interface in c#, if yes how can I do this..thanks
lavi
|
|
|
|
|
The only way to do this is to use C++/CLI so that you can write a dll which can be consumed by a different (.NET) language.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
so ....microsoft visual studio 2005 it's not good for this...?I don't now what other version of c++ I can use who can create me this dll...
lavi
|
|
|
|
|
microsoft visual studio 2005 is the ONLY compiler that allows you to write C++/CLI code.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
The only way to do this is to use C++/CLI so that you can write a dll which can be consumed by a different (.NET) language.
k...in this case which dll can I use(run) from C++ in C#, so that I can run my code(made in c++) in C#.....I don't know because it's the first time when I work with C#...sorry for my persistence...or if this dll is not yet created in c++ haw can I create it?
|
|
|
|
|
k...in this case which dll can I use(run) from C++ in C#, so that I can run my code(made in c++) in C#.....I don't know because it's the first time when I work with C#...sorry for my persistence...or if this dll is not yet created in c++ haw can I create it?
|
|
|
|
|
As CG said, you will have to create a C++ DLL that exposes your classes/interfaces. Once you have the DLL, you can consume it from your C# project.
Cheers,
Vikram.
"But nowadays, it means nothing. Features are never frozen, development keeps happening, bugs never get fixed, and documentation is something you might find on wikipedia."
- Marc Clifton on betas. Join the CP group at NationStates. Password: byalmightybob
|
|
|
|
|
ok....I understood that....but I don't know how to do this dll....can you help me...please
|
|
|
|
|
Hey guys
I am trying to create an install file for my solution. My solution has five projects, four of which are business layers and data access layers. The UI project has references to the debug dll's of the other projects and all works fine in debug mode. However when I build the setup project and run it on another computer it is still trying to reference the debug dll's rather than those installed. What am I doing wrong? I thought the setup project automatically changed these references!? I am using the setup wizard project to create the relevant files.
Thanks in advance
|
|
|
|
|
I am pretty sure that the setup project only points to the dlls you tell it to include. I am pretty sure you need to remove the old debug dlls from the setup and add the new release dlls.
Ben
|
|
|
|
|
Ben is absolutely right and just want to add one more thing make sure u have taken all resources
with the setup used by released Dlls
Cheers
Anuj
|
|
|
|
|
How to read image file ? I want read a image file, output is 3 matrix 2x2 following R G B? Help me!!!
ok
|
|
|
|
|
To read a bitmap
Bitmap bm = Bitmap.FromFile("myfile.jpg") or Bitmap bm = new Bitmap("bm.tif");
To read the RGB values, read my image processing articles on this site.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Could someone give me a link or a couple to some good articles on MFC serialization?
Thanks in advance!
Keshav Kamat
India
|
|
|
|
|
Keshav V. Kamat wrote: Could someone give me a link or a couple to some good articles on MFC serialization?
I don't know of any. But I'm sure the good folks in the C++ / MFC[^] forum would!
|
|
|
|
|
Hey guys,
I'm writing a piece of software which requires to monitor the CD Tray for discs.
<br />
foreach (DriveInfo drvInfo in DriveInfo.GetDrives())<br />
{<br />
if (drvInfo.DriveType == DriveType.CDRom)<br />
{<br />
if (drvInfo.IsReady)<br />
btnStartUpdateProcess.Enabled = (drvInfo.RootDirectory.GetFiles("*.enc").Length > 0);<br />
else<br />
btnStartUpdateProcess.Enabled =false;<br />
}<br />
}<br />
The code is called by a timer's Tick event. Now when I start the application with a disc in the drive, the code works fine. When I eject the disc, the button btnStartUpdateProcess gets disabled as soon as the timer fires the tick event. The button also enables again when a disc in inserted with at least one file in the root, with the .enc extension.
However, when I start the application with no CD in the tray the button starts disabled (which is correct) but when inserting a disc, the IsRead will return false over and over again. It looks like the IsReady value doesn't update or so. When I stop the application and imidiately start it again (not touching the CD Tray, the IsReady property returns true again.
Is my approach for 'monitoring' the CD incorrect or something?? I've also used some (WMI based) monitors (downloaded) which fire Insert and Eject events, but the result is the same. It seems like some kind of misterious lock prevents my app from detecting discs.
|
|
|
|
|
Is it possible to create an instance of a class under one button and use it in another button.
Well basically what i am trying to do is
I am writing an application which control the execution of command over local and remote machine.
So i want to use 3 buttons i.e. Register , Submit and Unregister.
Now under Register button i simply want to create an instance of a class which in turns goes to register function with in that class.
handle han = new handle("MyProgram"); // here my program gets registered.
Now i want to use han object over another button i.e submit button, somethin like that/
han.submit(...);
So is there any way to do so. I dont think its a good idea to create instance of a class globally because whole thing is that i want to make use of register button n so on.
Thanks
SS
|
|
|
|
|
Software_Specialist wrote: Is it possible to create an instance of a class under one button and use it in another button.
Yes.
Software_Specialist wrote: So is there any way to do so. I dont think its a good idea to create instance of a class globally because whole thing is that i want to make use of register button n so on.
You can store it as a field on the Form class.
|
|
|
|
|
sorry but could you tell me via giving example how to store it as field.
Bit new to windows programming.
Thanks
|
|
|
|
|
Software_Specialist wrote: how to store it as field
AKA Member variable
public class MyForm : Form
{
private MyObject someObject;
...
public void TheRegisterMethod()
{
this.someObject = new SomeObject("blah");
}
...
public void SomeOtherMethodThatNeedsSomeObject()
{
this.SomeObject.DoStuff();
}
}
|
|
|
|
|
You var must be a so called class member
class a
{
private YourClass ycInstance = null;
private void btn1_click(object sender, eventargs e)
{
ycInstance = new YourClass();
}
private void btn2_click(object sender, eventargs e)
{
ycInstance.DoWork();
}
}
.: I love it when a plan comes together :.
http://www.zonderpunt.nl
|
|
|
|
|
OK, the best advice I can give you is to buy a book and work through it, so that you have some basics as a starting point for the questions you ask here.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
yeh gt it working now. Well book idea is not bad actually. I got few books but none of them explain anything about windows programming. But anyway i know what i asked, it was just i couldnt got him in beginning.
Thanks
|
|
|
|