|
the C++ is visual C++ , can i still do what you say?
and how to compilt the project into an assembly?
thanks alot for your help
min
|
|
|
|
|
You will have to study the .NET system a bit more. Visual C++ supports the normal C++ and the Managed Extensions to C++ (MC++). The MC++ is designed for .NET programming and the normal C++ for other systems.
You cannot call the normal C++ from C# or VB.NET. But you can call MC++ classes from C# or VB.NET.
Again, the question is which are you using C++ or MC++?
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
I am really sorry that I know this much only. How do I know whether it is MC++ or C++? Cos I got this program from a Phd student and he is not available for me to query.
thanks
min
|
|
|
|
|
MC++ classes are marked with "__gc". Any C++ class which is not marked with "__gc" are normal C++ classes.
A simple MC++ class is as follows:
public __gc Test
{
Test() {}
};
It is therefore very easy to identify the MC++ classes.
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
How could one proceed to get the real width of a DataGrid? What I mean by the real width is the width of the actual DataGrid's area, i.e. the width that one would need to resize it to to stop a scrollbar from appearing—not the width I've set it to, which can be any arbitrary value.
I tried wierd techniques like adding (after experimentation) 39 to the width of the columns, but this comes up just short in certain circumstances that I really don't see the reason for—for example, when I have resized the DataGrid myself to force scrollbars onto it.
But there must be a supported, logical way. Only problem is, I can't find it!
Thanks in advance...
-Domenic Denicola- [CPUA 0x1337]
“I was born human. But this was an accident of fate—a condition merely of time and place. I believe it's something we have the power to change…”
|
|
|
|
|
Domenic [Geekn] wrote:
I tried wierd techniques like adding (after experimentation) 39 to the width of the columns, but this comes up just short in certain circumstances that I really don't see the reason for—for example, when I have resized the DataGrid myself to force scrollbars onto it.
I haven't actually done this in code, however the height of the thumb in the scrollbar is/should be proportional to the total height of what you are displaying. What I am saying is that if you have say "4" sets of data in height to display then the height of the thumb should only be about 1/4 of the total. HTH
Nick Parker
You see the Standards change. - Fellow co-worker
|
|
|
|
|
That doesn't quite work though... my real goal is to resize the window to the "real" width of the DataGrid . So the scrollbar approach won't work if the window is bigger than the DataGrid , only if it's smaller and a scrollbar is showing. And besides, it sounds rather hackish and imperfect...
Or perhaps I'm not understanding?
Thanks for you help
-Domenic Denicola- [CPUA 0x1337]
“I was born human. But this was an accident of fate—a condition merely of time and place. I believe it's something we have the power to change…”
|
|
|
|
|
hi to ya'll..want to ask a ques..ok lets say i have an Linux operating system and i want to write a configuration file into the system that can read the data entered by the user(data enter by user is done using VB, VB is used to create the interface and then vbscript is used to generate a text file. The text file contains all info entered by the user. This text file is then sent to the Linux OS, and a configuration file in the os is used to validate the info entered).Ok, my ques is what language am i going to use, and how am i going to do it?
Nash Hon
|
|
|
|
|
How are you getting the data sent to Linux?
How often is it going to get sent?
What programming languages can you program in?
For myself, I know PHP and Perl, which generally do admirably for small jobs which are not long running. However, PHP requires a web server, and Perl requires a fairly significant runtime loaded, so it can be a pain. C or C++ with the SOAP libraries are also an option. I wouldn't go with Java simply because the java implementation on Linux has reliability issues (in my experience, which is limited since I had other options rather than Linux open to me, so I never pursued my issues).
-Adrian
|
|
|
|
|
i written a reply to ur email..pls reply me as soon as possible...thanks
Nash Hon
|
|
|
|
|
Ok.. I'm missing something.
I've had a (quick) poke around the MS_Help for the datagrid control. I can't for the life of me get the control to highlight an ENTIRE ROW when ANY field (not column) in a given row is clicked!
P.S. Please keep insulting remarks to a minimum. I already know I'm an idiot for having to ask...
Mike Stanbrook
mstanbrook@yahoo.com
|
|
|
|
|
this might work for you.. im not to sure though because i have never used a data grid before. anyways,
(from clip board)
To determine which part of the control the user clicked, use the HitTest method in the MouseDown event. The HitTest method returns a DataGrid.HitTestInfo object, which contains the row and column of a clicked area.
[C#]
protected void dataGrid1_MouseDown
(object sender, System.Windows.Forms.MouseEventArgs e)
{
Console.WriteLine();
System.Windows.Forms.DataGrid.HitTestInfo myHitTest;
// Use the DataGrid control's HitTest method with the x and y properties.
myHitTest = dataGrid1.HitTest(e.X,e.Y);
Console.WriteLine(myHitTest);
Console.WriteLine("Column " + myHitTest.Column);
Console.WriteLine("Row " + myHitTest.Row);
Console.WriteLine("Type " + myHitTest.Type);
Console.WriteLine("ToString " + myHitTest.ToString());
Console.WriteLine("Hit " + myHitTest.Type.ToString());
}
ill keep looking till i find it out for sure though.
looking some more.. i think that you will have too manually tell the list box to select the other items on that row. good luck...tell me how it goes. (im curious myself now too).
|
|
|
|
|
This is what I got to work:
this.searchResults.MouseUp += new System.Windows.Forms.MouseEventHandler(this.searchResults_MouseUp);
private void searchResults_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
System.Windows.Forms.DataGrid.HitTestInfo hti = this.searchResults.HitTest(e.X,e.Y);
if (hti.Row >=0){
searchResults.CurrentCell = new DataGridCell(hti.Row, hti.Column);
searchResults.Select(hti.Row);
}
}
Now, catching the double click, that is another story all together!!
Note: Here is an EXCELLENT site with tons of WinForms tidbits: http://www.syncfusion.com/FAQ/WinForms/default.asp[^]
Mike Stanbrook
mstanbrook@yahoo.com
|
|
|
|
|
Has anyone outside the US managed to get C# / DX9 to work together?
I've installed the full SDK and opened VS.NET. Clicked on New Project, sure enough, there's a new template: DirectX 9 Visual C# Wizard. Assumedly I need to use that, right?
When I select this and hit OK, I get a blank window and a messagebox (hidden underneath it) saying "Navigation Failed. Cannot find D:\Program Files\Microsoft Visual Studio .NET\VC#\VC#Wizards\Mdx9AppWizard\HTML\1033\default.htm".
Well, fair enough, it isn't there. 1033 is the Locale ID for English US; the installer has chosen to only install 2057 (English UK), because that's what my system is set to.
But every reference in the registry is ...HTML\2057 so is this hardcoded somewhere? Is there another way to use DX9 without the wizard? Who do you complain to about something like this if it fails?
Any ideas anyone?
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
I think I've actually answered part of my own question. It seems that you can simply reference the DX assemblies in any Win app and use them from there.
I still wouldn't mind knowing if there's a workaround to get the wizard going though.
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
Dont think I can help you much but it works fine for me...
Why waste time learning when ignorance in instantaneous
-Hobbes
|
|
|
|
|
I would expect it to work in the US, or on any machine with a Locale of 1033. Then it will install in the place where the (assumedly) hardcoded folder path is.
I suppose one workaround would be to change all my folder paths to 1033 and rename the physical folder, but that's naaaassssty! I'd rather do without the wizard... I think. )
As you have it working, maybe you CAN help? What does the wizard actually do? Is it worth me caring about or is it something I can do manually in a few seconds?
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
Well, have you ever used the DX wizard for VC6? It does the same thing pretty much, it sets up all the base code for a simple DX app; adding all the references etc. I don't know if you would be able to do it in a few seconds... maybe a few minutes but its convenient to have.
Paul Riley wrote:
I'd rather do without the wizard... I think
Considering all the work you would have to do to get the wizard working you are probably right!
Why waste time learning when ignorance in instantaneous
-Hobbes
|
|
|
|
|
Thanks, Brian. Doesn't sound too bad, I'll have to try it over the weekend, been playing with the samples tonight.
This is seriously sloppy on MS's part though. If you're going to have the wizard work for every language (to the point of separating English US/UK), you'd think they'd bother to test it in at least one other language
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
I had the same problem because my local is Frech Canada. I have rename all the locale folder to 1033(US) and the wizard worked. But you can make a direct reference to DirectX also(like I do).
Trully, if there evil in this world, It lies within the heard of mankind
Shock The Dark Mage
shock@romhack.net
Main Project: Aeru IRC - http://www.sf.net/projects/aeruirc
|
|
|
|
|
Thanks, Shock. At least reassuring to confirm that I've not just missed something really obvious
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
create a junction...
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
I hade the same problem and solved it like this:
In the extracted files, locate and copy the folder .\Bin\DXUtils\Visual Studio 7.0 Wizards\C#\VC#Wizards\Mdx9AppWizard
Go to \Program Files\Microsoft Visual Studio .NET\VC#\VC#Wizards and delte the folder named Mdx9AppWizard and then paste the one you copied from the extracted files...
This made it work for me...
Andreas Philipson
|
|
|
|
|
Clever trick.
As it turned out, I renamed the folders... it turned out there were only four folders to "fix" and the registry entries were all MRU (Most Recently Used) references, created from my investigating the problem, so they were irrelevant.
Then having done that, I figured out that I was better off copying and adjusting necessary chunks of code from the samples, rather than using the wizard.
I wasn't all that keen on all the unnecessary classes that the wizard was creating.
Paul
Pleasently caving in, I come undone - Queens of the Stone Age, No One Knows
|
|
|
|
|
In C#,
I did the interop to bring the COM IMoniker interface into C#, and then I made a C# class that implements IMoniker. I made an instance of the class I made, and then I casted it to get an IMoniker.
I then called a com method, IPersistMoniker.Load, and passed it my IMoniker object. I get a generic error, System.ExecutionEngineException.
I'm guessing that the problem has something to do with going "the other way" with com interop- that I'm passing my interface from managed C# into the COM method. Am I right?
What do I have to do to the C# object to make COM digest it, is there just one of those [] things I put ontop of the c# object?
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|