|
C# cannot target building an actual ActiveX control. You can build a COM-exposed component (like you have already done) that, to IE, LOOKS like an ActiveX control, but, in order for your control to run on the client, the client MUST have the required .NET Framework installed. You cannot get around this requirement.
If you want a control that can be used without the .NET Framework, you'll have to rewrite it in a language that does not require the .NET Framework, like C++.
|
|
|
|
|
|
I think you want the ASP.NET or WPF forums. It doesn't sound like this has anything to do with VB.NET.
I think you mean that when the user presses F1 in their browser (while running your app), you want a help file for your app to come up instead of the help for the browser. AFAIK, you cannot change that behavior.
|
|
|
|
|
I publish my application evry week with latest updated version,
via internet...using CLICK ONCE....
I have take care of autheentication of the publishig person
It publishes fine...
Now Whenever I publish it, after publish,It ask for download latest version or not?
So I cant make the compultion to user to take the latest version...
Is there any option in click once that I can set,
So next time I publish user comapsary has to be get the update version or
It directly loads a new version application without asking user ?
|
|
|
|
|
You can use the ClickOnce API to detect and automatically install the update.
only two letters away from being an asset
|
|
|
|
|
How can I do this ?
Can youi give me steps or msdn link related to that topic ?
|
|
|
|
|
Try here[^]
only two letters away from being an asset
|
|
|
|
|
Hi,
I am working on a WPF application with .Net Framwork 3.5. On my application Window I have a free text box. Is there any class in .Net which helps in determining the datatype of the typed text in the text box?
Eg.
If user types "Vipul1234" OR "Vipul" then the class should determine the data typed in the textbox is of type String
If user types "1234" then the class should determine the data typed in the textbox is of type int
Regards,
Vipul Mehta
|
|
|
|
|
Hi,
what you type in a TextBox is text, hence a string.
it may also represent something else, such as an int, a double, a DateTime, etc.
In order to check, you should call TryParse on each relevant type, and be careful about the order
(so an integer may turn into either an int or a double).
|
|
|
|
|
Hi Luc,
As the value in the textbox would always be text i.e. of string data type.
So how tryparse will determine of its actual type as int or double or some other?
Shilpa
|
|
|
|
|
Well, TryParse, whatever the base class, will try and parse the string; it will fail when the
data does not fit the type you are trying to parse, so a sequence of different TryParse calls
should be sufficient to determine the type. Check the documentation on int32.TryParse, DateTime.TryParse
|
|
|
|
|
Thanks very much... This worked well
Regards,
Vipul Mehta
|
|
|
|
|
Wouldn't it make more sense to use the textbox as it was intended to be used - to capture text - then cast the input to whatever type you need? Even if you're re-using a control for different types, your application should "know" what it's expecting at each point. If that isn't the case, you can try casting the input to various types and catching the exceptions thrown to determine the type. Even so, you're going to get misleading results if, for example, you ask for a password and the user chooses '123456' as a password. Better, I think, to clearly define what you expect at each input opportunity and constrain the input to compatible types.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Hello,
I have a to create a project wherein I have One Server on which and many clients.
I have to make the functionality that the client will run only if the Server is running.
When the client will start it will send a message to the server and server will respond to that message.
Also i need to maintain a check of number of clients connected to the server.
I have done the Client-Server Connectivity using UDP but i am facing problem in implementing the Check functionality for Client.
Please anyone having some Idea, Thanks in Advance.
|
|
|
|
|
So what's the question?? You haven't asked a question anyone can answer.
|
|
|
|
|
Hello, Sorry.
I want to know how the above mentioned can be done using TCP/IP where i can maintain number of clients connected and when the client gets disconnected so that I can check whether to allow any more clients to connect.
hope You will get the question.
Thanks in Advance.
|
|
|
|
|
All you'd have to do is increment a counter in your server-side client connect code. When a client disconnects from your server, decrement the counter.
If you're using UDP, not TCP, this doesn't mean anything since there are no connections.
|
|
|
|
|
Hello,
Thanks For the reply, but I am not getting how to start.
Please could you give me some code so that i can refer that.
Also i have tried it, but how to check using Tcp_Listener object how many clients are connected.
If I simply increment a counter, Then how will come to know whether the client is still connected to server or it has got disconnected.
I have written some code wherein the client connects to TCP_Listener, but then how could i ensure that the Connected client is still COnnected?
Please Help Me I am getting too much Confused.
Thank you.
|
|
|
|
|
UDP is a connectionless protocol, so the number of connected clients is 0.
Easy
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Actually I wanted to know how this can be done using TCP/IP.
Please if you know then give me some idea or if you have the code please mail me.
Thank you.
|
|
|
|
|
Hi Vikas,
From what i have understood , by reading your question is that you need to maintain number of clients connected to a server , right ?
But you are using UDP Protocol , which is connection less protocol , i think it is not a wise choice to use UDP , if you need to keep record of the connections you should TCP protocol.
The following link can help you use TCP protocol for communication
http://www.eggheadcafe.com/articles/20020323.asp
just let me know if TCP suits your requirement , we can move ahead , with the actual question , we can maintain the count if we use TCP , i am not sure how to do it by using UDP , The logic say we cannot do it , as it is a connection less protocol
-Regards
Bharat Jain
Phisys Software Solutions Pvt. Ltd.
bharat.jain.nagpur@gmail.com
|
|
|
|
|
Thanks Bharat for your post.
OK After writing the above code, i have created a variable which i increment after the AcceptClient statement.
But After that suppose a new client sends request then how to check whether the previously connected clients are still connected or no.
Again Thanks for your reponse.
|
|
|
|
|
Hi Vikas ,
The only idea that come to my mind is
we will maintain of connect client (in a list object) , when ever a client tries to connect we will call a function (implementation on the function is as given below ), which will a loop through the list and use the connected property to find if the client is still connected , the implementation of the function goes like this
Private Function NumberOfClientConnected() As Integer
Dim tempclient As TcpClient
Dim totalClientConnected As Integer
totalClientConnected = 0
For Each tempclient In connectedClients
If tempclient.Connected Then
totalClientConnected = totalClientConnected + 1
Else
connectedClients.Remove(tempclient)
End If
Next
Return totalClientConnected
End Function
for this you have to declare a Module level variable of type list , remember its a module level variable.
Dim connectedClients As New List(Of TcpClient)
Also there is a small change in the previous code after
Dim tcpClient As TcpClient = tcpListener.AcceptTcpClient()
we need to add the following line
connectedClients.Add(tcpClient)
Also before Dim tcpClient As TcpClient = tcpListener.AcceptTcpClient()
We need to add a if condition
If NumberOfClientConnected() > <maxclientallowe> then
Exit sub
End If
So the summary is
1) We maintain a list to TCPClient Connected
2) Then we loop through the list and check for still connected client by using the Connected property
3) If the server has not reached the maximum number of client connected , we accept the connection and add it to the list..
I hope it is helpful , i am sorry if there are any build error , i have not tried it in the IDE , i dont have one installed right now , i am i hurry right now , need to go .........
Let me know if it was ok or not
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
Thanks very Much for your Valuable Response and time.
The above code was what something i was looking for, Thank you very much.
I have tried the code in a small application and the problem i am facing now is as below,
I can Connect to the Server and everything works fine.
But the problem is in receiving data.
I send a string say "HELLO" as a byte array which is of length 5, but when i receive it on the server, the length of the receieved data in array shows as 8193, i don't understand from where the extra bytes are coming.
And because of these extra bytes my string doesn't match with HELLO.
I have written the same code.
Please having Any Idea.
Also, I want to know how to disconnect the client. It is actually like if the data sent by client doesn't match with that in the server, then i need to disconnect the client and doesn't allow the client Software to run.
Please i am sorry i am asking a lot of Queries.
Thank you again for your code atleast i have got a direction.
|
|
|
|
|
Hi , sorry for late response , but i was not able to get the problem , the code seems to be working fine for me , if possible send me the code you are using , i will check that out
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|