Microwave Oven Strings Are Incorrect?
Oct 16, 2011
I'm creating a microwave oven and I'm in need of assistance if anyone is out there? I have 2 problems : my buttons dont work and I believe it's because I have two of the same name variable in local and global scope because the local one hides the global one in its scope. You have two variables called timeIs. My output is lblOut, everytime I try to change the names they underline in blue so I can't even check the start button. And also DisplayTime() to print 0 because it deals with its local variable.
Public Class frmMicrowaveThree
' contains time entered as a String
Private timeIs As String = ""
[code]....
View 20 Replies
ADVERTISEMENT
Oct 16, 2011
Title says it all, I get a format exception saying that the input was not in the correct format.
Code:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If Integer.Parse(TimerBox1.Text) > 0 Then
[Code].....
View 6 Replies
Oct 17, 2011
my Vb 2010 midterm project is due a 8am ( > 2 hours). I have coded almost everything I need. Just before I was about to submit this, I noticed in the instructions that hours needs to be included as well. I have been trying to do this for about 2hrs now, and just can't seem to get it right.
[Code]....
View 1 Replies
Oct 15, 2011
i am working on a microwave app its very important anyways ill give up what code ive got so far and such but when i try to run it i get this error message: Visual Studio cannot start debugging because the debug target Microwave.exe is missing Please build the project and retry or set the OutputPath and AssemblyName properties appropriately to point at correct location for the target assembly. [Code]
View 5 Replies
Oct 16, 2009
Say I have a List(Of Tag) with Tag being an object. One member of Tag, Tag.Description, is a string, and I want to make a comma-separated concatenation of the Description members.Is there an easier way to do this than to read the Description members into a List(Of String) and then use the Join function?
View 2 Replies
Aug 13, 2010
i just want to make a program with first form to enter the serial if correct just continue to form2 if incorrect just a popup say like "Serial Incorrect" how i can make it ?
View 2 Replies
Aug 13, 2009
I am working on a UDP Client/Server, and currently i have them sending back and forth strings, which i convert to bytes, and then open the bytes to read. I want to now send an Object instead of those strings, which includes multiple unsigned integers and strings.
View 39 Replies
Aug 5, 2010
I have a list of strings. For each string in that list, I want to prepend another string. I wrote a method to do it, but I was wondering if there was something already in .NET I could use to do this. It seems like something that could be built in, but I was not able to find anything.
Here is the method I wrote:
Private Function PrependToAllInList(ByRef inputList As List(Of String), ByRef prependString As String) As List(Of String)
Dim returnList As List(Of String) = New List(Of String)
For Each inputString As String In inputList
returnList.Add(String.Format("{0}{1}", prependString, inputString))
[code].....
It works, but I would rather use built in functions whenever possible.
View 5 Replies
Oct 16, 2009
I'm migrating from VB6 to VB.NET, in hence my questions below:
I have to write a function that returns array of strings.
How can I initiate it to empty array? I need it since I have to check if it's empty array after it returns from this function.
Is list of arrays better for this purpose? If I use a list - Is it empty when it firstly defined? How can I check it it's empty?
View 3 Replies
Aug 15, 2011
I have been looking for examples to find the string between two strings. This top one works fine;
Public Sub ReadData(ByRef keywordStart As String, ByRef keywordEnd As String, ByVal filename As String)
Using reader = New StreamReader(filename)
[Code].....
Now the first one is fine - Ext_Volume is result of the string between the strings <Volume> and </Volume>. <Volume> and </Volume> are unique so this is straight forward.
However the second one - "^FDExp:" is unique, but "^FS" is not unique. There are occurances of "^FS" before and after "^FDExp:".
How do I get the string to search AFTER the occurrence, not before etc?
View 5 Replies
Jun 24, 2011
Dim str As String
Dim str2 As Array
str = "blabla duhduh"
str2 = str.Split(" ")
View 2 Replies
Apr 6, 2012
Say the string is something like
bla bla bla bla (cat) bladfdskdfd dsgdsdksf (dog)
dfdshfdskdskfsdfkhsdf sdkfhdsfkdf (kathy) fdsfhdskfhdsfkd (doggy)
I want a generic.list (of string) containing
cat
dog
kathy
doggy
How to do that with regular expression in vb.net
Later I want to do something more complicated like getting all strings between "url":" and ", from this strings
[Code].....
View 1 Replies
Jan 8, 2012
Is there an easy way to find a certain string within a string and then return the strings that you find as an array?I have written this:
Public Function FindStrings(ByVal strSourceString As String, ByVal strStartString As String, ByVal strEndString As String) As String()
Dim StringStartposition As Integer
Dim StringEndPosition As Integer
Dim Currentposition As Integer = 1
[Code]...
View 16 Replies
Jan 16, 2011
I have this string called time. It's value is in this format: HH:MM:SS The numbers change, but the format stays the same. I want to separtate the code into 3 strings Hour, Minutes, Seconds.
View 2 Replies
May 14, 2009
I have a DataGridView that has some columns with dates. It binds to an in-memory Datatable which gets loaded from an string array of data passed back from the backend Some of the rows returned have nulls for the date columns. Solution 1: If I define the Date column in the DataTable as "string" I can easily convert those nulls to empty strings and display it in the grid as empty strings (desired results). However, if the user clicks on the date column header to sort by date, it doesn't order the rows as you want. You get a purely string sort order. Not acceptable
[Code]...
View 2 Replies
Apr 7, 2011
I used to have this one
Dt = MyMod.GetDataTable("SELECT TOP " & QuestionsPerCats(i) & " * From Questions WHERE CategoriesID ='" & Cats(i) & "' ORDER BY NEWID()")
but now i decided to use sqlparameters like
Dim cmd As New SqlCommand("SELECT TOP @QuestionsPerCats * From Questions WHERE CategoriesID = @CategoriesID ORDER BY NEWID()", conn)
Dim sqlParam As SqlParameter = Nothing
sqlParam = cmd.Parameters.Add("@QuestionsPerCats", SqlDbType.SmallInt)
[code]....
and returns the following error
Incorrect syntax near '@QuestionsPerCats'.
View 3 Replies
Dec 14, 2009
It was suggested that I use xmldocument.load to do a sql insert statement instead of BULK INSERT.However when I run the Sub I am getting this error: "Incorrect syntax near '<'. "Here is my code, I have no clue what is causing this error, or how to fix it.
Sub AO()
Dim Z As String = Microsoft.VisualBasic.Format(Today.AddDays(-1), "MMddyyyy")
Dim AO_Name As New String("\NetImportAO-M_" & (Z) & ".xml")
Console.WriteLine(AO_Name)
[code].....
View 1 Replies
Apr 23, 2009
I have dll and exe files which have assebly version numbers different from the values stored in AssemblyInfo.vb.If I look at the information displayed in the Details tab of File properties in Windows, the File version and Product version values are identical with the values of AssemblyInfo.vb. But when I use My.Application.Info.Version to display the version number at runtime, the value displayed is incorrect. Also when I add a reference to a dll file, the referenced version is incorrect. The incorrect value is the same as the value last time AssemblyInfo.vb was edited on the local machine. If the AssemblyInfo.vb file is edited on another machine, the value won't be updated on other machines.
Typical example: On a nightly build the build server increments the build number of all AssemblyInfo.vb files. When developer workstations are updated in the morning (get latest) the build number isn't updated at runtime - even though the AssemblyInfo.vb file is updated and compiled into a new dll or exe file. But file properties in Windows displays the updated build number as described above. I've been looking for other places where a version number might be stored (in case there are more than one place to update the version number), but I can't find any reference to the displayed build number when I search the source files.
If a developer workstation edits the build number, compiles, and edits it back to the correct value and builds again, the displayed value at runtime is equal to the value in the source file. It's like the AssemblyInfo.vb files must be edited on the machine that builds the solution, or the result is not reliable..
View 16 Replies
Sep 20, 2011
I've added a DataGridView and on a MouseDown event I'm invoking a ContextMenuStrip on the right mouse button. But for somereason the context menu always appears at the top center of my DataGrid.When I look at the value of e.Location it is always the same regardless of where I click in the grid. I'm at a loss as to what is going on. Below is the code for the MouseDown event:
Private Sub dgvTreename_CellMouseDown(sender As Object, e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles dgvTreename.CellMouseDown
If e.Button = Windows.Forms.MouseButtons.Right Then
[code].....
View 2 Replies
Mar 10, 2011
i am having a problem with my date format. i want the format to be MM/DD/YYYY for example 02/28/2011 . i have put custom format in my event. but when i change my setting in regional settings it changes the format
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Myconnection As OleDbConnection
[Code]......
View 9 Replies
Jul 8, 2009
I have a problem with this visual basic statement every time it runs it gives me an error saying: incorrect syntax near? ive checked i a lot of times and i still cant find the problem.. heres the statement:
Sub InsertNewRecord()
Me.Text = "Inserting New Record"
Dim cmdInsert As New SqlCommand
[Code]....
View 4 Replies
Feb 2, 2012
The Code has two options. Option one starts with 1 dollar and doubles everyday for 10 days. If this is correct the value should be $1024 but instead it shows double that ($2046)
The second option starts with $100 and adds $100 per day for 10 days. The number should come out to an even $1000 but instead shows $6500
Public Class Form1
Private Sub compareButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles compareButton.Click
[Code]....
View 1 Replies
May 30, 2012
Trying to find out the cause of 'Incorrect syntax near ,. in the insert statements below :reason didnt use the GetDate() for the sInputDate and sSuccessDate is to manually get the precise datetime.now in the upper code and calculate the difference with the sSuccessDate.
strSuccessDate2 =
DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss")
If (IsDBNull(ds.Tables(0).Rows(0)("fExpireDate")) = True) Then
strSQL2 = "INSERT INTO tSMSSendLog (fBatchNo, fOrderNo, fRefNo, fDataRefCode, fPriority, fFromID, fMobileNumber," & _
[Code]...
View 4 Replies
May 8, 2011
in vb 10 i want update my filed my syntax is true but when i click change button this error is appear
Incorrect syntax near 'l_name'.this is my code
i wrote in public sub Public Sub Sabt()
[Code]...
View 5 Replies
Aug 31, 2011
this is the simple select statement I have for target bid date:
ProjectOverview.[Target Event Date - Date] AS [Target Bid Date]
now, I want to ask how can I select the latest target event date and if value is null, put "no date" caption i tried doing this:
isnull MAX(ProjectOverview.[Target Event Date - Date],'INACTIVE') AS [Target Bid Date]
but it says:
Incorrect syntax near 'ProjectOverview'.
String cannot be converted to date?
View 3 Replies
Mar 31, 2011
Dim ProjectID As Integer
Dim CostCentre As String = Nothing
ProjectID = 3 ''datProject.Tables("Project").Rows(intRecordNum)!ProjectID[code].....
View 3 Replies
Jun 15, 2011
I am new to VB.NET. I'm trying to add a table to an ASPX page. But I get the above error with the following code. Can you tell what I am doing wrong? I want many table rows returned; one for each product, where first cell = product name, cell 2 = NumOpen, and cell 3 = 95%.[code]
View 2 Replies
Dec 8, 2010
Currently using Microsoft SQL server 2008 in Visual Studio 2010
spot the mistake near the keyword 'INNER'
Dim selectSQL As String _
= "SELECT M.MID, M.MT, MS.SD, MS.TS" _
& "FROM M " _
[Code]....
View 2 Replies
Jun 13, 2012
I receive teh following error message;
Incorrect sytnax near the keyword 'where'
query = "INSERT INTO dbo.TblPracExclude (prac_no, prac_name, prac_status, prac_enabled) VALUES (" & _
DgvPracExcl.Rows(RowID).Cells(0).Value & ", '" & _
[Code]....
View 6 Replies
Oct 16, 2010
So I've finally moved into the VB.NET world and have a quick question. I am drawing a ListBox control with DrawItem event. The problem I am having is that the e.bounds region does not match my text. I changed the font of my ListBox to a larger one with ListBox.Font = New Font(...). Below is my code, when the text is printed it overlaps, slightly, with other rows. Also, I did change the DrawMode to OwnerDrawFixed.
View 2 Replies