|
If it's hosted as a service use a service controller component...
However, what you are trying to do implies that the server is always on the client - why use remoting?
"Enterprise Solution Patterns using Microsoft .NET" says that remoting calls can be at least 1000 times slower than a local call in the CLR.
Tatham Oddie (VB.NET/C#/ASP.NET/VB6/ASP/JavaScript)
tatham@e-oddie.com
+61 414 275 989
|
|
|
|
|
Tathan thanks for your response,
I am using remoting to communicate between my BHO and a C# application. The BHO's are loaded by each instance of Internet Explorer, each seperate from one another, and relay information to the application. The nature of a BHO is that it runs in the same process as the IE instance, and therefore isn't in the same CLR as the application (each BHO is in it's own CLR instance).
I looked at the ServiceController class, but it seems to be for the purposes of starting and stoppig a windows service. I don't have any services- it's all apps (well and BHO's). (Also btw, a service could be running but have it's remoting server turned off...) Am I missing something?
thanks
bog
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
I'm developing my first useful C# application, and I've come to quite a few points where I'm thinking "There has to be a better way to do this than what I'm doing", and this is one of those cases.
Often times when I load a dialog, I'll need information/objects from the main form in the new loaded dialog. Right now when I load a custom dialog from the main form, I do something like this:
CustomDialog dlgName = new CustomDialog();
dlgName.Loader = this;
dlgName.ShowDialog();
...
And then to access the main form's data in the CustomDialog example:
Loader.DataINeed;
Is there a special variable or other way I can access the main dialog's public objects from a new dialog without passing a reference to that main dialog's object?
|
|
|
|
|
Delegates/Events will do the trick, there are many articles here on CP discussing this. You should also look into creating your own EventArgs class which can be tied to your delegate . HTH
-Nick Parker
|
|
|
|
|
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, when the ListView is re-sorted the data gets out of sync.
For testing purposes, I added a few simple controls which also bind to the same DataTable, for instance a TextBox and a CheckBox (one of the column is Boolean).
After setting the ListView and the Controls' DataSource to the same DataTable, the data is synced such that if I select an entry in the ListView, the TextBox and CheckBox show the proper values.
Now, after sorting the data using different columns, the data in the textBox and CheckBox doesn't show the same value as the selected item 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 ?
Thanks.
Luc Morin
|
|
|
|
|
in the code behind page for my web application i enter newline characters (\n) but the label that i want to display the text ignores the newlines and prints as one long line
thanks all
gil s
|
|
|
|
|
As much as I can rememeber I set the width of Label to 0 then it was resize according to the text I gave ti it automaticly,Setting width of Label is kind of hard,it very depend on where do you pet the label like is it in a table cell and how do you set the properties of Table,Row or its cell.
Mazy
No sig. available now.
|
|
|
|
|
Any suggestions on how best to retrieve a web page via an HTTP connection and then save/display the results as an image. I can get the web page as HTML okay within a stream but am not sure what to do with it next.
Any suggestions would much appreciated.
Cheers
Andy
|
|
|
|
|
I'm new to this but I choosed the way of 'Capture the screen'. The basics you can read here: http://www.c-sharpcorner.com/Graphics/ScreenCaptFormMG.asp
BUT there's a BIG problem with this: the browser screen/windows can NOT be overlapped !!! If some windows is on browser windows so both of them will be on screenshot image! Nothing we can do about this. I choosed to make the browser window 'Top most' in properties but... this is not the way.. and the browser windows can NOT be hidden !! No screenshot in this case (just empty space)
Another way is to go down and handle all HTTP POST/GET request by yourself but it's seems like a hard way You can check 'mshtml' class for this.
P.S. How did you get a HTML page on stream ? How did you open a stream to HTML page ? Can you send me a code ?
"I have not failed.
I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931)
|
|
|
|
|
To get the user from directory service the below code works perfectly fine.
But i want to access files in the user name ou=myname. I have place a text file name note.txt in myname writeing this addres in explorer
ftp://.admin.myname.user.novell@nldap.com/USER/myname/
all i want to know how to access the files. How can i get the files which i have uploaded on myname..... so i can modify n delete them also.
i have got the help to add user modify user n delte user but not abot the files of users ...
string path = "LDAP://www.nldap.com";
System.DirectoryServices.DirectoryEntry entry = new .DirectoryServices.DirectoryEntry(path);
System.DirectoryServices.DirectorySearcher mySearcher = new
System.DirectoryServices.DirectorySearcher(entry);
mySearcher.Filter = ("(ou=myname )");
SearchResult result = mySearcher.FindOne() ;
if( result != null )
{
Console.WriteLine("User found");
foreach( string key in result.Properties.PropertyNames )
{
// Each property contains a collection of its own
// that may contain multiple values
foreach( Object propValue in result.Properties[key] )
{
Console.WriteLine(key + " = " + propValue);
}
}
}
else
{
Console.WriteLine("User not found");
}
|
|
|
|
|
i have search form which is modal , i want to return some values back to main form n search it there , can any one help me , i hope so
anyways thx n tc
Work Hard and Test your Luck
|
|
|
|
|
Put the values into public properties and retrieve them after closing the dialog:
YourSearchDialog dlg = new YourSearchDialog();
if( dlg.ShowDialog() == DialogResult.Ok ){
yourResult = dlg.ResultProperty;
}
|
|
|
|
|
Hi All,
I have a solution where I have some of my classes written using MC++ and I'm trying to use those classes in my C# project, but I can't for the life of me figure out how. I'm not sure I have make the C# project aware of the classes. I think I'm going to need to use a "using" statement, but I don't know what it should be. The MC++ stuff is in an exe and not a dll so I don't think I can add a reference to it. Any help would be appreciated.
Thanks
- monrobot13
|
|
|
|
|
|
If you're going to share code between apps/libraries, it probably should be in a DLL, not an EXE. That will probably solve your problem.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
|
But my answer was more readable.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Thanks for the info gentlemen. I'll have to more the classes I need out and put them in their own project.
- monrobot13
|
|
|
|
|
Sorry if this is a FAQ. What version of visual c# should I buy as an individual developer with a somewhat limited budget? I don't want to shell out $1,000 for visual studio if I can avoid it. What will I really miss by getting Visual C# .NET 2003? Any reason not to buy "Visual C# .NET Deluxe Learning Edition Version 2003" which includes "Visual C# .NET 2003 Standard" which I found for about $60? Thanks for your advice on this.
-- Bud
|
|
|
|
|
The learning edition is for students only and I don't think it can be used to produce commercial code.
VC# std ed should be fine, depending on the type of work you intend doing with it.
Cheers,
Simon
sig :: "Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
article :: animation mechanics in SVG picture :: my first abstract photo
|
|
|
|
|
Are you sure about that? It looks to me like a bundling of a book and Visual C# .Net. Microsoft's web site doesn't say it is an academic version. See this link[^].
-- Bud
|
|
|
|
|
I see what you mean.
I'd contact your local MS office and find out exactly what version is in that book.
Cheers,
Simon
sig :: "Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
article :: animation mechanics in SVG picture :: my first abstract photo
|
|
|
|
|
SimonS wrote:
VC# std ed should be fine, depending on the type of work you intend doing with it.
One of the things that concerned me was I want to be able to create windows services and web services. I tought I read that there were some limitations on doing this in the standard edition.
Also, will I be able to import ActiveX controls with the wizard?
Thanks. -- Bud
|
|
|
|
|
Correct, the standard edition is limited. Hence the drastic price difference between it and the pro/enterprise architect edition.
Occording to this[^] site, you can create XML web services, but I don't think that you can create Windows services though.
Cheers,
Simon
sig :: "Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
article :: animation mechanics in SVG picture :: my first abstract photo
|
|
|
|
|
Would someone be able to give me the inside scoop on delegates and remoting? How hard or easy is it to use delegates w/remoting? What's involved? Any good articles and/or links on this?
From what I've gathered, you can use delegates with remoting, but it doesn't work very well with interface methods. Is this correct?
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|