|
I'v never done this before but from the top of my had I see at least one problem (obstical):
a service can run without a user being logged in and if this is the case I doubt that you'r form will show, I think it probably will generate a error or at least some strange behavior. So you'll have to check wheter or not there is a user logged in.
as to why the form disappears I don't really know but I would try putting the 'real service work' also in a sepparte thread.
I don't know if it will solve the problem but it's worth a try I think.
I think that if you always want a form to be displayed and the communcation.startcommunication only has to work if a user is logged in it probably be best that you write it in a windows form application and put that application in the startup of the user.
I'v only experimented with services a few times but I can tell you that if you try to do to much in them they start acting strange
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
You have completely the reason.
Is there a way to separate the two from each other, the service is running in the background, and when you log on, you start the application, that uses functions/methods of the service?
Does anyone has experience with this?
|
|
|
|
|
You normally would use two different projects. You write a Windows Service that does it's job, but also starts a server, be it a socket server that talks like an email server does, or a .NET Remoting server, or something using WCF. There's a bunch of different ways of doing it.
The second app would be run by the user and would connect to the services server to issue commands and get status information.
|
|
|
|
|
Well, thanks for the advice. In the meanwhile I implemented a NET remoting system among the 2 different projects.
And it works great. Sending a message to the server, it does some action and than respond to the status application.
|
|
|
|
|
Hi guys, does anybody out there now how you embed audio files into the .resx file?
I can only do the strings and images, but I couldn't figure out how to embed audios. Just to clarify a point, i can embed the audio files into the .resx file but i can't link to the audio file, i think i just have the syntax incorrect, as i mentioned earlier, i can call the images no problem from the .resx file with any image file, just not the audio files.
(This is for Visual Studio.net 2005)
Brian Hull
-- modified at 7:20 Wednesday 12th September, 2007
|
|
|
|
|
Open your projects properties. Click on the Resources tab. At the very top of this page, there is a drop down (default says "Strings"). Click on the arrow for the drop down and change it to Audio.
|
|
|
|
|
Sorry for being so vague with my query in the first place. I can add audio to the resource file, i just didn't know how to call the file during run time.
I have since found out that i needed a sound class in place and then i just use sound.filefromsource command.
Many Thanks for your help though.
Brian Hull
|
|
|
|
|
dear friends
i have a doubt in visual basic 6.0.
the function hex(number) is not working in one of my projects (the same used to work some days ago) in same work space.
the same works in other new work spaces,
can any of you there kindly explain the reason and the solution for this,
like, if any reference has to be made or any thing else.
and also it would be grateful if any body explains me the use of defining option explicit in a VB application.
please help, its urgent.
thanks in advance.
|
|
|
|
|
Maybe you can post the code that you are using. I don't have any experience with VB, but in VB.NET I use the following function:
<br />
'---------------------------------------------------------------------------<br />
'<br />
' Function: ToHex()<br />
' Input: x<br />
' Return: out<br />
' Purpose: Converts Integer to Hex<br />
' <br />
'---------------------------------------------------------------------------<br />
Public Shared Function ToHex(ByVal x) As String<br />
Dim out As String = Hex(x)<br />
<br />
If (out.Length < 2) Then<br />
out = "0" & out<br />
End If<br />
<br />
Return out<br />
End Function<br />
|
|
|
|
|
dear,
ur answer seems to be near.
but u have used Hex() here.
my question is clear.
and it is as well mere.
in my project Hex() is not working, that's what i fear.
the same used to work prior.
thank you.
|
|
|
|
|
The funciton itself does not break. The only thing that can go wrong is if the data you're feeding the function is now different and not what the Hex function expects.
|
|
|
|
|
Hello Friends ,
I am new in xml , i want use xml as database like sqlserver. how can i
fire insert ,update ,delete command for xml database .
Manu
-- modified at 5:50 Wednesday 12th September, 2007
|
|
|
|
|
You don't. XML is not meant to be used as a database and has poor performance when used as such.
XML also doesn't understand SQL commands.
|
|
|
|
|
<b></b>Hai dear , \
I want to create a Project for Stock Market .
I was searching for web service through which i could get
updated stock report, for indian stock market .
how could i search
or please tell me the link for anyweb service u know .
waiting
Yogendra Dubey
|
|
|
|
|
Huh?
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
hi everyone
how i can used myActiveX control in vb.net project without adding it to Form.
for example in VC we can Create MyActiveX control and useing it without add to form.
please help me
|
|
|
|
|
You use it just like any other COM object. All a reference to the file the object is exposed in and create a new instance of it:
Dim myObj As New MyComClass
|
|
|
|
|
hello im new here and i was wondering if any of you can help me with my small problem. is it possible to create an array of subprocedures? because il be decoding a binary string and those with 1's will call a specific procedure so il be using an array of subprocedures.. anyone have a sample code? tnx
FUNGAS!
|
|
|
|
|
There's no such thing as an array of "subprocedures". But, you can create an array of delegates. This example uses three subs that all take a single string as a parameter. You can NOT use a single delegate to point at subs with different argument lists.
Private Delegate Sub TestDelegate(ByVal str As String)
Private Function CreateDelegateList() As List(Of TestDelegate)
Dim d As New List(Of TestDelegate)
d.Add(New TestDelegate(AddressOf TestMethod1))
d.Add(New TestDelegate(AddressOf TestMethod2))
d.Add(New TestDelegate(AddressOf TestMethod3))
Return d
End Function
Private Sub TestMethod1(ByVal paramValue As String)
' Do something useful...
End Sub
Private Sub TestMethod2(ByVal paramValue As String)
' Do something useful...
End Sub
Private Sub TestMethod3(ByVal paramValue As String)
' Do something useful...
End Sub
|
|
|
|
|
so if i use something like createdelegatelist(1) then il be calling testmethod1?
or i use d.item(index)?
FUNGAS!
|
|
|
|
|
wuzzywezzer wrote: so if i use something like createdelegatelist(1) then il be calling testmethod1?
Notice that CreateDelegateList doesn't take a parameter?? So why would you pass one into it? CreateDelegateList just builds the list and returns it. It doesn't execute anything.
wuzzywezzer wrote: or i use d.item(index)?
You'd create a List(Of) to hold the list returned by CreateDelegateList , then use an index to Invoke the method the delegate points to:
Dim dl As List(Of TestDelegate) = CreateDelegateList()
dl(0).Invoke("This is a test string being passed to the TestMethod.")
|
|
|
|
|
ok i get it now thanks for your help and time
FUNGAS!
|
|
|
|
|
pls tll me what is the diff between these two declarations
dim i ,j as integer
//and
dim i as integer
dim j as integer
thanks
-- modified at 3:43 Wednesday 12th September, 2007
|
|
|
|
|
please verify your post once again and modify it.
|
|
|
|
|
nitin3 wrote: pls tll me what is the diff between these two declarations
dim i ,j as integer
//and
dim i,j as integerer
The second lacks a space between the i and comma. The second also contains a spelling mistake.
|
|
|
|