GetLineWithText Minor Dilemma, Easy Fix?
Aug 22, 2010Dim lines As String = System.IO.File.ReadAllText("C:12345.txt")
Debug.Print(GetLineWithText(lines, "swf"))
[code].....
Dim lines As String = System.IO.File.ReadAllText("C:12345.txt")
Debug.Print(GetLineWithText(lines, "swf"))
[code].....
I have created a hotel booking system programme. However, I am puzzled as to how when the booking button is clicked it can search a database and find the best suited room (RoomType) and make sure that it is available (Date of Departure < system.date). It must also assign the value of the cost that is placed in the combobox as the room.roomprice value.
[Code]...
I have a datagridview hooked up to a bindingsource. I have a comboboxcolumn. Now, I only want the combobox to be visible if a new row is being added. Otherwise, that column should not be editable. How can I achieve this. If so, on what event should I add code.
View 10 RepliesI was wondering, how can I block pop-ups (Ex: Script Errors, advertisements) in a Visual Basic web browser?Also, I was wondering is there a way to add a web browser to every tab I add. What I mean is to get my window problem to work, I had to add a webbrowser to a tab page. How can I make it to where I add a new tab, that it will automatically add a new web browser
View 5 RepliesHow can I retrieve the Major and Minor version of the Application ? I wouldn't ask , but every time I try to use the My object to retrieve those properties , I only receive 1 and 0 , though I manually set them to 3 and 8 (from the project properties)
View 7 RepliesI am having troubles on what each of these mean.Mayjor, Minor, Build and Revison mean.I found a link to a topic like this, but I totally did not understand it.how to I apply the version details? I went to the properties of my progect and when to the publish tab, and set it in there, but when I right click on my application, it still always says, 1.0.0.0.How do I make it so it will say the version that I have it set in the publish tab?I am not publishing them to the internet,I don't have and FTP or what ever you need, plus I don't think there is a point to publish my programs, they are low level compared to everyone else who programs.
One more thing.If I want to make it so the application is done for that version, and is ready to be used on other computers, should I just use the app that is in the debug folder, or should I build it, then use the one that would be in the release folder, or is there something better that I should do?
I am using the windows installer which comes with VS 2008 to deploy my software. My initial deployment went well and I have several happy customers now. Unfortunately, one of my users found a bug. I have been able to locate and repair the issue- a simple math error in one of my forms. Now I need to deploy the repair to my existing customers without causing them too much headache in the update or, worse yet, inadvertantly deleting their stored database files.I know I can have them back up their existing db file, reinstall thenew app, and replace the new db files with their backup versions- but what a pain in the neck that will be, and it really won't look too professional, either.Does anyone know how to produce a patch to replace only the form that was repaired? Or, can I somehow exclude installing the new database files in the patch? I know the solution revolves around the Upgrade Code and Product Code, but I'm not putting the information together in my head very well.
View 6 RepliesNote: This is not my code, I was just looking to edit it, but I run into this problem... "Syntax error, command unrecognized. The server response was: CLIENT AUTHENTICATION REQUIRED. USE ESMTP EHLO AND AUTH." (Bolded @ bottom)
Imports System.Net.Mail
Public Class Form2
[CODE]...............................
I need to make a listview, for each item to be like this:
- An image on the lef.t
- A header text on th etop.
- A minor text on the bottom.
I am communicating with a USB-HID device. It will successfully complete hundreds of send-receive requests but occasionally get a Null Exception error.
[Code]...
at the rxData.dataPacket(i) = element I will get a NullReference error every now and then. I could enclose it in a try/catch statement, but I'd like to fix the root problem if possible.This device is communicating to microcontrollers, and it is possible that they won't always give a value... but my feeling is this is some sort of UI threading issue. When debugging, even though there is a null exception, many times there actually does seem to be data in dataReceived.data.ToList(). Is there an easy way to place the whole data processing routine on a thread separate from the UI?Edit: Changed code to match answer and give more info on where it is used. Still get NullReferenceExceptions after about 1,000 completed send/receive requests to the HID device.
I have always wondered about this and seen this among lots of programmers. Why is a VB programmer or VB code easily dismissed as too noobish and easy while the same does not apply to Python or Python code? After all, isn't Python as easy as VB is? And it does provide drag-n-drop GUI application building also. So why is it that VB is flamed and yet Python is not?
View 1 RepliesI've been trying to play with DirectShow but it's getting on top of me and my question on here didn't answered so I'm thinking maybe I should go with a different approach. (DirectShow VB.net can't change recording format). <- Where as that 'works' I can't get it in the format I want it, and I don't really understand it so I'd obviousl like to go down the route of something I can get my head around.
I've googled till my fingers are raw trying to come up with an easy way to record video in my vb.net application, it doesn't have to be fancy, just a preview with a start record, stop record button, that's it.
iam very keen to learn vb.net 2008 so please suggest me how to access world most and best free of cost reading material available on net for reference.and free best book available for vb.net 2008 on the net. there is any complete source code available for consideration.
View 2 RepliesLets say I have 30 text fields in a Frame on my form, and I want to set them all to disable (so users can't edit them).Is there an easy way to walk through those fields without having to create an array of text fields?
I.E., in ... VB 6, with an array of text fields, I can do something like this:
For i = 0 to 10
txtfield(x).enabled = true.
Next i
Is there something in VB.NET where I won't have to use an array of controls, something like this (assuming all txt fields are in a frame):
[Code]...
I'm running stored procedure from asp.net front-end but it's quite long. What is the easy way on running that thing in the background? I mean if I close the browser, I still want my stored procedure to complete not just die. Also, I would like to perform other actions on the front-end while my procedure is running.
View 3 RepliesIs there an easy way to encrypt things? Here is some code I got:
[code]...
I have 2 datetime components in my application. [code] How do I do it? How do I get it so my 2 datetime controls display the current 24 hour time?
View 14 RepliesDim energybar As New Rectangle(9, 154, energy, 21)That is my new rectangle, now when I draw it e.Graphics.FillRectangle(Brushes.Blue, energybar)It says there is no width but the integer energy is = to 100...now, how do I fix this? It but be somewhat simple.
View 1 RepliesI have been using what I think is a simplistic and easy way of reading and writing to/from the registry but whenever I look at code I keep seeing links to DLL's and constant decorations and lines and lines of code.[code]
View 2 RepliesI saw another forum which discussed how to detect whether a LAN was connected, but I need to know whether my Internet connection from my ISP is up or not (I'm writing a program for day trading, so knowing if my internet connection is down is critical). I know I can simply open a browser in VB and browse to a site and see if it doesn't come back "page not found", but that involves a fair amount of overhead, and if the internet is down, it often takes many seconds to a minute to come back with "page not found". Is there some simple command that will quickly tell me that my internet connection is working? I'm using VB in VS 2008, and currently using XP although I plan to convert to Windows 7 in the next couple months.
View 3 RepliesI want to have a one second pause after some code has run. During that pause, if a certain key is pressed, I want to do some action. Otherwise, I want the code to continue as normal. What would I use to replace the comments in the following code?
myTestCode()
' Wait one second and see if a given key was pressed.
' If specific key is pressed, then show messagebox (or whatever) asking user if we should cancel (whatever)
NextMethodToRun()
Yes, I know there are a number of ways, which is why I am looking for something that is fast and simple to use. I do not want a console window, some other form, etc. to appear. Just want to check if a key was pressed. The key (if pressed) should be pulled off the keyboard buffer.
After we finished make a project , we need to make setup file right ? is the setup file contain all the component we use in our vb.net ? like Crystal Report component
View 1 RepliesMy app currently uses Interop.ADODB.dll to retrieve data from an access database.My compiled setup file has to include a Interop.ADODB.dll file for the software to work.What would i have to do in order to convert my app to drop the interop file by using Ado.net instead?Would it simply be a matter of changing the references and connection strings or does it involve alot more than that?
View 3 RepliesI want to create a document, nice and easy like a word , or a rapport in access and .just it is easy to layout and so on.
View 5 RepliesRan across a snippet a while back but can't seem to find it again. Was very short and simple and detected all versions using version major and minor.
View 4 RepliesI use this code given by .paul
Dim ms As New IO.MemoryStream
PIS.PictureBox3.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg)
dsNewRow.Item("picture") = ms.ToArray
[code]......
I am brand new to VB2008 from VB6.I am trying to connect to my remote mySQL db and simply display a record into a label.Here's what I have on Form Load.[code]
View 4 RepliesI have founfd numerous ones on the net, but they all only do these complicated RegEx for zip codes, html, address, credit card numbers, etc etc,All I want to accomplish is when the user searches for "commend", they get only every occurence of the word "commend". NOT commendeth, or commends, or some other variation.[code]
View 3 RepliesI have an error while using a collection that has been stumping me for years.I wrote a class to allow users to write equations in a txt file using RPN (stack based notation).The class runs through a select statement while reading the equation and then ends up with a final number as the answer. I have a collection to place these objects in for easy reference. For whatever reason I get random object reference not set to an instance of an object errors when there is nothing in the program that would remove objects from the collection, kill objects, or change the collection in any way. It is possible for one thread to call the calculate function while another thread calls the CurrentValue property. I'm not sure if this could be causing the error, but once it happens I get an error every time the program enters that code until I run out of memory.
[Code]...
I need to develop a simple radio message logging app for use on a small military exercise.Now, the app is quite simple in itself, it needs to let me easily submit a new message report simply containing "from", "to", "message", "category" (and timedate, etc). Now the problem is that I have no experience with programming anything up against a database. I know basic SQL but I just dont know how to work with databases programatically. What kind of local SQL database solution works best with vb.net and Visual studio? Maybe I should use an Access database instead?When I click submit (on a new message report) how can I make an entry in a local SQL database of some sort? How can I load up a list of the message log entries already made in a listview or something?
View 3 Replies