|
Philip Fitzsimons wrote:
whilst .exe are windows - they have win32 code to load up .net and complile the .net machine code.
Sorta...assuming 100% managed code there are two entry points in an executable.
The first is the one that lets Win2K, Win98, and WinME work; it is the standard one used by all programs, it merely makes a call to the .NET runtimes _CorExeMain function.
The second entry point is the one you define with the Main method and is managed code: WinXP and Win2K3 use this directly, bypassing the first/normal entry point because they are .NET aware.
I tried to find a document I had which described the loading process in detail, in particular the loading mechanism used by WinXP+. Unfortunately I could't find it so I had to go from my stale memory.
The first entry point is described in Tom Archer's Inside C# first edition, but my second edition is out on loan to a friend so I can't check that one.
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
Up until now there is no sure way to port Windows Forms since they make extensive calls to the Win32 API.
|
|
|
|
|
But in the mono, they are having two options for implementing winforms
One through the GTK route and the other through wine emulation, they have a patched versino of winelib for this purpose, in this route winforms would work without any code modifications (hopefully without recompilation )
Cheers,
Kannan
|
|
|
|
|
If they really make that work in a consistent way it would be a good thing, although I seriously doubt that that these emulations will work without recompilation .
Lets wait and see.
|
|
|
|
|
Hi all,
I would like to know if it is posible to use DirectX to draw to the windows desktop using c#.
If this is posible how would I go about it.
Kind Regards
Jacques Buitendag
|
|
|
|
|
you need to use FindWindow() GetWindowDC() to do this.
Beware that different versions of windows have 'different' desktops - i.e. under xp/98 there is a ListView control which is what you place icons on - you want to draw to this. (this listview effectivly hides the desktop window)
Whilst under other versions you need to get GetDesktopWindow()
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Thanks Philip,
I remember that these functions return a hwnd handle.
So how can I go from the hwnd handle to and usable DirectX device in C#
Kind Regards
Jacques Buitendag
|
|
|
|
|
Hi all!
I'm working on an real estates software and it will be available in multiple language (english, french, italian, and many more).
We choose C#/.Net with VS2003 for devolopping the software.
My question is what is the best way to do a multi-language application ? I mean that I don't want to change a single ligne of code if tomorrow we add a new language.
For example, a solution available in a standard MFC/C++ application is to make a DLL with all string tables as resources but we can't do this in C#/.Net (i think).
Any suggestion ?
Many thanks,
--
F.Julian
|
|
|
|
|
In C# NET you create embedded resource files (*.resx)that will be transformed in satellite assemblies (resource only dlls) if you specify that your application is localizable.
In Form properties, got to the localizable property and set it to true. Then change the language property to the language you want and edit your form's title, menus etc in design view. For message boxes, error messages and other things, add a resource file (through V.S. add new item option) to your project with the specified localized strings or typed resource. These added files must use the convention name.culture.resx (i.e. for French you could have Strings.fr-FR.resx has the name). Do not forget to include a fallback neutral resource file also (no need to do this for the form's specific resources since all forms have a fallback resoruce file by default).
Use Resource Manager in your code to get the specified string or typed resource from the localized resource file.
And remember, before doing all of this, code your application so that the executable code can be clearly separated from localized resources.
|
|
|
|
|
does anyone have any idea how i can add my (own) components to the toolbox at installtime (via my installer)?
do i need to register them in the GAC or is it possible anyway?
and how do i actually add them via code? , is there some file that i can alter , or is it in the registry?
any ideas?
//Roger
|
|
|
|
|
|
jdunlap wrote:
ref Rectangle lpRCScroll
IIRC the Rectangle struct doesn't marshal to a Win32 RECT so you'll either have to do the marshalling yourself or create a new class which does marshal as a RECT (really easy).
Creating a new class also lets you specify null as a value.
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
James T. Johnson wrote:
or create a new class which does marshal as a RECT (really easy).
I had that suspicious feeling when I was looking at the UnsafeNativeMethods namespace. Half the things there are classes.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Helo, I'm attempting to create an Add-In for Visual Studio, and I need to modify and retrieve the contents of the Autos, Watch, Locals, and This tool windows. I've seen many samples on creating tools windows, but non on how to access the existing ones? Does anyone know?
|
|
|
|
|
Hi,
I begin to develop on C#.
How can i print a message on my printer
Thanks
|
|
|
|
|
If you have msdn with your VS .Net then do a search for "Print Method" or for PrintDocument.Print
There are samples on the help page. A lot easier to look that up than for me trying to explain it all here. Hope this helps. You could also do the same search on msdn.microsoft.com.
|
|
|
|
|
J'arrive à imprimer mais avec la méthode Graphics.DrawString.
Existe-il une fonction comme en VB PRINTER.PRINT qui permettrait d'imprimer une chaine de caractere directement sur l'imprimante.
Merci
|
|
|
|
|
can someone please help me giving a datagrid an eventclick?
e.g. the column should disappear on "rightMouseButtonClick"
Thanx
|
|
|
|
|
myGrid.MouseDown+=new MouseEventHandler(myMouseDown);
...
private void myMouseDown(object sender,MouseEventargs e)
{
DataGrid.HitTestInfo hi=myGrid.HitTest(e.X,e.Y);
if(e.Button==MouseButtons.Right && hi.Type==DataGrid.HitTestType.Cell)
myGrid.TableStyles[myStyle].GridColumnStyles[hi.Column].Width=0;
}
You must have Table/Column styles defined.
Hi,
AW
|
|
|
|
|
thank you for the mouse event,but there is one question i got to ask,
what about "HitTestInfo"? is there a dll for,or do i need to write a new class?
Thanx
|
|
|
|
|
It's a standard WinForm object. If You use
using System.Windows.Forms;
it will be available
Hi,
AW
|
|
|
|
|
i use system.windows.forms
dataGrid.HitTest is available,DataGrid.HitTestInfo not.
Cristian
|
|
|
|
|
Sorry. It's invisible but works at me (on Framework 1.0 and 1.1). See help on HitTestInfo (in Index or Search, not Dynamic Help)
Hi,
AW
|
|
|
|
|
I would like to have some code in a timer control that checks the current active control and sets a string based on that
I don't know how to do this. I am trying something like this, but it doesn't work
___________________________________
// Get the type of the active control ???
Type dest=frmMain.ActiveForm.ActiveControl.GetType();
if (dest == System.Windows.Forms.TabControl)// if it is a tab control
{
if (dest.Name = "tabMainAbout") // if it is tab "Main About
{
this.setPanelMessage("This is about tab");
}
else
{
this.setPanelMessage("NOT About");
}
}
______
Could you please help?
Thanks
Leonardo
|
|
|
|
|
Try something like this:
// Get the type of the active control ???
//Type dest=frmMain.ActiveForm.ActiveControl.GetType();
Control dest = frmMain.ActiveForm.ActiveControl;
if (dest.GetType() == typeof(System.Windows.Forms.TabControl))// if it is a tab control
{
if (dest.Name = "tabMainAbout") // if it is tab "Main About
{
this.setPanelMessage("This is about tab");
}
else
{
this.setPanelMessage("NOT About");
}
}
NOTE: This is not tested...
Hope this helps,
Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|