|
Hi All,
Is possible a .Net Application run in a Linux Server?
Regards,
Vadim
|
|
|
|
|
|
yes, www.mono-project.com
Judah Himango
|
|
|
|
|
leppie and Judah pointed out a couple alternatives, but make sure you read about them thoroughly.
Both are implementations of the CLI (Common Language Infrastructure), but do not expose the same BCL (base class library) as .NET - Microsoft's implementation of hte CLI. Windows Forms is a big one that is different. In the Microsoft .NET BCL Windows Forms controls (among many other things) P/Invoke native APIs and handle native window messages. That changes with Mono, for example, unless you're using the WINE bindings (as opposed to GTK+ or QT bindings which don't use a message-passing system).
There's other differences as well. While basic code will port to *nix with little to no problems, much code will not.
Take a lot of the .NET controls posted here on CodeProject. Most interop back to the Common Controls their base class encapsupates (like the ListView encapsulates the List-View common control) and use P/Invoke along with handling messages by overriding WndProc . Those wouldn't work on most flavors of Mono on *nix because the subsystem is completely different.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
|
The new managed implementation of Windows.Forms is moving along (internally it uses Win32 messages and codes to help applications that hook up to Wndproc or use CreateParams), the hack-a-thon in Provo, Utah seems to have been a success. I'm not correcting you, merely saying that this statement doesn't really say much at all. They don't talk about what bindings for Windows Forms they're talking about. Keep in mind that with *nix you have many desktop and window managers (both different things). Definitely doesn't detract from the confusion!
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Heath Stewart wrote:
but do not expose the same BCL (base class library) as .NET
I have to differ here with you. DOtGNU (Portable .NET) aims to provide a 100% BCL as per the ECMA spec which doesnt make any mention of SWF, iow its just mscorlib.dll as we know it. I dont know about mono, as I have seen some funny extra stuff there, but Portable .NET doesnt add anything extra to the BCL as described in the EMCA spec.
Cheers
top secret xacc-ide 0.0.1
|
|
|
|
|
The BCL is the Base Class Library and is not described by ECMA. The CLI - or Common Language Infrastructure - and the C# Language Specifications are described by the ECMA.
What I was referring to is very true and you can even read about it on the respective sites.
Many of the classes in the BCL rely on Win32 APIs and windows messaging (pretty much all the Windows Forms controls). Without some sort of layer (like Wine) it's impossible to just use the .NET BCL (remember that ".NET" refers to Microsoft's implementation of the CLI) as-is.
One could provide the same public members on classes, but without an underlying layer the implementation must be developed with respect to the underlying window manager.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Heath Stewart wrote:
The BCL is the Base Class Library and is not described by ECMA.
From EMCA 335
Common Language Infrastructure (CLI)<br />
Partition IV:<br />
Profiles and Libraries<br />
....<br />
5.2 Base Class Library<br />
The Base Class Library is part of the Kernel Profile. It is a simple runtime library for modern programming<br />
languages. It serves as the Standard for the runtime library for the language C# as well as one of the CLI<br />
Standard Libraries. It provides types to represent the built-in data types of the CLI, simple file access, custom<br />
attributes, security attributes, string manipulation, formatting, streams, collections, and so forth.<br />
Name used in XML: BCL
The XML they are refering to is the official description, I cant remember the link now, but will be glad to send it.
From EMCA 334:
Appendix D Standard Library<br />
D. Standard Library<br />
<br />
A conforming C# implementation shall provide a set of types having specific semantics. For convenience,<br />
these types and their members are listed here, in alphabetical order. For a formal definition of these types<br />
and their members, refer to ECMA-335, 2nd edition, Common Language Infrastructure (CLI), Partition IV;<br />
Base Class Library (BCL), Extended Numerics Library, and Extended Array Library, which are included by<br />
reference in this International Standard.
top secret xacc-ide 0.0.1
|
|
|
|
|
If anyone can help me with some code...please
I have made a db in Access with a field called data set to OleObject now what I want is to make a C# application who has a richtextbox control and a ReadDb an WriteDB button when i press write the app writes to the db the file saved by the RichTextBox control when i press read the app read the file from db and displys it on the RichTextBox control. I need only the part that handles the read write display thing...
Thx
|
|
|
|
|
RTF itself is not an OleObject. The easiest solution here is to change the field type to Memo and get and set the text from RichTextBox.Rtf and store that in the memo field.
Handling OLE is unnecessary here and will prove difficult since what you need doesn't exist in the .NET BCL (a few COM interfaces are already declared for you in System.Runtime.InteropServices , but not near enough). The first solution is by far the easiest.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Hello,
Is it possible on PocketPc to get noticed when an event occurs? - it is not important what event occurs, but only if an event occurs? also independent of a certain application.
Regards
pat
|
|
|
|
|
What type of events are you looking for? You'll have to clarify a little more.
|
|
|
|
|
when a user presses a button in an application or start a program on the PocketPc. Is it possible to get noticed of such events on the PocketPc's?
regards
patrick
|
|
|
|
|
No, there is no way to get events in an EVENT DRIVEN Windows application.
|
|
|
|
|
Actually, in Windows CE there really isn't an easy way of doing it, and no single way I've seen documented or have used that would work like hooking messages in Windows (the real kind ).
The easiest way is probably to use Control.Capture , which is supported in the .NET CF. Only one window can capture the mouse, however, but you can get mouse events to fire for windows that are not your own. In most cases, you'll need to override WndProc and handle these yourself as windows messages.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Sorry but i do not exactly know how you mean that? I read the API of the System.Windows.Forms.Control class but i do not exactly know how i can use this for my problem?
Regards
patrick
|
|
|
|
|
You simply set the Capture property of any control you want to capture mouse events to true . Look over the Control.Capture property documentation.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
This is a little bit irritating, because i want to implement it in a generic way, and so i cannot set the property of a control to true or false or? - Or do i not understood you in a correct way`?
regards
pat
|
|
|
|
|
You really should read about the Control.Capture property. Setting this on a control causes the control to receive mouse events from anywhere on the desktop regardless of whether or not your control has the focus. This is about as generic as it gets.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Hello
@Mr. Stewart: Are you sure that the solution with the Control.Capture property works for the whole PocketPc? - because i developed a little solution with this, and i only get a solution for a specific application?
Can you please give me a further hint, how you meant that??
thanks in advance
regards
pat
|
|
|
|
|
Have you actually read the documentation for the Control.Capture property? It states that a background window will only receive events for messages passed to its visible client area. Only a foreground window can receive events for the desktop client area.
You need to read the documentation. If this isn't suitable, then you'll need to read through the Windows CE / Pocket PC documentation on http://msdn.microsoft.com/library[^]. Search for APIs that may work. Control.Capture is really your only option in .NET without having to P/Invoke or create an RCW.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Maybe I misunderstood, but I thought he wanted button click events or app load events from a custom built app (your app). In which case they are just easy to retrieve as any Windows app.
|
|
|
|
|
Judging from a previous question, I think he wants when any event happens. But I could be wrong, too. I guess we both need a little more clarification, huh? It definitely helps when we get a problem description that consists of more than "I need X" or "It doesn't work".
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles]
|
|
|
|
|
Yes, Mr. Stewart understood me in the right way. I do not need it for a custom application. If an event on the PocketPc arises, doesn't matter if a button is pressed, a program is started or something else, i should get be noticed so i can make a screen shot.
regards
pat
|
|
|
|