|
|
In my plugin project, when i build it,its done successful.I got a window pop up with greeting of hello world whn i click the home icon of IE browser in windows xp.I need the same output pop up window in IE browser in vista system,But when i run same in vista os the error i found are :
1.Error 2 Cannot register assembly "C:\Users\sreeni\Desktop\ESoftIEPlugin\ESoftIEPlugin\ESoftIEPlugin\bin\Debug\ESoftIEPlugin.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\ESoftIEPlugin.SpicIE' is denied. ESoftIEPlugin
2. Warning 1 Cannot unregister assembly "C:\Users\Surya\Documents\Visual Studio 2008\Projects\ESoftIEPlugin\ESoftIEPlugin\ESoftIEPlugin\bin\Debug\ESoftIEPlugin.dll" - file doesn't exist. ESoftIEPlugin
for this itried to register the dll to rectify the error but again i found window error in vista ie windows cannot find regsvr32"c:\Users\Sreeni\Desktop\E.dll".Make sure you typed the name coirectly,and then try again.
please any one help me out for the above errors or any other suggestion to do.Thanks in adavance.
Thanks and Regards
Ch.Gayatri Subudhi
|
|
|
|
|
While adding dynamically Tab Pages to tab control. New created tab page should come next to selected tab page. By default new tab page will place at last position of tab control.
Is there any property in Tab control to do the same.
Thanks in Advance
|
|
|
|
|
I suggest you reinstall visual studio, I am guessing that intellisense is broken on your machine. Once you do that, if you type myTabControl and hit the ., you will get a list of possible methods to call. Look for the Insert method. You'll find that it even gives you popups telling you what everything does, so you can use it to explore a class for anything you think should be in there.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
This is a real basic question but does anyone know a beginner tutorial that shows how to utilize a webcam attached to a computer? This is something new I am trying to learn and didn't really find much online. What I did find was some video chat that was far too advanced for myself. I am just looking at displaying what the webcam sees for now.
|
|
|
|
|
There's some articles on CP. basically it's a directX stream.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Ok I have found the DirectX.Capture which seems to be usign DirectShow.
Sorry to sound so stupid, but do you happen to have a good book that you know of that teaches how to use DirectShow SDK. I am actually interested in learning how to create a video chat application. I have downloaded the library mentioned at: DirectX.Capture Class Library[^]
Seems it does pretty much everything. I used it with a panel to show myself on a webcam. I'm interested in learning more about this and just wondering if you have any suggestions on books that you may have read or know people have read and liked
|
|
|
|
|
You my search for Aforge.net on Google/CP
IT deals in motion detection but any way its using web cam - and its easy to use - Personal experience
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
You might find This^ a bit easier than trying to delve into Direct X. Later on Direct X is really the way to go though.
The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.
|
|
|
|
|
is it possible to read the contents of multiple text files without using openfiledialog option.......????
if so how ???
|
|
|
|
|
|
Hi all
I am having a strange problem.
I am writing a simple chat, client side and server side (it for testing and learning)
When trying to read a string from the NetworksStream using a BinaryReader, works ok if I am sending data from the client. if there is no data, the application hangs...
since I want to listen in one side and read all the time from the stream until the data will arrive, I have a little problem.
Why is it hang?
Here is the Code of the Chat module, after a good connect, when I first send data from the client and then read a the server - working good. try to read without sending the data first - hang for good...
namespace ChatEngine
{
public class Chat
{
static private BinaryReader binaryReader;
static private BinaryWriter binaryWriter;
static bool connected = false;
static public void WriteLine(string message)
{
if (connected)
binaryWriter.Write(message);
}
static public string ReadLine()
{
if (connected)
{
// this is the line that making the problems.
// if the stream is empty, the application zhangs.
return binaryReader.ReadString();
}
else
return null;
}
static public bool connect(IPAddress ip, bool server, int port)
{
try
{
if (server)
{
TcpListener listener = new TcpListener(ip, port);
listener.Start();
TcpClient client = listener.AcceptTcpClient();
NetworkStream ns = client.GetStream();
binaryReader = new BinaryReader(ns);
binaryWriter = new BinaryWriter(ns);
connected = true;
return true;
}
else
{
TcpClient client = new TcpClient();
client.Connect(ip, port);
NetworkStream ns = client.GetStream();
binaryReader = new BinaryReader(ns);
binaryWriter = new BinaryWriter(ns);
connected = true;
return true;
}
}
catch (SocketException e)
{
return false;
}
}
}
}
Thanks for any help,
Ady.
|
|
|
|
|
AFAIK, ReadString() throws EndOfStreamException when there is no data in stream. Hanging looks odd and problem will be somewhere else. Anyway it is always good to check data exist before you read from stream. Just do a check before you read the string. Something like,
bool canRead = (binaryReader.Read() == -1) ? false : true;
if(canRead){
binaryReader.BaseStream.Seek(0, SeekOrigin.Begin);
return binaryReader.ReadString();
} Hope that helps
|
|
|
|
|
Thanks
This is not helping, after checking , canRead is true, but then when calling readstring it hangs, even that I sent data from the other side...
If not checking, when sending data from the other side (client) it reads ok.
only when there is no data, and I am trying to read, its hangs...
Maybe that is a clue why its hang when calling ReadString()?
|
|
|
|
|
No quite sure I understand exactly what you mean here, but the chances are the BinaryReader is blocking (eg. waiting for data to arrive) which is causing your hang. This makes sense, you can't read what hasn't been sent yet.
When sending data over a network stream, some buffering is employed too. So writing a single byte to the stream doesn't mean it will be transmitted. The .NET framework will wait until a certain amount of data is present in the stream before sending it. You can't send single byte network packets out. If you think that might be the problem take a look at flushing the underlying stream. This causes all the data in the buffer to be sent immediately.
Also, on something like this, you want to use multithreading. In particular the server will have multiple client connections, each needs to be served by its own thread. It's usual to send the TcpClient which is returned from AcceptTcpClient() to its own thread until the connection is closed. Without that, your server can only accept one connection at a time - surely not that good for a chat application.
Regards,
Rob Philpott.
|
|
|
|
|
Thanks Rob
I guess you right, the binaryReader is blocking, but I don't understand why... its suppose to return null if there is no string to read.
When there is a string that I sent from the client, he reads it and everything is ok, so I don't understand whats going on.
As I checked, I don't need to flush, cause sending using binary writer on the client is ok and I am getting it ok at the server.
I am using BackgroundWorker to call Chat.ReadLine(), and off course this is only a sample that I am doing to learn a bit, it will not be a real chat application, only academic reasons.
(not less important )
Thanks,
Ady.
|
|
|
|
|
You're welcome!
I'm surprised that BinaryReader is supposed to return null if there is nothing to read. I can't find anything to support that assertion on the net (just a quick look). Particularly, if I call something like ReadInt32() on it, there's no option for returning null as its a value type.
Also, you can attach it to any type of stream behind the scenes, so it's more the behaviour of the backing stream than the reader itself.
Regards,
Rob Philpott.
|
|
|
|
|
Yes, my mistake. I assume that if string is not availe, then it will return null.
The solution was to check the stream and not the reader:
if (ns.DataAvailable) return binaryReader.ReadString();
Thanks
Ady.
|
|
|
|
|
Hello everyone,
In my scenario there are resources (e.g Hashtable, String, Collections...).
The resources are:
1. By definition ReadOnly
2. Loaded on-demand from the file system / DB.
3. Big memory consumer.
4. Thread Safe
5. Read by different Threads. (So it's called Shared Resources)
The question:
Because the resources are big memory consumer, I'm looking for idea how to get those goals and make sure to release the resources when I don't need them.
The problem:
If the resources hold by global objects (Global objects so different threads will be able to read them) - The Resources will never get be freed by the GC because the global objects will be static or will be hold by the client until termination.
Any idea ?
Thanks
|
|
|
|
|
Sort of defeats the purpose of having a global object it seems to me. I use these to reduce the reads to the Db for static classes/tables and regularly set them to null, I assume this reduces the memory footprint for the object (that's not why I do it but I would assume that would be a consequence).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Moshe T wrote: The Resources will never get be freed by the GC because the global objects will be static
Read about WeakReference[^] class. MSDN has got an example which will help you to get started. Quoting from MSDN,
A weak reference allows the garbage collector to collect an object while still allowing an application to access the object. If you need the object, you can still obtain a strong reference to it and prevent it from being collected
Other idea is to have a separate thread which looks in the collections frequently and removes the items from it which you don't require.
Edit
You can also create a new application domain for your threads and collections. So when you don't need it, just terminate the application domain and all your resources will get released.
|
|
|
|
|
Is it possible to add a Linecap to a GraphicsPath? I've played around a bit and it looks like I'm going to have to change my paths to lines, but I'm a novice so if anyone has a genius workaround it would be much appreciated!
Thanks in advance
|
|
|
|
|
Hi,
I haven't done this but I expect all Graphics.DrawXXX() to obey the Pen properties, so I suggest you set StartCap, EndCap (and sufficient Width) to enjoy line caps.
|
|
|
|
|
Just in case you are still having problems, take a look at the application from this[^] link. The app has an option to turn linecaps on/off for the GraphicsPath .
I tried to post this last night, but the servers were misbehaving so I gave up and went to bed.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks.
The problem was that the path did not originally have caps, and so CloseFigure() was used to end the path. Removing this allowed Linecaps to be added, and the Caps automatically close the path anyway.
|
|
|
|