|
An asset is something that is of value to you. It's a sig, not a comment to you.
chirag_nine wrote: actually i m developing Bookmark Manager!
for tat i need to learn how to import and export favorites from any web browser.
You need to work out how each browser stores them. I think IE stores them as HTML, so you just need to know where to look for them. There's no central API, you're talking about how different browsers work, you need to research that and then work with the info you find.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I have a problem while making dll. i write methods in to dll and on my project i give reference and task(i am sure that i have no mistake at using dll part) but i when i use dll method debugger gives me this method is in (ExDll.dll)
how can create a methods in dll, can any one give me step by step solution.
Thanks
Best Regards
|
|
|
|
|
Create a dll project
add a method
compile
Unless there's something you're not telling us, there are no special steps required. What is your problem ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I assumed that i have added a method but after i included it vs doesnt see this method
here is the dll code
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
<br />
namespace ExDLL<br />
{<br />
public class Class1<br />
{<br />
public static int ExMethod(int a, int b)<br />
{<br />
return a + b;<br />
}<br />
}<br />
}<br />
Thanks, i wait your reply
|
|
|
|
|
The line ExDLL.Class1.ExMethod(1, 2) will return 3, if you have a reference to the DLL in your project. The most common mistake here, is to forget about scoping the namespace, either directly or with a using statement.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hello;
In .net side, after i add reference to dll, should i use it like
int r = ExDLL.Class1.ExMethod(3,4);
|
|
|
|
|
Yes, unless you have using ExDLL inside the class.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
How to make a MaskedTextBox in Visual Studio 2003.
Vasildb
|
|
|
|
|
|
Hi,
I'm currently working on a library which deals with sockets.
One of the classes I wrote is Buffer , which is generic.
It is declared like so:
public class Buffer<TPack> where TPack : IPack<TPack> { ... } The IPack interface defines, amongst others, the following function signature:
TPack FromReceivedData(byte[] data, int startIndex); My problem is to force the implementers to declare FromReceivedData() as static.
Interfaces do not allow it.
What should I do?
Hopefully I've supplied enough information.
If you need to know more in order to understand the problem, please tell me and I'll post some more code snippets.
Thanks in advance,
Shy.
|
|
|
|
|
If the interface defines it then it must be instance.
If you want it static use an abstract class.
Also, you will have to write a generic method because the static method will not use the Generics from the instance.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|
|
Why do you want it to be static? Then the only way for you to call it would be to use reflection.
The reason that interfaces can not contain static methods is that you can not call a static method using an interface. You need to specify the actual class to call a static method.
---
Year happy = new Year(2007);
|
|
|
|
|
hi all,
i try to scan a word document for a string and then to write the sentences containing this string to a new "result" document (also word). now, how do i get the line number of this sentence and how can i write each found sentence on a new line in my resultdocument?
i tried like this:
sentence.Find.Text = tofind;
bool present = docrange.Find.Execute(ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj,ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj,ref nullobj, ref nullobj);
//results is the the document for the found sentences
resrange = results.Range(ref nullobj, ref nullobj);
if (present == true)
{
--> here starts my problem
how can i get the line number of "sentence" (where i found it)? and how can i fill "resrange" line for line with the found sentences? InsertAfter isn't the right solution i think.
resrange.InsertAfter(sentence.Text);
}
thanks for help
hofi
|
|
|
|
|
Hi,
I'm having troubles with XML deserialization in C#. Here is my class:
[Serializable]
public class A : IDeserializationCallback
{
public A()
{
m_MyString1 = "Test";
m_MyString2 = "";
}
public string MyString1
{
get { return m_MyString1; }
set { m_MyString1 = value; }
}
public string MyString2
{
get { return m_MyString2; }
set { m_MyString2 = value; }
}
void IDeserializationCallback.OnDeserialization(Object sender)
{
m_MyString2 = m_MyString1 + m_MyString1;
}
private string m_MyString1;
private string m_MyString2;
}
m_MyString2 is always "" in my case. Do I have to do anything else than implementing the interface to ensure that the OnDeserialization() method gets called?
Thanks in advance,
Rainer
|
|
|
|
|
Hey, I'm just about to go into my final year of school.
I have to do a programming project and I have decided to start early because what I have chosen to do will require a lot of learning on my part and a lot of work.
The project I have decided to do is an Internet Radio. I am currently building the server which has to stream the audio to the listeners as well as be semi-controlled by DJ's that will have a seperate application (developed by my partner). The client has to be developed in Delphi as thats the language that is taught at our school.
I am writing my server in C# because I think it's much better and would like to learn more.
I have run into some problems....
The way I have it now, I have a mediaplayer object that plays the music and an WMEncoder object that broadcasts it.
Problem 1:
Where the encoder gets its source: SrcAud.SetInput("Default_Audio_Device", "Device", "RadioStream");
This makes it capture the audio from the recording channel of my sound card (which by default is microphone), I have to change the channel to "What you hear" for the music to get broadcasted. This causes problems as you can imagine because any sound that is played on my computer also gets broadcasted with it.
Problem2:
The client (in Delphi) needs to send the server a stream of the DJ's voice that needs to be mixed into the broadcasted stream.
I can get Delhpi to record audio to a file, but I have no clue as to how I'm going to get the audio streamed and mixed into the server's broadcast.
If anyone has any suggestions, it would be GREATLY appreciated!
Thanks in advance.
df
|
|
|
|
|
Can't help you. But I'm curious...What school gives project like these?
What are you?
|
|
|
|
|
Well, I wasn't GIVEN the project. I'm in South Africa. Im not sure what type of Programming you guys do in school, but I sure was getting bored with Delphi and the easy stuff.
I wanted something challenging. I chose the project myself. I want to learn C# before I get to university.
What am I? A martian invader from the planet Grazaplm in the universe Gepu.
df
|
|
|
|
|
makemoneyfast wrote:
I wanted something challenging. I chose the project myself. I want to learn C# before I get to university.
Learning C#/Java before going to university is indeed quite useful, but you chose a very ambitious project here. Most of our projects at university are way easier than your high school project
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I am ambitious. I know I've taken on a lot, my implementation most certainly wont be the most efficent and best way to do it, but I'm learning a great deal. I've already got my program to broadcast the music and a soap interface invokable by the DJ Client application to change the song etc. There's just a couple of things I'm having a problem with as outlined in my original post.
df
|
|
|
|
|
Hi,
I and nobody I know ever did any programming in school..
Regards,
Cormac
|
|
|
|
|
Two choices with the DJ voice. 1 you can merge it into the stream which is probably a little bit harder (and I have no idea other than saying look at your sound card api doc), the other option is to publish two streams. One for music, on for DJ. Both of which can be played at the same time.
Personally, if I was in Highschool, I would have picked an easier assignment(Actually, I did. I wrote a 2D space shooter in VB4). But since you didn't a good place to look would be the open source community, and source forge. They may not have code samples in your specific language but I think these tasks have been done before so you can follow the examples of others.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|
|
Well, think of what sort of percentage I'm going to get if I complete the project
Thanks for your help.
In terms of the two streams, wouldn't that mean that the listener would have to open two media players to play the seperate streams?
df
|
|
|
|
|
That you were writing the down end player as well. If you are planning on using an existing player and playing from one stream ... hrmm, look into the Lame encoder?
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: That you were writing the down end player as well.
I am ambitious but not THAT ambitious!
Ennis Ray Lynch, Jr. wrote: hrmm, look into the Lame encoder?
I most certainly will.
Thanks.
df
|
|
|
|
|
I'm a bit confused at something...
Look at this code:
((ISupportInitialize)(this.trackBar)).EndInit();
There is no significance to this particular code, it's just an example.
trackBar is an object that implements the ISupportInitialize interface. That interface only defines BeginInit() and EndInit().
Questions:
1. trackBar does NOT implement these methods at all - how come this is allowed? Obviously ISupportInitialize doesn't implement them either, as it is an interface.
2. How can we cast from trackBar to ISupportInitialize and call a method with no implementation?
What is going on? Also, why cast at all if trackBar1 DID implement them?
Also, when you do cast from an object that implements interface X, does that new casted object only contain the methods that X defines?
I'm ashamed to not know this - and I'm sure it'll be very clear, but it's just going against the grain to what I know.
Thanks,
Cormac
|
|
|
|