|
I must be doing something wrong, cuz I am testing out some this mechanism and I make a simple call to a Javascript function like this:
string path = Path.Combine(Path.GetDirectoryName(this.GetType().Assembly.Location), "VirtualEarth.htm");
webBrowser1.Navigate(path);
webBrowser1.Document.InvokeScript("doSomething");
function doSomething()
{
MsgBox("you suck");
map.HideDashboard();
}
Nothing happens.
|
|
|
|
|
What does mean 'Internal' and 'Protected Internal' for a class.
Durgesh Kumar Mishra
|
|
|
|
|
Internal means the type is only accessible from within the assembly it is defined in.
Protected Internal is simply a combination of the two class modifiers. We know that "internal" means the type can only be accessed from withing the assembly it is defined in. And we know that "protected" means it can only be accessed by the containing class or classed derived from the containing class. So, protected internal means the type can only be accessed by the containing class and derived classes that are included in the same assembly.
-- modified at 13:32 Thursday 17th May, 2007
|
|
|
|
|
protected internal means that the member can be accessed from the current assembly *or* derived classes (both conditions do not need to be true).
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
C++ to C# Converter: converts C++ to C#
Instant C++: converts C# to C++/CLI and VB to C++/CLI
Instant Python: converts C# to IronPython and VB to IronPython
|
|
|
|
|
Ah. Right you are. My mistake.
Thanks!
Ian
Ian
|
|
|
|
|
Hi,
Modifier internal means that we can only access that class from the same assembly.
"protected internal" cannot be applied on class. But it can be applied on members. This means two things. It is either derived classes or classes in the same file that can access that member.
Manoj
|
|
|
|
|
manojkumarrai wrote: "protected internal" cannot be applied on class
It can if the class is nested within another class.
Ian
|
|
|
|
|
Thanks Ian.
I have not tried it. Bit I will use it when I can.
Manoj
|
|
|
|
|
hi all,
i want to compare the two versions of same software to update the lower one with higher one,
i could get the current version which is already installed in clients system by using reflection and now wants to fine and compare the version wich is in server?
could able to download the version that is there in my website,
but here i've strucked coz, i couldn't able to check the software version which is in server.
i got the current application version by using system.reflaction namespace's getCurrentassembly.fullname() property
please tell me how to find version of application which is in server.
do i need to write any xml or anything is my msi/setup please help me
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
I have a C# app that wraps windows media player to play some streaming audio. I need a way to determine the sound level of the stream (Not the volume level that media player is set to). Any one know how to do this?
sean
|
|
|
|
|
Hello everybody,
I hope someone will be able to help me with something I have come across.
What I want to do is to recognize a specific object in a picture. I will process the image and we will suppose that the image is taken from the same distance at a certain interval of time (let's say with a webcam).
Now, what I have done is extracted all the objects from an image using Andrew Kirillov's Image Processing Lab (it can be found here on codeproject). However, the Image Processing Lab extracts Blobs, which are formed of the object I am interested and it is placed in a rectangle.
What I want to do is to extract ONLY the object and I have no clue on how to do that. Does anyone have any ideas ?
After that I want to compare that object with another one extracted from another picture.
Is there a way of comparing two pictures and searching for a certain object?
I guess I am looking for a simple shape recognition algorithm.
Please guide me on this,
Thank you very much,
OviDeus
|
|
|
|
|
Short and skinny version.
I am creating a application that will copy files from one location to another. There will be an option that allows the user to automatically delete the destination folder after a specified number of days. Before implementing this functionality I have been trying to delete the directory by hard coding the destination path. But each time I do only the files are deleted and the folders are left behind and I'm left with a IOException, telling me that access to the specified path is denied.
Any thoughts?
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
There is an overloaded .Delete method that allows you to delete all subdirectories as well.
|
|
|
|
|
I have set the recursive to true:
DirectoryInfo asdf = new DirectoryInfo(temp.getDestination());
try
{
asdf.Delete(true);
}
catch(IOException d)
{
MessageBox.Show(d.ToString());
}
The folder that I am trying to delete contains a folder, which contains another folder, which contains another folder, which contains 12 files. The 12 files get deleted but the folder that contains the 12 files is the folder that the exception says access is denied on.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
Hi,
Try to delete the folder using "DirectoryInfo.Delete(true)" function. Please note that you need to provide the parameter as "true" so that even if there are files and sub-folder in that particular folder, they all will get deleted.
Manoj
|
|
|
|
|
I have tried this.
Thanks for the suggestion though. I just don't get why something so simple is causing me so much hassle.
The folders that I am trying to delete have been copied by my application.
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
Try checking if any of the files in the folder are left open.
|
|
|
|
|
Got it!
Nothing to do with open files or folders.
When I was copying form on the source to the destination I needed to specify Access Control:
if (!Directory.Exists(Dst))
{
Directory.CreateDirectory(Dst);
System.Security.AccessControl.DirectorySecurity asdf = new System.Security.AccessControl.DirectorySecurity(Dst, System.Security.AccessControl.AccessControlSections.All);
}
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
Thanks to everyone for their suggestions. They were greatly appreciated .
Freedom is the right to say that 2+2=5 if this is so everything else will follow.
|
|
|
|
|
If
MicealG wrote: access to the specified path is denied
then are you sure that the directories/files aren't Read Only or being used by another application?
That's always the first thing that comes to my mind whenever something tells me access to a file is denied.
|
|
|
|
|
hi all,
i am going to give update feature to my client, and for that i kept all the updated files(latest version) in my Website's Path and now i want to download that files in to the local machine(what ever may be the machine--i mean wat ever may the client is using),
for this i gave one buttion saying Update, whenever the client click on Update i need to check latest version which is available on my Website and need to download that in to his local system and update.
Please any suggestions
help me
thnx in advance
prashanth
|
|
|
|
|
|
thank you led mike,
but i have used it and left with no result,its working fine for sample applictions and not to main applications(which is having many dependancies) i couldn't able to find out the reason too.
comming to my requirement as an alternative
i could able to download the version that is there in my website,
but here i've strucked coz, i couldn't able to check the software version which is in server.
i got the current application version by using system.reflaction namespace's getCurrentassembly.fullname() property
please tell me how to find version of application which is in server.
do i need to write any xml or anything is my msi/setup please help me
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
pashitech wrote: couldn't able to find out the reason too.
Have you researched Click Once? There is plenty of information about it, books even.
http://msdn2.microsoft.com/en-us/library/ms996413.aspx
http://windowsinstaller.info/pages/en/clickonce.htm
led mike
|
|
|
|
|
I've got a stringbuilder object back from a dll for which i don't have the source by using an API call. The api call is a blackbox I have no idea what happens inside it.
Inspecting the stringbuilder in VS shows the same result as inspecting the output in the VB6 app i am trying to copy.
I now need to perform a bitwise mask on each of the bytes in the stringbuilder as that is what the original app does.
How can i get a byte array of ASCII values out of a string builder?
I've tried these 2 approaches:
Encoding enc = Encoding.ASCII;
byte[] bytes = enc.GetBytes(text.ToString());
This overflows value bigger than unsigned byte...
for (int i = 0; i < text.Length; i++)
{
Console.WriteLine(text[i] + " " + Convert.ToByte(text[i]));
}
this produces output that doesn't seem to bear much relation to the input data.
I've tried these 2 approaches:
this produces output that doesn't seem to bear much relation to the input data.
Encoding enc = Encoding.ASCII;<br />
byte[] bytes = enc.GetBytes(text.ToString());
This overflows value bigger than unsigned byte...
for (int i = 0; i < text.Length; i++)<br />
{<br />
Console.WriteLine(text[i] + " " + Convert.ToByte(text[i]));<br />
}
Has anyone played with string compatability between VB6 and c#?
Russell
-- modified at 11:34 Thursday 17th May, 2007
|
|
|
|