|
Hi all!!!
Problems....i hate programming problems....why VS .NET tells me that Tcp type namespace doesn't exist in System.Runtime.Remoting.Channels?? (i've put using System.Runtime.Remoting.Channels and System.Runtime.Remoting.Channels.Tcp and i never had good results....why?)
---
((.)) The Vortex ((.))
|
|
|
|
|
Have you added a reference to System.Runtime.Remoting.dll?
I assume you are trying to use a class out of the System.Runtime.Remoting.Channels.Tcp namespace (such as TcpChannel).
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
Ive been all over for this one. Im trying to use TraceHook.NET from www.razersoft.net/TraceHook.htm , but there are so many limitations and it seems to have been written using beta code.
The functions its using all have this disclaimer in their help:
The IContextProperty type supports the .NET Framework infrastructure and is not intended to be used directly from your code.
So the code works fine, but all objects MUST inherit from System.ContextBoundObject -- which is an object, not an interface... so I can't put this on forms or anything else that inherits from a class.
Has anyone worked with this thing recently or been able to modify it to a more usable tool? or can someone explain how this thing even works? Ive got the jist, but im still fuzzy on how it ties together. Of course there is no documentation, so im SOL there.
and i have tried to contact the writer with no luck.
thanks
|
|
|
|
|
hi,
i've searched the graphics-class, but i didn't found how to draw a single point.
when i use g.DrawLine(pen,x,y,x+1,y); i get the two pixels connected.
when i use g.DrawLine(pen,x,y,x,y); i get nothing.
any idea?
:wq
|
|
|
|
|
I would suggest to spit on screen so you would get points on screens
More seriously, there is no DrawPoint method available.
MS recommends to use GDI (Marshalled) which is still available.
Or, if performance is an issue, go unmanaged, lock a ptr on a surface and start playing with it.
Now AFAIK, I would recommend a simple to use FillEllipse(x,y,1*nZoomFactor,1*nZoomFactor) where nZoomFactor=1.
And I swallow a small raisin.
|
|
|
|
|
marshalled? unmanaged? wtf?! i only want to set a single pixel!!!
it seems, i will try the fillellipse-thing...
but thx for the tip!
:wq
|
|
|
|
|
Here is the code,
[DllImport("gdi32.dll", CharSet=CharSet.Auto)]
static public extern int SetPixel(IntPtr hdc, int x, int y, int rgb);
SetPixel(dc,x,y,rgb);
And I swallow a small raisin.
|
|
|
|
|
phew. that works. thx!
anyways - i still don't understand why ms doesn't include a DrawPoint(Pen,int,int) or DrawPoint(Pen,pt) function into the graphics-class.
:wq
|
|
|
|
|
I guess for known performance reasons MS didn't think that was a good idea to allow DrawPoint. Well to be honest, the fact that DrawLine(x,y,x,y) does not work properly is a bug.
DirectX+GDI advocates have been fighting for years to train developers to lock a ptr to an actual surface, and then poking inside, instead of doing silly SetPixel loops. For real world apps such like real-time imaging, locking surfaces is of course the recommended solution,
And I swallow a small raisin.
|
|
|
|
|
hmm. might be a reason. when i think it over, i could have created a bitmap before the operation, set the pixels within the bitmap and draw the bitmap at the proper location...
i see there's a trade-off between 'amount of code' and 'drawing speed' - but in my simple case the setpixel-speed is abolutely ok.
:wq
|
|
|
|
|
FillEllipse(,,,1,1) does not solve the problem
going marshalled...
:wq
|
|
|
|
|
MS recommends to use GDI (Marshalled)
where do you know that from? how does someone get to know what MS recommends...?
:wq
|
|
|
|
|
SetPixel
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
i don't want to draw on a bitmap but rather on a graphics-object
:wq
|
|
|
|
|
Hi,
I've developped a little application to communicate by serial ports in .NET. It uses Kernel32 API the same way the communication was done on VC++ 6.0.
When I had finished it I copied it to a W98 computer with the .NET Framework already installed. The problem is that I get an exception just when I try to execute it and nothing works (neither the form is shown, only the error message).
I tried it on another W2k and gets an exception on "unknown module" about a "invalid URL direction".
Does anyone knows what's happening?, maybe I should make an installation project for it?
Thanks in advance,
EdgarBM
Edgar Berengena Moreno
Software Engineer
Appeyron Research
|
|
|
|
|
Is the program relying on a dll that isn't included in the .NET Framework? That could be the problem.
David Stone
It seemed similar to someone saying, "Would you like to meet my knife collection?"
Ryan Johnston on Elaine's sig
|
|
|
|
|
Hi,
thank you for your reply.
I'm using API "Kernel32" the functions:
WriteFile
ReadFile
GetLastError
CloseHandle
CreateEvent
SetCommTimeouts
GetOverlappedResult
WaitForSingleObject
...but I realized that if I execute the program locally (note remotelly) it executes, although it doesn't works fine because those functions doesn't work.
Do you have any idea about it?
Thank you again,
Edgar
Edgar Berengena Moreno
Software Engineer
Appeyron Research
|
|
|
|
|
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
|
|
|
|