|
lynn1007 wrote: does it mean that webservice cannot replace activex control totally?
They are two completely different technologies that have nothing to do with each other. Web Services were never meant to replace ActiveX controls.
|
|
|
|
|
Thank you!
Perhaps I've misuderstood somewhere. I have to read more books.
|
|
|
|
|
It's not the fact that it's a web service that means you cannot do it this way - at least not that alone. Consider the arcitechture of *any* client-server system and you will see (I hope) why it cannot work.
There is a server computer and a client computer. Programs are running in both places, and they have different roles. The client is a program that sends messages we call "requests" to the server program, and the server is a program that accepts such requests and sends a message back called a "response". In other words, from the client's point of view a server cannot provide anything but these messages.
In principle, it would be possible to have a server that responded to a message by sending both *data* and *code* to the client. The code could be precompiled, or it could be text that the client compiles when it receives it. But obviously such a solution would be problematic. It would be potentially very dangerous, unless the client can have absolutely total confidence that it's not possible for anyone to intercept the communication and send evil messages full of virus code.
So basically if you succeeded in running the media player in your service it wouldn't result in anything playing at the client. The usual way of doing this is instead to run the media player on the client side, usually embedded in a web page, and just send video data from the server.
You can google for articles about how to do this, but to be honest I think you should take some time to do simpler stuff first to get a good grasp of the basics as video streaming is a fairly advanced concept.
|
|
|
|
|
Thank you for your reply.
Your reply gives me some hope. That's very kind. I'll keep an eye on the articles about this stuff.
|
|
|
|
|
We are running a .Net 2.0 application on a Windows 2003 server machine with service pack 1.
But the application crashes frequently (say once every 15 min), and following message is logged in event viewer - "Faulting application <app name="">, faulting module mscorwks.dll"
we hv also tried to install the patch from the following link
http://support.microsoft.com/kb/913384[^]
But the problem persists..
Any help on this issue will be highly appreciated.
Thanks in advance
Vikas Salvi
Programmer Analyst
|
|
|
|
|
Im creating a web browser for a friend, and one of his requests is that I should have favourites/bookmarks built in. Im trying to do this by reading and writing to a text file. Can anyone fix my mistakes? This doesnt work at all.
'To load the favourites on startup:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For Each item As String In "C:/Program Files/Testfile.txt"
ComboBox1.Items.Add(item)
Next
End Sub
'To add the content of a textbox to your favourites
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
texty.Text = WebBrowser1.Url.ToString()
'If My.Settings.Favourites.Contains(texty.Text) Then
' MessageBox.Show("It has been in your favourites!")
'Else
'
ComboBox1.Items.Add(texty.Text)
Dim objStreamWriter As StreamWriter
'Pass the file path and the file name to the StreamWriter constructor.
objStreamWriter = New StreamWriter("C:\Program Files\Testfile.txt")
'Write a line of text.
objStreamWriter.WriteLine(texty.Text)
'Close the file.
objStreamWriter.Close()
'End If
End Sub
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click
WebBrowser1.Navigate(ComboBox1.Text)
End Sub
|
|
|
|
|
britishcolumbia wrote: For Each item As String In "C:/Program Files/Testfile.txt"
You really need to pickup a beginners book on VB.NET and work through it. Just specifying a string in a For Each doesn't automatically assume that string is a file path and open it for reading.
britishcolumbia wrote: Im creating a web browser for a friend
So, why doesn't your friend get a hold of IE8 or FireFox and have a working web browser now, instead of waiting for a couple of months for you to figure out how to write one?? After all, your obviously just wrapping the built-in WebBrowser component, which is just IE anyway.
Seriously, your code is so bad that I don't consider it fixable. I'd scrap it and rewrite it from scratch, using XML to store the Favorites instead of a straight text file.
|
|
|
|
|
Please keep your comments to your self if you don't plan to help anyone.
Everyone starts somwhere, I start here.
If you’re the Microsoft MVP, you most likley know how to fix this. If you would like, without criticizing me, please help me out. If not, good day to you.
|
|
|
|
|
Do you really expect people to spend time and help you with your attitude?
Be smart and recognize good advice when it is offered.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Allright, well I'm going to close this post, Im just used to other forums where that would have been considered "Bad help" but I'm new here, so I suppose things work a little differently.
I guess I took the previous post the wrong way, I thought that saying that the code was so bad that I should just re-write it, and then saying that the whole project was nutty, or worthless as I took it. I don't really see that too much outside of YouTube commenting, and thought it was a bit rude.
I was just looking for a bit of advice. That’s for whatever you gave me, even if I didn’t see it.
|
|
|
|
|
I'd agree with you actually, he was a bit rude. But he is also right! You do need to learn the basic concepts, and while you're welcome to make your own IE-based web browser (the web browser component is full of IE code as far as I understand) it probably isn't the best way to learn.
If you really want advice, as opposed to code that loads/saves bookmarks, then none can be better than getting a good introductory programming book. There's no shame in being a beginner, but it's smart to realize that you are one and work from that assumption.
Personally I'd advice you to go with C# instead of VB.NET though. Let me be clear about this right away: C# and VB.NET will both allow you to do the same, and you'll achieve the same performance (or lack thereof, depending on your code) no matter which one you use. However, a lot of VB.NET coders have come to the .net platform from lesser programming tools (in my opinion) such as VB6, Access, and probably a few people who have just written a few macros in Excel (VBA), while a lot of C/C++/java coders have picked up C#. This might upset some people, but in my opinion there is little doubt that the C# community is of higher average quality than the VB.NET one. There are awful and great programmers in both camps of course, but if I were you I'd choose to associate with the C# lot.
VB.NET on the other hand might be preferable in some ways. It has optional parameters, which is in fact useful if you do Microsoft Office programming (lots of methods with 30 parameters - it's the one thing I will use VB.NET for if free to choose). And the Visual Studio tools are sometimes more refined for VB, presumably because MS feels it's necessary to nanny VB.NET users a bit more. For example, the code snippets that ship with VS include lots of VB stuff and little C# stuff.
My two cents.
|
|
|
|
|
britishcolumbia wrote: you most likley know how to fix this
Yes, and I already told you how. I would scrap the whole thing and start over with an XML storage format.
Seriously, even the basics of VB.NET is beyond you right now. How successful do you think your going to be if you don't understand the simple concepts of loops and enumerations?? Get a book on VB.NET and start teaching yourself the basics. I'm not trying to insult you, but just trying to prevent frustration and a lot of wasted time posting question on forums and waiting hours/days for answers to questions that you wouldn't even have to ask in the first place if you understood the basics of how VB.NET works and how it relates to the .NET Framework.
britishcolumbia wrote: If you would like, without criticizing me, please help me out.
Excuse me if I questiond the whole point of writing your "own" web browser for your friend. The whole concept of him/her waiting for you to write a browser is a bit nutty.
|
|
|
|
|
Hello Friends..
I want to call Shell from my vb.net windows application and run the command.
I have tried like
"Process.Start("cmd.exe", "cd\")"
But it just open command prompt.Does not run the command which passed by argument. That is "Cd\".
How can i do that...????
Thanks in advance.
|
|
|
|
|
|
Create a bacth file of ur command and execute it.
|
|
|
|
|
I cannot run any dotnet executable if the path including the name of the exe exceeds 128 characters.
The executable does appear for a split second and disappears immediately.
There is nothing in the event log.
I'm running Windows XP SP3, and .NET framework 2 SP1.
Any help is appreciated.
Thank you,
Michel
|
|
|
|
|
msmits wrote: The executable does appear for a split second and disappears immediately.
In that case, you've got some debugging to do. Since the code runs and shows a window, albeit briefly, it means your code IS running. So, the problem would have to be in your code somewhere. Is your code using files somewhere?? Is it handling the path names with spaces properly??
|
|
|
|
|
Hi Dave,
This problem happens with ANY exe, mine or anyone else's.
I've also created a new windows forms application (without code) and it behaves the same.
I've also debugged an application, it steps through the code and exits after the last debuggable statement (i.e. when it enters the event handling phase).
I've done this on VS2005 and VS2008.
Just to make it stranger, if I start the application rapidly many times in a row, *some* instances actually stay alive.
Cheers,
Michel
|
|
|
|
|
Sorry I made a small mistake in last post, with "any exe" I mean "any .NET exe".
Cheers,
Michel
|
|
|
|
|
msmits wrote: his problem happens with ANY exe, mine or anyone else's.
Well, you didn't say that in your original post, so how were we supposed to know??
msmits wrote: Just to make it stranger, if I start the application rapidly many times in a row, *some* instances actually stay alive.
In that case, make sure your machine hasn't had a virus introduced, then uninstall and reinstall the .NET Frameworks.
Oops. I just saw your last post. Glad you got it fixed!
|
|
|
|
|
When the application exits in Visual Studio in the debug window I see the message:
The program '[4756] MyTestApp.vshost.exe: Managed' has exited with code
-1073741819 (0xc0000005).
After searching for the error code on search.microsoft.com I found there are quite some people with the same problem. There was one solution listed and it works for me.
The problem is caused by the Kensington Mouseworks software that I have installed. It is very strange indeed but after uninstalling it the problem disappeared.
Cheers,
Michel
|
|
|
|
|
Hi all,
I have a requirement like.. i want develop a tool which will create and add a class library project to a given solution. and also i am able to add a class file to the project with a given name.
Please suggest me how can i do this..
Thanks in Advance.
|
|
|
|
|
First I'd try it manually with Notepad. Once you see the structure of the solution you should be able to write something that uses a System.Xml.XmlDocument to do it.
|
|
|
|
|
Hi Guys,
I've got an app composed of a moderately complicated control hierachy. I have a situation where on selecting a different node in a tree view, i'd like to focus on a seperate control and have that focus bubble up to the primary text box so that it can be edited straight away, however the OnGotFocus method in my custom control never gets called after control.Focus(), so can't be bubbled up the object tree.
Any ideas how to get around this?
Regards
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Tristan Rhodes wrote: I have a situation where on selecting a different node in a tree view, i'd like to focus on a seperate control and have that focus bubble up to the primary text box so that it can be edited straight away
What is the purpose of the middle control getting involved? Sounds like you are over complicating things.
Tristan Rhodes wrote: I've got an app composed of a moderately complicated control hierachy
I would look into simplifying it. One example would be the Mediator pattern[^]
If you are not familiar with patterns or even this one in particular, don't get bogged down in the details. Look at the description of the pattern, the problem it solves and the basic idea of how. Even if you roll your own and it doesn't match the pattern exactly, it will still be far superior to the tightly coupled approach you seem to be currently engaged in.
|
|
|
|