|
anyone tried using directX from c#?
I know that the next version will be .net compatible, but I am wondering if its been tried with the current version - maybe with the vb version of the directx lib?
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
have a look at this article here on codeproject in the C#-section
it's about writing a media-player in C# using DirectShow, and as far as i understood (never ever having written a single line of vb-code) it does use the vb-libs
:wq
|
|
|
|
|
Couldn't believe my eyes when I ran it the first time, but this program decompiles the whole .Net framework IL source code,
And I swallow a small raisin.
|
|
|
|
|
Yes, its nice, but it does crash alot
If u want some more source code, download the MONO source, also very helpfull especially when u want to extend .Net classes.
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
I thought at first sight that Mono was really far from a user-friendly repository of .Net source code, but...
While we are at it, let's check out Salamander. I hate their Java demo but their desktop app looks fine and powerful too.
Within a few hours so many tools to hack down the closed code. I thought until this morning that switching from MFC to C# I was being ligotated by MS. Now no more. Let it begin!
And I swallow a small raisin.
|
|
|
|
|
Amazing isn't it?
To cover the places where it crashes, ildasm does the job nicely for me.
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
Eh...eh....
Not a single crash for me. Used since 8 AM this morning (it is 16 PM).
And I swallow a small raisin.
|
|
|
|
|
I've only found a few methods that crash it for me. One of the paint event methods seemed to do it, PaintWithErrorHandling in the Control class IIRC.
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
maybe I just try to view the wrong stuff
Try some dll's with a combination of unmanaged/managed code and it tends to crash on some functions.
But I'll take James's sugestion and use IDLDASM
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
Well huhaaaaa Crashed too!
Will try recompile and debug Anaconda this WE or something. Will flag you if I get this bug down,
And I swallow a small raisin.
|
|
|
|
|
I have tried to recompile Anakrino this WE, but a few main files and projects are missing from the source repository. Thus I and you will have to live with the GPF,
And I swallow a small raisin.
|
|
|
|
|
Which methods do i need to override to put myown drawing code in a tree view, for when it is drawing the nodes?
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "All programmers are playwrights and all computers are lousy actors."
|
|
|
|
|
I have been trying to figure out, and search for how you can override the normal closing operation of a Form when a user hits the 'X' button, so that it just HIDES the form instead.
The closest I found in a forum someplace was they said to override OnClosing if you want to change how to handle the 'X' button default operations.
Like so:
protected override void OnClosing(CancelEventArgs e)
{
this.Hide();
}
However this does not work. The form is still disposed of, and when I try to show the form again I get an exception say just that.
Does anyone know how to do this, or can point me to an article or forum message someplace that explains this?
Thanks in advance...
Aalst
|
|
|
|
|
I think you can override this function:
private const WM_QUIT = &H12
protected override void WndProc(ref Message m)
{
if(m.WParam.ToInt32() == WM_QUIT)
this.Height = 0;
else
base.WndProc(ref m);
}
navinnx
|
|
|
|
|
You are doing right.
Just add e.Cancel = true;
And I swallow a small raisin.
|
|
|
|
|
Stephane,
That did the trick.
Thanks,
Aalst
|
|
|
|
|
I'm trying to use the DataGrid control to edit some data, but I think it must be bound to some data set. Stephane Rodriguez told me in a previous thread that it doesn't need to be, but looking through the docs I found this:
Introduction to the Windows Forms DataGrid Control
ms-help://MS.VSCC/MS.MSDNVS/vbcon/html/vbconIntroductiontotheDataGridControl.htm[^]
Binding Data to the Control
In order for the DataGrid control to work, it should be bound to a data source using the DataSource and DataMember properties at design time or the SetDataBinding method at run time. This binding points the DataGrid to an instantiated data-source object (such as a DataSet or DataTable), with the DataGrid control showing the results of actions that are performed on the data. Most data-specific actions are not performed through the DataGrid, but instead through the data source.
If the data in the bound dataset is updated through any mechanism, the DataGrid control reflects the changes. If the data grid and its table styles and column styles have the ReadOnly property set to false, the data in the dataset can be updated through the DataGrid control.
I could probably create an in memory dataset and bind the control to it (since I don't have a table in my database that corresponds directly (or even similarly) to what will be shown and edited on the table.)
But I have no idea on how to use data sets and similar clases, any pointers??
Or is there a way to use the control unbound? how do I add columns? rows? set the cells' value?
Thanks,
-- LuisR
──────────────
Luis Alonso Ramos
Chihuahua, Mexico
www.luisalonsoramos.com
"Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein
|
|
|
|
|
the .DataSource property need not be bound to a DataSet, it can be bound to any component (a control with bindings) that implements IList. To add columns in the DataGrid, you also must derive the base class because the CreateGridColumn() is marked protected. Well honestly, I have been playing with this, and I admit that it does not result in simply usable code as it sounded at first sight.
The other option, much seamless, is to create an instance of DataSet, and fill it by loading Xml Data. This means that your data must be first saved as Xml.
All in all, none of the approaches are really worth it, I was convinced that it would have been simpler. Just forget it,
And I swallow a small raisin.
|
|
|
|
|
StephaneRodriguez wrote:
All in all, none of the approaches are really worth it
I was playing with it yesterday before going to bed, and I got something pretty good going on. I created manually a dataset, then a table in it, and some columns (product code, price, description, unit price, price).
Then I created a grid table style (or whatever is called) and added 5 columns mapping to the table columns, with localized text and making the last three readonly.
On the CurrentCellChanged event, I walk every row in the dataset.Tables[0].Rows collection and for each product code, fill in the description and price. If there is a row without product code, I remove the row.
At the end, when I want to get the data, I just enumerate the rows again in the table in the data set and that's it.
I admit it's not as straight forward as I would have thought, but in all it took me about 150 lines of code and two or three hours, so it's not that much either.
I even wrote a little test app (I didn't want to start everything in my real application), and if you're interested I could e-mail it to you. It still has some little bugs (it does not work exactly as I wish it worked) but they don't seem hard to fix.
Thanks very much!
-- LuisR
──────────────
Luis Alonso Ramos
Chihuahua, Mexico
www.luisalonsoramos.com
"Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein
|
|
|
|
|
I load in an xml document and validate it ... ok thats the easy part
XmlDocument doc = new XmlDocument();
XmlTextReader tr = new XmlTextReader("Sample.xml");
XmlValidatingReader reader = new XmlValidatingReader(tr);
doc.Load(reader);
there might be several schemas that are used to validate, their location is specified via the xml schemalocation attribute.
Now if I want a table of those locations i presently read and parse the location attribute and manually match up the namespace prefix with the location file via the namespace URI. So i can go and physically read in the validating schemas.
XmlNode myNode = oc.SelectSingleNode("//instance:group",xmlnsmgr);
XmlNodeReader myreader = new XmlNodeReader(myNode);
myreader.Read();
myreader.MoveToAttribute("schemaLocation",this.xml_schema_ns);
String[] schemalist = myreader.Value.Split(new char[] {' '});
The must be a simplier way I dont know about, please if anybody knows can the enlighten me.
Thanks in Advance
James
|
|
|
|
|
please provide the link of different comprehancive examples of com and com+
and a little help how to run it?
r00d0034@yahoo.com
|
|
|
|
|
C# isn't COM or COM+. You can use it through COM Interop in .NET, but you would more likely ask this in the C++ forum.
David Stone
It seemed similar to someone saying, "Would you like to meet my knife collection?"
Ryan Johnston on Elaine's sig
|
|
|
|
|
Hi!
I have to use Microsoft Webbrowser AcitveX control in my program.
I'm coding in C#.
I also used this in MFC and it was just fine.
The BeforeNavigate2, and FileDownload events don't work when I use C# and .NET.
These events are not caught.
What is the problem?
Is there a solution for this??
Please, if you know the answer drop me an email.
Thanks.
|
|
|
|
|
Short answer : SyncFusion web browser own interop. Download htmlviewer.zip. There are two samples :
- HtmlViewer2 is useless (applies a .css stylesheet over an html body, using the AxInterop obtained from aximp on the IE ocx).
- HtmlViewer is useful and great : they do their own interop. That's a little tricky, but you don't need to understand the plumbering. In fact, they replace the OnBeforeNavigate2 and OnNavigateComplete events by two new events declared in BrowserNavigateEvent.cs, and used in Form1.cs (a demo app).
That's really funky stuff from the guys of Syncfusion. Hope it helps,
And I swallow a small raisin.
|
|
|
|
|