|
Thank you Mike for attending my question.
>>"Are you running the program from inside the VS.net environment?"
No. it is not. However, I don't think that would make much different unless you are talking about release built and debug built.
Okay, here are some of the informations of my project. It is basically a class library which wraps the C++ source codes. It does image processing.
I notice that the dotnet built is slower than the original built in C++ although I realize that my class library still runs on Win32 platform and not dotnet. You could check this by going to configuration manager properties in VS.NET.
In short, I would like to know are there any tuning or setting in the configuration that allow me to optimize my class library execution speed.
I would like my dotnet class library to be as closest fast to the C++ executables as possible.
thank you.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Apologies if its not on the correct forum (there didn't seem to be a relevant one), but, does anyone know if there's any way of uninstalling DirectX8 from the MSDN package (under VS.net2003) and replacing it with the DirectX7 SDK?
Thanks in advance,
Gary.
|
|
|
|
|
I am using COM+ and distributed transaction between two db.
SQLServer 2000 is installed on Microsoft 2003 standard server edition.
My COM+'s are located on Microsoft XP professional.
I triggered my client, but I got following error message.
Is there anyone who can help me?
The trancsaction threw the following exception:
The partner transaction manager has disabled its support for remote/network
transactions: mscorlib
The transaction will be rolled back.
|
|
|
|
|
Good Morning!
Me and my group is developing a rapid application development project. One problem that we encountered is how to add a freeware like a password generator into the windows application form. It is our first time in VB.Net and we have a lot time to catch up.
Thank you very much...
Hope for your reponse asap...
|
|
|
|
|
I'm trying to develop a custom component library in C#. One of the set of objects in these components would be dropdown controls (DateTime picker with dropdown calender, Numeric edit with dropdown calculator, dropdown tree control, etc.)
From what I understand, for these objects (calendar, calculator, tree, etc.) to drop down in the "correct" way, they shouldn't be forms, but actually WS_POPUP windows that have the desktop as their parents. I'm imagining they should capture the mouse as soon as they drop down, report to their owner (textbox, or whatever dropped them down) and then release the mouse. Am I missing something? Is this the correct approach?
Problem number two. Is the following methodology right: I should define an interface (IPopupControl) and implement it with every desendant (like for instance: DropDownTreeView: TreeView, IPopupControl). The reason is then I should be able to assign any dropdown control to an owner, and then the owner would always call a method (like IPopupControl.Popup) because it will always be implemented. So in other words, the owner will always be accepting one object [object?] which is IPopupControl instead of a specific object (DropDownXXXX) according to what it wants to drop down. Then of course, every dropdown control will implement its own methods that are different, to report the data back to the owner control (most probably textbox).
I would have to call some Windows APIs in this process I would imagine. What are the disadvantages?
Sammy
"A good friend, is like a good book: the inside is better than the cover..."
|
|
|
|
|
Visual Studio 2003 documentation contains information on System.Net.Sockets classes that are not recognized in the IDE. For example IrDAListener is unavaliable to use. Documentation states that it is in Framework 1.1. I have 1.1.4322 but it appears to be unavailable.
Have not found any update to Framework newere than what I have. Does anyone know why this is unavailable?
Dave Compton
|
|
|
|
|
I believe I found my problem. This is only available in the compact Framework.
Dave
|
|
|
|
|
Hey All,
I'm thinking of doing a small project for a local school. They've got a
computer room with a small network and 20 PCs running Windows 98. I'm in
the process of finding out what OS is on the server.
Basically, I'm doing an app which will probably run on SQL Server. I work
with VB.NET, so I'd like to code this in .NET if possible.
To make my app accessible to all PCs on the network, I could set up a web
server and have users browse to it, but I'd like to have the extra
functionality of WinForms. Would it be possible to program a WinForms
.exe that sits on the server and can be used by multiple users at a time?
This is the route I'd like to take if it is possible. I've done several
single-user database apps in .NET, but haven't needed to use the technology
in this way yet. Any tips are very welcome!
Cheers,
Johnny
|
|
|
|
|
Have a read on MSDN and elsewhere about Windows Forms and Smart clients. I think it was Chris Sells who wrote some good articles on this subject.
Michael
'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879
|
|
|
|
|
I have written a remoting package that exposes a singleton object and two singlecall objects. I would like to be able to track the creation/destruction of the singlecall objects via the IMessage interface. I have heard that this is possible, but am unsure on how to implement it.
I have been searching for info for several weeks now and all my previous posts have resulted in nothing. Please help!!!!
|
|
|
|
|
hi,
does anyone know how to change the standardprinter in a .net application?
thanks
michael
ps:
my concret problem is that i use the acrobat pdf-control to display a pfd in my application. ich even can print it with the "printAll()" methode on the standardprinter. but i found no way to set the printer the document should be printed. i even would be thankfull for a tipp to change the sprinter-settings in the pfd-control ;o)
|
|
|
|
|
Hi there,
is there anybody who has got an idea on how to catch the security-exception when starting a dot-net-executable from a network-share? I do not want to adjust the local intranet security (or do some strong naming) - just catching it. May be someone has done some stuff on how to detect the security settings for the zones or programatically adjustment?
thanx
sven
|
|
|
|
|
Just an idea, but you might try putting a try catch aroun the Application.Run(new Form1(); line in the static void Main([string[] args]) function.
|
|
|
|
|
Generally (at least in my experience) putting a try / catch around Application.Run(...) does absolutely nothing. I believe this is because exceptions only bubble up in their own thread, and Application.Run starts a new thread and message loop for the form you are creating, so no exceptions will be caught.
If you want to receive notification of the exception (on a global basis), you can hook to the AppDomain.CurrentDomain.UnhandledException event from within Main() before Application.Run(...), but you won't be able to stop the exception from terminating the program if the Framework considers the exception serious enough to do so.
In answering the original question, I don't believe there is any way to prevent the error (or catch it in such a way to allow the program to continue running) without altering the Security Configuration. If it were, there wouldn't be any security. What you are asking is something like asking the guard at a high-security building "I don't have credentials, but please let me in anyway."
-mike bray
|
|
|
|
|
Hi,
I'm using a BindableListview for which I found the code on the web:
http://www.interact-sw.co.uk/utilities/bindablelistview/source[^]
and I'm also using the ListViewSortManager found on Code Project:
http://www.codeproject.com/cs/miscctrl/lvsortmanager.asp[^]
I have found a funny interaction between the two. After binding the ListView to the DataSource (a DataTable), when the ListView is re-sorted the data gets out of sync.
For testing purposes, I added a TextBox and a CheckBox (one of the column is Boolean), which also bind to the same DataSource.
After setting the ListView and the Controls' DataSource to the same DataTable, the data is synced such that if I select a row in the ListView, the TextBox and CheckBox show the proper values.
Now, after sorting the data using different columns, the TextBox and CheckBox don't show the same values as the selected row in the ListView.
I'm assuming this is because the DataBindings are using an index, and that re-sorting the ListView differently doesn't necessarly affect that index.
How would I proceed to "re-index" the data such that clicking an item in the ListView brings up the proper data in the textBox and CheckBox ?
I've tried doing the same with the DataGrid, and found that the DataGrid works fine, ie the data stays in sync. What does the DataGrid do in order to achieve that ?
Thanks.
Luc Morin
|
|
|
|
|
I am designing a modular application where users are allowed to "wire" components together visually.
My problem now is that i have to connect a method to an event using only reflection.
So using the refleciton apis i end up with
an EventInfo representing the event, and a MethodInfo for the method. Now i want to add the method to the event as a handler.
I should use the EventInfo.AddEventHandler method. This requires a delegate for the handler. So how do i convert from the methodInfo to a delegate ?
System.Delegate has a CreateDelegate static method, but all those require a "delegate Type" argument. I suppose this is there because the compiler generates distinct delegate derived types when seeing the "delegate" C# keyword.
However i can't know all those infos in advance so i can't have a delegeate type for each possible method signature..
Is there any way around this ? So i can connect any method to any event without a compile time known delegate type... ( since this would negate the benefit of wiring components from different plugin modules together ) Of course the connectio ncan only work if the method and event have the same signature.. otherwise just an exception should be thrown.
|
|
|
|
|
Gluber2002 wrote:
However i can't know all those infos in advance so i can't have a delegeate type for each possible method signature..
This a pain, hopefully this will addressed in V2.
My suggestion would be to construct these delegates, once the assembly gets resolved in the AppDomain. Obviously these delegates will be known then and one can just attach the necesary one.
Gluber2002 wrote:
So i can connect any method to any event without a compile time known delegate type...
You cant have one without the other. So no. That scenario doesnt exist.
All method parameters are known at compile time.
Explain the situation a bit more. Are you trying to do something similar to the event method selector in the winforms editor?
leppie::AllocCPArticle("Zee blog");
|
|
|
|
|
hi evey one,
I have a problem with RichTextBox in System.Windows.Forms.
the function SuspendLayout() and ResumeLayout() doesn't work!!!
Did I do something wrong?
And what is the solution when I want to cancle the drawing of this control?
Thank you in advanced,
Eran.
|
|
|
|
|
You cant "suspend" drawing with those methods, they are for child controls.
You will have to use interop with SendMessage and set the WM_SETREDRAW to 0(off) or 1(on)
leppie::AllocCPArticle("Zee blog");
|
|
|
|
|
In order to create an idl/typelib/dll compatible with my existing COM container, I need to expose my C# properties as idl properties rather than idl methods, i.e.
properties:
[id(0x00000001)]
BSTR MyProperty;
rather than:
methods:
[id(0x00000001), propput]
BSTR MyProperty();
[id(0x00000002), propput]
void MyProperty([in] BSTR rhs);
The COM interop help suggests exposing interfaces to COM rather than the class/object itself (which suits me fine) except that interfaces cannot have fields in C# and C# properties are exposed as methods
Can anyone tell me how to expose 'properties' in their idl sense?
TIA
Elbie
"I would try everything once except incest and line dancing", Oscar Wilde
|
|
|
|
|
I noticed that TextEditBase or RichEditBox does not allow the Paint to be overriden.
I can intercept the WM_PAINT message by overriding WndProc. I'm basically trying to implement a left margin with number numbers in RichEditBox, now this is real easy using MFC/Win32 by implementing a OnPaint/WM_PAINT message validating the margin, calling Default/DefWindowProc then invalidating the margin and the drawing the margin in the begin paint...
Ok here's the snippet:
void CWinRETestView::OnPaint()
{
CRect rc;
GetClientRect(rc);
int nSave = rc.right;
rc.right = m_nMargin;
ValidateRect(rc);
Default();
InvalidateRect(rc);
CPaintDC dc(this); // device context for painting
DrawMargin(rc, dc);
}
How can this be done using RichEditBox using C#, .net?
|
|
|
|
|
Hallo *.*,
how do I convert IPicture to Image? I know there is a HANDLE field, but whenever I call Image.FromHbitmap(handle), it fails with an ExternalException in system.drawing.dll.
What am I doing wrong?
//get an IPicture of the visible MapPoint map
MapPointUtilities util = new MapPointUtilitiesClass();
Object obj = util.GetPictureFromObject(mapControl.ActiveMap, 100000, 100000);
//get the handle
Type t = obj.GetType();
Object handle = t.InvokeMember("HANDLE", BindingFlags.GetProperty, null, obj, null);
//convert the handle
Int32 intHandle = (Int32)handle;
IntPtr ptrHandle = new IntPtr(intHandle);
//get the image
Image img = Image.FromHbitmap(ptrHandle);
//does not work either
//Bitmap bmp = Bitmap.FromHbitmap(ptrHandle);
Image.FromHbitmap throws this exception:
System.Runtime.InteropServices.ExternalException' in system.drawing.dll
Additional Information: A general error has occurred in GDI+
Thanks for every hint,
Corinna
|
|
|
|
|
I'm reading in some XML where the date is formatted like: Mon, 01 Sep 2003 11:50:00 PDT. I can read this element as text and I want to convert it to a System.DateTime but the XmlConvert.ToDateTime and DateTime.Parse don't seem to support a format for the timezone (i.e. interpretting the "PDT"). I've also looked at the TimeZone class but no help.
Can anyone give some direction on how to handle this formatting-wise either by telling me what format represents timezone (no "zzz" doesn't work) or a class/method that can help here?
Thanks.
|
|
|
|
|
Anything that goes into a collection must also be Serializable if you want to serialize it. So make sure CodeItem is set as Serializable.
dog_spawn
http://www.hatekill.com[^]
|
|
|
|
|
Hi there,
I set up a DataSet (C#/.net) with a few tables, one table containing the DataSet Primary Key and the other tables containing only Foreign Key refering to the PK.
Now I am trying to populate the DataSet manually, reading from a Binary File:
FileStream fs = new FileStream("C:\\File", FileMode.Open);
Byte[] abyBuffer = new Byte[fs.Length];
BinaryReader r = new BinaryReader(fs);
db3plus.headerRow hrow = db3plus1.header.NewheaderRow();
hrow.version = r.ReadByte();
db3plus1.header.Rows.Add(hrow);
db3plus.lastupdateRow lrow = db3plus1.lastupdate.NewlastupdateRow();
lrow.byte1 = r.ReadByte();
lrow.byte2 = r.ReadByte();
db3plus1.lastupdate.Rows.Add(lrow);
The thing is, the Relation I set up between these two tables seems to be lost, since the second entry won't be inserted in the same DataSet as the first entry.
Leaving me with the second Table not having a Relation (Foreign Key) to the Parent-Table
Any help?????
|
|
|
|