|
Hi there,
A really quick question
I have something like this in my shared dll.
Imports System.Runtime.Remoting
Public Interface ISKMDialog
Function showDialog(ByVal id As Integer, ByVal guid As System.Guid, Optional ByVal needResult As Boolean = True, Optional ByVal queueit As Boolean = True, Optional ByVal urgent As Boolean = False) As requestResult
Enum requestResult
OK = 1
WAIT = 2
DIALOG_NOT_FOUND = 3
End Enum
End Interface
Public Class CSKMDialog
Inherits MarshalByRefObject
Implements ISKMDialog
Public Delegate Sub dialogRequest(ByVal id As Integer, ByVal needResult As Boolean, ByVal queueit As Boolean, ByVal urgent As Boolean)
Public Event dialogShowEvent As dialogRequest
Public Function showDialog(ByVal id As Integer, ByVal guid As System.Guid, Optional ByVal needResult As Boolean = True, Optional ByVal queueit As Boolean = True, Optional ByVal urgent As Boolean = False) As ISKMDialog.requestResult Implements ISKMDialog.showDialog
RaiseEvent dialogShowEvent(id, needResult, queueit, urgent)
End Function
Public Overrides Function InitializeLifetimeService() As Object
Return Nothing
End Function
End Class
And in my main class I am doing something like this
Private WithEvents sharedObject As New dialogShared.CSKMDialog
Private Shared ref As ObjRef
Private chan As TcpChannel
Private Sub MarshallSharedObject()
chan = New TcpChannel(15090)
ChannelServices.RegisterChannel(chan)
ref = RemotingServices.Marshal(Me.sharedObject, "dialog")
ref.URI = "tcp://localhost:15090/dialog"
End Sub
In my constructor am calling above function,
Problem is remote object’s lifetime, even though am overriding InitializeLifetimeService() function and returning nothing but still my object get destroyed. If after 10 minute I call in my main class something like this
Dim o As System.Runtime.Remoting.Lifetime.ILease = sharedObject.GetLifetimeService()
MsgBox(o.CurrentLeaseTime.ToString)
It returns a negative lifetime value. If I try to get this object from my other app after 10-15 minute it says “unable to find service”. My main application is a gui app.
Any ideas, am stuck with this.
Qaiser.
|
|
|
|
|
Problem get solved,
It was my own silly mistake.
|
|
|
|
|
Hi!
I am writing a commport app. who recives a bytearray trough the com port.
Now i whant to assert that the first character is ascii HEX (start of text) and the last is ascii ETX(end of text) in the array. I have been stucked with this for a while,
and i am new to programming so i would relly appreciate help.
Any one now where i can find help? Or help me with the some sample(easy way out)
Sture
|
|
|
|
|
I have no idea what ASCII value for HEX is. I think you're talking about the ASCII character code STX, which is 2 and ETX, which is 3. All you have to do is scan the array you have and compare each value to 2 to find the start of the string, then keep comparing until you find 3, the end of the string.
Other than that, you'll have to be more specific about what your having a problem with...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave you are so right. But not so easy when your a naab.
This i what i'm trying to do.
Dim Buffer() As Byte
Buffer = Encoding.ASCII.GetBytes(source.InputStreamString)
Dim a As Byte = 2 '= Buffer(0)
Dim b As Byte = 3 '= Buffer.Length - 1
If a = Buffer(0) And b = Buffer(Buffer.Length - 1) Then
lbHex.Items.Add("WIIIIIIIIII: " & source.InputStreamString)
sture
|
|
|
|
|
Hi
I developed an application using VB.NET with VS 2005.
I add xml comments as needed to every method/class/members etc.
Now i want to create an help file based on this comments.
I found a convertion tool for C# (NDoc) but not for VB.NET.
I need a simple tool to create a MSDN like help file based on VB.NET xml coments.
Tnx
|
|
|
|
|
NDoc works with the documentation XML file generated at compile time, not the source code files. So, NDoc will work with VB.NET comments, to a point. Check out this[^] article here on CP for more information.
Google results for "vb.net ndoc"[^]...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
anyone know the command to pause the media player and continue playing?
|
|
|
|
|
|
yes i seen tis b4 i try to .play but error pop up said it not a memeber of the axmediaplayer...
|
|
|
|
|
1. how to write and create a ms word document usign vb 6.0
2. how to read and write to and from a txtfile
3. how to create a program using vb 6.0 that reads all the tables and their fieldnames on a database, and put them on a txtfile or in a textbox
thank you!!!!
adikkaymonic
|
|
|
|
|
Based on your questions, I can't figure out your level of experience. Based on question #2, I think your totally new to programming, but I can't be sure. So don't take this the wrong way when I say "Google is your friend!".
Google results for "vb6 read text file[^].
"vb6 create Word document"[^]
#3 depends heavily on the "table" you're using, be it an Excel worksheet, Access database, SQL Server, or something else...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i use access database
adikkaymonic
|
|
|
|
|
Good Day,
Can I add custom tool strips other than the ones in VS2005?
Where can I download them from?
Regards
Leavashni
|
|
|
|
|
What do you mean by "custom tool strips"??? If you're looking for different prebuilt controls you can check to see if any of the big vendors has what you're looking for. Like Infragistics, ComponentOne, ... I think you'd be looking for Layout Managers or something similar.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi
i have a stastic method in tha calss, how to invoke constructor,
when called with class name in VB.NET
Thanks in advance
Understanding comes form failures
Sucesses comes form understandinf failures
|
|
|
|
|
in my above question ...
I am sorrry Shared Method...........
|
|
|
|
|
Shared (Static in C#) methods don't belong to any instance of a class, so there is no constructor to call...
When calling a Shared method, you do not have to create an instance of the class that's hosting the method. You just call it! For instance, the Environment[^] class is full of Shared methods. You can call any of them at any time, without creating an instance of the Environment class first:
Dim myPath As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
how to upload files into webserver that is in to our project folder
thanks..
|
|
|
|
|
A little searching of the articles goes a long way!
File Upload with ASP.NET
[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
As the title, any method to do so?
|
|
|
|
|
use this
DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss.ttt")
|
|
|
|
|
What's a minisecond?? I take it you're talking about a millisecond?
The DateTime structure can only return the time accurate to about 10 milliseconds on an NT Kernel machines and about 55 milliseconds on Win9x, no greater. This is because of system timer limitations, not because of any bug in the .NET Framework.
What are you trying to do with such an accurate time?
You can get the current time, down to the approximate millisecond, with:
Dim currDateTime As DateTime = DateTime.Now()
Debug.WriteLine( String.Format("Current Time: {0}", currDateTime.ToLongTimeString) )
Debug.WriteLine( String.Format("Current Milliseconds: {0}", currDateTime.Millisecond) )
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The Top and Left properties are the coordinates of the control.
---
b { font-weight: normal; }
|
|
|
|
|
Can anyone please help me by providing any url/resources where i can get help to understand developing & designing a project in vb.net using oop and also data connectivity.
|
|
|
|