|
|
Thanks!
That's enough to get me started ... I'm off and coding.
Phil
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
I have the following config file:
<configuration>
<system.diagnostics>
<trace autoflush="false" indentsize="4">
<listeners>
<add name="myListener" type="System.Diagnostics.TextWriterTraceListener,System" initializeData="c:\myListener.log" />
<remove type="System.Diagnostics.DefaultTraceListener,System"/>
</listeners>
</trace>
</system.diagnostics>
</configuration>
Running this and using the Trace class brings up the following exception:
An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in system.dll
Additional information: Couldn't find type for class System.Diagnostics.TextWriterTraceListener,System.
I certainly have a reference to the System assembly.
|
|
|
|
|
Two things:
First, the sample in MSDN doesn't put ,System at the end of the TextWriterTraceListener definition. Oddly the text on obtaining the full name of assemblies does include that as well as the version, culture, and public key token so try both ways.
Second, you need to specify the fully qualified name for the item you are removing. You only specified the class name and assembly, you also need to specify version, culture, and public key token.
For example:
"System.Diagnostics.TextWriterTraceListener, System, version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
If you are targetting .NET v1.1 change the version part to 1.0.5000.0
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
|
|
|
|
|
Tx James I'll try that. But...
James T. Johnson wrote:
First, the sample in MSDN doesn't put ,System
In the version I have it does. But the same example at the MSDN library online is different. I'll look into that.
|
|
|
|
|
hi!
i get problem when set 'DisplayMember' and 'ValueMember' for combo box (get data from oracle database, using OleDb).
comboBox.DataSource=DataSet.Tables[0];
comboBox.DisplayMember="DisplayMember";
comboBox.ValueMember="ValueMember";
the same code is OK when I connect to access or sql, but get bug when connect to oracle database.
help me
thanks.
|
|
|
|
|
|
.NET Framework must be 1.1, I could connect to oracle with OleDb for other action like execute sql command, get data reader,...
but got above problem with combo box.
|
|
|
|
|
Can you describe the problem you are seeing?
I don't see anything wrong with the code you wrote above so long as you have a variable named DataSet with at least one DataTable added.
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
|
|
|
|
|
hi, thanks for your reply.
it's now ok, and I really don't know what the reason is.
thanks again.
|
|
|
|
|
Can anybody help me. I really do not understand one thing!
This is an example from MSDN:
//***********************
private void SetFont(string reportObjectName)
{
TextObject text;
FontDialog fieldFont = new FontDialog();
// Get the ReportObject by name and cast it as a TextObject.
text = Report.ReportDefinition.ReportObjects[reportObjectName]
as TextObject;
if (text!= null)
{
// Show the Font dialog.
if (fieldFont.ShowDialog ()==DialogResult.OK)
{
// Apply the settings from the Font dialog.
text.ApplyFont(fieldFont.Font);
// Set the text object's color to blue.
text.Color = Color.Blue;
}
}
}
//***********************
but in reality the function ApplyFont works not properly, it can change anythign but Font.Size.
The main thing of font is its Size and I cannot change it in my reports. What's going on? Is it an error or it works as designed?
Thank you!!!
|
|
|
|
|
How to know that ALT pressed if control doesn't have an imput focus?
Valeria
|
|
|
|
|
Hi Valeria,
In ASP.NET (Web Development)
you can use this codesnippet to detect ALT key bieng pressed:
document.onkeydown = function ()
{
alert (event.altKey + " " +event.keyCode);
}
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
|
|
Is it possible to take a .net binary compiled under Windows and take the binary, and run it under Mono(under any *nix platform) without recompilation. I understand that Mono has WineLib related bindings and patches for porting applications written in windows to *nix, but I'm not sure if it would need a recompilation.
thanks
Kannan
|
|
|
|
|
Kannan Kalyanaraman wrote:
Is it possible to take a .net binary compiled under Windows and take the binary, and run it under Mono(under any *nix platform) without recompilation. I understand that Mono has WineLib related bindings and patches for porting applications written in windows to *nix, but I'm not sure if it would need a recompilation.
In theory you could do it, I never tried it, though.
I intend to do it as soon as our project hit the next deadline, so I'll have some time to play with new technologies.
Kant wrote:
Actually she replied back to me "You shouldn't fix the bug. You should kill it"
|
|
|
|
|
Good question. I know that hey use NUnit as the Unit testing tool on Mono, and it seems to work fine with Mono assemplies and Windows assemblies.
"Je pense, donc je mange." - Rene Descartes 1689 - Just before his mother put his tea on the table.
Shameless Plug - Distributed Database Transactions in .NET using COM+
|
|
|
|
|
I would GUESS that it works for libs but not for .exe
i.e. libs are a defined .net format, whilst .exe are windows - they have win32 code to load up .net and complile the .net machine code.
but only a guess..
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
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."
|
|
|
|