|
|
Hi,
I am new to this vb.net, my problem is i have created the windows service in vb.net c#. I deployed it in my system when i am try to start that service it showing the error as
Error:1053 could not start the service on Local system
The service didnot respond to the start ro control request in a timely fashion
I have tried to resolve it, but i could not... Please help me to solve this problem.
Thanks in advance.
With Regards,
Samson
|
|
|
|
|
Does the deployment machine have the correct .NET Framework installed on it??
In the OnStart method of your service, did you create an instance of your worker class on a seperate thread?? You don't just put all of your code in OnStart and never let that method return. This is exactly the error you get when you do this.
Your worker code should be running under it's own thread, that you create in the OnStart event of your service.
|
|
|
|
|
Hi im new to this forum and programming in general!anyways iv wanted to write my own poker bot in visual basic for a while now because all the poker bots for sale online are controled by the casinos and you allways lose wot u win,if sum1 could help me with how i can:
1:get the bot to lock on to the table,i know that usually the bot injects into the dll files of the poker program but thats how the casinos detect the bot
2:get the bot to see my cards and the table cards.iv read about screen scraping but im not sure how this works.
3:i want to write the code for how the bot will decide weather to fold,call or raise based on how i play and the many books iv read on how to play but any tips are welcomed.
anyway any help would be great,
DySfUnKtIoNaL!!
|
|
|
|
|
Of the three things you've listed, only the third is really at your level.
Injecting DLLs into other processes is hacking and quite frankly I wouldn't know where to start - In fact, I'm not in the least bit interested in finding out because it isn't required for writing "normal" applications.
Screen scraping is basically taking a view of the screen and interpreting what is displayed there. If the "screen" is a text based console it is very easy (and that's what most screen scrapers are doing, converting the text on a console). If the "screen" is a web page it gets slightly trickier, but since it is essentially still all text then it is doable. It gets difficult when you have AJAX adding stuff into the page after it is loaded. Finally, there is the kind where the "screen" is a graphic. The graphic can be a snapshot of the screen at a particular moment, but it then has to apply some sort of OCR (optical character recognition) algorithm to the image to find out what it says. Unless you can supply hints to the OCR as to where the text is then it will be slow.
Finally, on to the algorithms for deciding when to hold, fold, raise, etc. That is fairly simple maths and there are books that tell you the odds so you can calculate it. As to how to program that... Well, it is a bit much for a forum response. I'd start by creating a list of all the rules and working out what I need to implement it.
|
|
|
|
|
dysfunktional wrote: 1:get the bot to lock on to the table,i know that usually the bot injects into the dll files of the poker program but thats how the casinos detect the bot
Yep. And you also cannot do DLL injection in C#, VB.NET, or any other purely managed language because they don't support the exports required to do DLL injection.
dysfunktional wrote: 2:get the bot to see my cards and the table cards.iv read about screen scraping but im not sure how this works.
You have to capture a screen image and, basically, do an OCR for the card values. The screen capture is the easy part. Reading the card faces is going to be VERY difficult, and frankly, WAY beyond your abilities.
dysfunktional wrote: 3:i want to write the code for how the bot will decide weather to fold,call or raise based on how i play and the many books iv read on how to play but any tips are welcomed.
This is not as easy as it sounds. There are sooo many card combinations and different ways to play them against a variety of players with varying skill, you'd have to write some kind of learning network that improved it's play as it went. If the bot played as you did all the time, you'd lose all your money in short order. Since you're not playing, you're not learning better skills, so your bot has to do the learning for you. I hope you're an expert in artificial intelligence and neural networks.
|
|
|
|
|
Hi 2 all,
we are developing a mini erp using vb.net.
It has couple of modules. According to the user requirement, custom modules should be installed. I was unable to write code for custom deployment.
My problems are :
1. It has to show the modules list while installing
2. according to the selected modules it has to deploy the application
Thanks in advance,
annoce
|
|
|
|
|
Why are you doing this in VB.NET? Why not a tool for creating installations? If you want something good that you don't have to pay for then WiX is very powerful.
|
|
|
|
|
I am currently creating a basic vb form program as part of my course work.
The form consists of 3 text boxes:
textbox1 is for the user to type a car's mileage when the petrol tank was filled
textbox2 is for the user to type the number of gallons of petrol just put in to refill the tank
textbox3 is for the user to type the new mileage after a journey
There is a button on the form which when clicked will calculate the miles per gallon.
Can anyone please help with the 'calculate' button code???
|
|
|
|
|
Sure. Lets see, what other application would use one or more buttons, and calculate something?
O wait, maybe a calculator does.
Now how do I find a calculator example with a full description and all of its source code?
Gee, if only there was a web site with programmer's stuff, some search engine increasing the probability I will actually find what I am looking for, and finally a chance to ask intelligent questions once I get stuck at a very specific detail after trying several things myself ...
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
|
|
|
|
|
lexyvb.net wrote: textbox1
You should choose more descriptive names.
textbox1 could be called mileageAtRefuelingTextBox ; textbox2 could be called refuelAmountTextBox ; and, textbox3 could be mileageAtEndTextBox , for example.
lexyvb.net wrote: Can anyone please help with the 'calculate' button code???
Basically, distance in miles divided by fuel consumed in gallons equals miles per gallon.
You know your distance, mileage at end minus mileage at start.
Do you know the fuel consumed? Well, if you assume that you start with a full tank of petrol and you refuel at the end of the journey then the amount of fuel you fill up with is the fuel consumed.
That should be enough to get you going.
If you are still stuck, you'll need to show us your code, because we are not going to do your homework for you. Also, if you've not figured it out already, you'll have to have a very good understanding of algebra because the coding aspect of software development is largely algebra in whatever the syntax is of the language you are using.
|
|
|
|
|
Hi, I am working on some code which is designed to communicate with up to 16 embedded devices over a LAN with eventual real time data display and logging.
Using a series of UDP broadcasts, a rectangular array is populated with the ip addresses of the units.
This process is repeated at a regular intervals and the array compared to it's previous state to find any units which have not responded to the UDP broadcast sequence, implying that either communication has failed for serious reasons or a packet has simply been dropped.
Any lost IPs are then passed to a function which attempts TCP to each in turn, in order to get confirmation of any communication problems.
However I have found in testing that a TCP connection that fails can take up to 30 seconds to return an exception, so in a worst case situation it could take 8 minutes for my app to notice that all 16 units have gone offline.
From long research it seems to me that my only solution is to rewrite large amounts of code to use a sockets implementation instead of a TCPClient, but can anyone think of a way which would save a large rewrite?
|
|
|
|
|
RGVChris wrote: However I have found in testing that a TCP connection that fails can take up to 30 seconds to return an exception, so in a worst case situation it could take 8 minutes for my app to notice that all 16 units have gone offline.
So you're checking each unit, one at a time, using the same thread?? Why not create a seperate thread, per unit, to verify this? Then, all of the tests run concurrently.
RGVChris wrote: but can anyone think of a way which would save a large rewrite?
No matter what, you're going to end up rewriting a large chunk of code, it's just a matter of how large.
|
|
|
|
|
How about:
Dim client As New TcpClient(IpAddress, Port)
client.SendTimeout = 5000
alex_nel
|
|
|
|
|
alex_nel wrote: How about:
Dim client As New TcpClient(IpAddress, Port)
client.SendTimeout = 5000
That was what I thought, but it seems that only affects the timeout of messages being sent, not the initial timeout at [client.connect]
I dont understand why MS didnt provide a client.connecttimeout property...
|
|
|
|
|
|
Help you with what?? You haven't asked a question.
|
|
|
|
|
Dave Kreskowiak wrote: Help you with what??
Duh, he is waiting for his code. Call him master/boss/sire while you're at it.
|
|
|
|
|
Help me with vb.net/c# source code to read metadata from jpeg file in IPTC format. thanks.
Pouya
|
|
|
|
|
Again, you haven't asked a question. No, I'm not going to write your code for you.
|
|
|
|
|
I create OCX control in VB6.0 for RSView32(Automation tool).
So i included refernces provided by RSView in project workspace.
While debugging it shows error line 429,ActiveX can't create object .
I included all references in project settings.But i get this error.
Pls can anyone help me..
Anu
|
|
|
|
|
I suggest you contact the vendor[^], they are most likely to know.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Step 1:
Create a new vb6 project with the RSView32 reference. Create a variable and instantiate for whatever your trying RSView32 objects your trying to use.
Compile. See if the project builds successfully. If not, you are missing a reference more likely.
Anu_Bala wrote: I create OCX control in VB6.0 for RSView32(Automation tool).
It sounds like you created a custom control containing RSView control(s). Now if you're in a new project and can't create your custom control and Step 1 worked, your missing a reference.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hi. This is a repost to a question I posted yesterday without any luck. Maby today will bring better results so here goes...
I'm busy with a app that needs to print xml rendered by xslt. Currently I am printing with internet explorer in the following manner
Dim internetExplorer As New SHDocVw.InternetExplorerClass() Dim webBrowser As SHDocVw.IWebBrowser2 = CType(internetExplorer, SHDocVw.IWebBrowser2) 'Make the web browser visible webBrowser.Visible = False 'Display empty page so we have something to manipulate. Dim noValue As Object = System.Reflection.Missing.Value webBrowser.Navigate("file://" + fileName, noValue, noValue, noValue, noValue) While webBrowser.Busy Threading.Thread.Sleep(500) End While 'Get access to the webbrowser's document. internetExplorer.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, noValue, noValue) 'CType(internetExplorer.Document, mshtml.IHTMLDocument2).close() Marshal.ReleaseComObject(internetExplorer) Marshal.ReleaseComObject(webBrowser)
I need to find a different way to do this as the above code gives a com exception. Or I need a workaround for the above code. If anybody can help I would greatly appreaciate it.
Stephen
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
Any detail in the COM exception?
What is in the filename variable?
|
|
|
|