Hold A Date Value?

Nov 11, 2009

I am writing a program that is going to take two dates (entered by a user) and compare them against each other to determine when something was purchased vs when it was paid for. I'm ok with everything except one part, and its a biggie, how do I have the user enter the dates (format) and how do I convert it from a string to a recognized date format? Does that make sense?

View 4 Replies


ADVERTISEMENT

SQL Exception On Insert Of Dateandtimepicker.value.date Into Date Datatype: (Conversion Failed When Converting Date And/or Time From Character String)

Apr 8, 2010

Title pretty much says it all. How do I format the date of a dateandtimepicker to insert it into the SQL date datatype?

View 20 Replies

Best Way To Hold App Settings

Dec 2, 2010

I'm building a new industrial app using MODBUS/TCP talking to a DAQ unit that will have a lot of parameters and will need to be adaptable for different scenarios. For example, the units I'm connecting to have 12 inputs and 6 outputs, mapping for those may be different for each installation, and in one instance I'll be talking to 4 units together - if that's the best way to do it - each one will have identical parameters, just a different ID number and ip address. They will all be writing to a SQL Server database. Not sure if I'm better off having a Tab control with each unit on a separate tab or a different instance of the app for each one. Is one better than the other? The units will be polled every 200-500ms. 500ms seems to be more stable.

With so many parameters, is it better to store all them inside the application and access them through My.Settings or would I be better storing them in a database, either the SQL Server DB or maybe something like SQLite (one of my faves) or is there a better way?

Not done anything quite as big as this before and first time with MODBUS, but that bit is working a treat.

View 1 Replies

Hold Left Key Down?

Mar 13, 2012

Currently, I use SendKeys.SendWait("{Left}")

How can I hold the left arrow down?

View 13 Replies

How To Hold Up A Console App

Oct 26, 2011

I really want to do this the proper way, it's just that I've been doing it the wrong way for so long, I can't seem to get past it.

in a console app if I start a timer or kick off a thread or bgw, the sub main runs right on thru and the app finishes and closes.

i need the sub main to just hold position until some event is raised then handle the event and come back to sub main or end depending if the event that was raised told us to end or not.

what I would normally use is this:

Do While KeepLooping
Wait(5D)
CheckTimedEvent()
Loop

View 5 Replies

VS 2010 - Hold Key Down For Only One Second?

Jun 4, 2012

So, if this is how to hold a key down for an infinite amount of time:
keybd_event(CByte(Keys.Right), CByte(MapVirtualKey(Keys.Right, 0)), 0, 0)
How can I hold it down for only 1 second?

View 3 Replies

Run The Exe And Not Have Any Sub Folders To Hold The Images?

Jan 22, 2009

i have maid a program witch has images in it from my hdd. Now when i build my program and send it to other ppl thay cannot see the images. i know this is becaws the path i directed to pull the images from is not on there pc nor do thay have the images lol. so my question is how do i put the images in the actual exe as in the actual program that i have built so all the images and stuff are all in there. so thay only need to run the exe and not have any sub folders to hold the images.

View 1 Replies

Fastest Way To Hold A Big List Of Something?

Jun 24, 2009

so the way I have this working now I'M using System.Collections.Generic.List(Of T) for holding 100's of a structure.Dim Users as New List(Of User)

I was wondering if there was any better way or faster list container or something like this in the .net framework?

View 5 Replies

How Many Rows Can A Listbox Hold

Jul 11, 2011

I have over 9,00,000 records in my Access database but only a fraction of that is being displayed in the listbox. How Many Rows Can A Listbox Hold? Around 65K is the answer I got from my research.

View 3 Replies

Making A List Box Hold A Value?

Nov 30, 2011

I am a first year coding student and we are starting out with Visual Basic. Up until now I have been able to figure everything out, but I have run hard into a wall and I don't feel like I've been taught how to get over it. Here's the thing.

First Form

Contains a list box for products selected, and four text boxes for Subtotal, Tax, Shipping and Total.

Second & Third Forms

Each contain a list box of books to select from which will be added to the first form.[code]....

I feel like I am doing it wrong right out of the gate - as you can see I am going by the item that the user chooses, and adding a constant value that I have pre-defined in a module. Then I add the name of the book to the first form - but here's the issue.That text string doesn't hold a value.SO, when I use the remove button on the first form - the text string removes but the subtotal, tax, shipping and total boxes do not change in the least bit because the item that I removed doesn't retain any value.

View 6 Replies

Structure To Hold 2 Strings?

Nov 29, 2011

I like to create a Structure that could hold 'Yes' or 'No' only; just like a Boolean variable could hold True or False.

View 12 Replies

Using XML As Database And Uses Dataset To Hold The Xml?

Jan 6, 2010

im using XML as my database and uses dataset to hold the xml. which one do you think is better to backup my xml?

1. write the xml to 2 location, default location and the backup location

dataset.writexml(path1)
dataset.writexml(path2)

2. write the xml to default location and copy it to the backup location

dataset.writexml(path1)
copyfile(path1,path)

if you have a better way of doing it please dont hesitate to share it..

View 1 Replies

.NET Snake Game Freeze When Hold A Key Down?

Dec 24, 2011

I'm trying to make the classic Snake game in VB.NET, but if I hold a key (any key) during the game, after a few seconds the game freezes until I release the key. I've tried lots to fix this, but nothing works, maybe because I don't understand the problem.I'm assuming that when I hold down a key, the Form1_KeyDown function gets called, and when, after a few seconds, the key goes into "I'm being held down" mode, that function is constantly called, so the timers don't get a chance to update. But like I said, I'm probably wrong.

I've been struggling with this for a while. I think this is all the necessary code, please let me know if it isn't.

[Code]...

View 3 Replies

Access Database To Hold Data For VB App?

May 3, 2010

I have a bit of a problem. I am using an Access database to hold data for my VB app. In the VB app, I have a data source thats pulling data from the database.

I modified the database today, deleted some tables, added another one, but the data source in the project window does not show these updated changes. I had to reconfigure the datasource with the wizard to get the changes to update.

Is there a way that i can get the data source to update itself when the form loads?

View 3 Replies

After Add And Refresh Textboxes Hold No Data

Oct 13, 2011

I'm not sure if this is a simple problem or not but it's frustrating me to no end.

I'm using the following code to add my data to the database, and then this to refresh. [code]...

View 6 Replies

Asp.net - .NET Textbox Changed But Still Hold Initial Value?

Apr 5, 2010

I've never come across this before:I have a series of text boxes. The text of these boxes get set on page load. then I have a submit button that calls a sub to update the table with the new values (text) in the text box. The problem is it is keeping the original text not the text that is CURRENTLY in the textbox. Anyone come across this before? Or know how to get round it?

[Code]...

View 1 Replies

Best Way To Set Up Server That Could Hold Multiple Databases

Apr 5, 2010

connect my vb.net application to a remote sql server database, so every one who installs the application would be able to connect to the same remote database. the application would obviously require the internet to run.i also want the option to add more databases in the future, preferably one for each business who would use my software.i am wondering the best way to set up this server that could hold multiple databases. i would think i have two options:

1) set up the server myself on a dedicated computer

2) pay for some type of service that host sql server dataases

so how would i go about executing these options? i dont know the first thing. which option is better?i do however know how to connect to a remote database so thats not what i am asking.

View 5 Replies

Control That Can Hold Html Page?

Feb 3, 2011

what control can hold an html page? vb.net2003 windows app

View 4 Replies

Create Array To Hold Xml Data

Aug 10, 2011

I want to store the contents of an XMl file into an array but struggling to work this out. I have managed to read the data in and store in labels as a test. I then created an array list and used a message box to display the data to see that it has been stored. It does but I am not sure how to group this data. There are 3 records in the file. the idea is to end up with the following:

[Code]...

View 10 Replies

Declare A Variable That'll Hold Bytes?

May 12, 2009

I would like to know how to declare a variable that holds bits.

View 11 Replies

Have A Dictionary Or Something Of That Sort That Can Hold 3 Values To 1 Key?

May 23, 2009

is there a way i can have a dictionary or something of that sort that can hold 3 values to 1 key?

View 12 Replies

Having A Grid Hold Its View State?

May 29, 2009

I have an Obout grid that I have been trying to work with and I put all of their code in my site so that I could have my grid stay expanded when the page does an automatic refresh.How or what is the correct way to code for a If (Page.IsPostBack) code.Next is there an online free convertor, translator, for javascript to VB.NET; if not is there someplace that I can go to where they will explain the different meaning of the javascript in comparision to what it would mean in VB.Net (such as var I think means dim or it could mean something else I am not sure.)Final is there a good source on grids and how they work with a view state or a session? But it needs to be basic as I am still trying to understand all three of those processes.

View 5 Replies

Hold A Card In Poker Game?

Jun 11, 2010

Anybody know how to hold a card in poker game?[code]...

View 1 Replies

Hold A Contextmenu Sub-menu Open?

Jul 26, 2009

I have been a programmer for 36 years (COBOL,FORTRAN, etc.) but I am new to VB.NET. I am writing a random quote generator program to teach myself VB.NET. On a context menu of a NotifyIcon I have some main menu items, one of which is "Choose random quote files". When I mouse over the main menu item the sub-menu opens. I can click on one of the filenames that has been loaded from a directory to include (or exclude) it from the population. As soon as I do, the context menu closes. I want the user to be able to click on more than one file name before the menu closes.

View 8 Replies

Hold And Send Key To Another Window In Focus?

Jun 30, 2010

I need to have a VB form that runs out of focus behind another program. When I press "A" (I'll use "A" and "B" as my example keys), "B" is then sent to the program in focus from the VB form and held until "A" is pressed again.

I've worked out how to get it to repeat a key press hundreds of times but I need it to HOLD the key, rather than to just Press and De-press countless times.Here's the piece of code which repeats the letter "A" 100 times:

Dim Index As Integer 'My count variable
For Index = 1 To 100 'Count from 1 to 100

[code]....

View 2 Replies

Hold Button For Certain Time Then Do Action?

Mar 26, 2012

I'm making a timer. To start the timer the user must hold down a button for a certain period of time (0.7 seconds) then the timer will start. I'm having trouble making a code so that the timer starts only when the user hold the button for 0.7 seconds.

View 5 Replies

Hold Multiple Instances(10) Of Alarms?

Jul 20, 2010

I have created an alarm program but am having an issue creating multiple alarms. Here is what I have so far. I have created an array to hold multiple instances(10) of alarms that I want to run concurrently.

Code:
Dim SetAlarms(7, 9) As String
Public Shared x As Integer = AlarmNumb
'X=alarmnumb

[Code]....

What I cannot figure out is how to get the program to read the array and recognize each row as a separate alarm to process. This means it must read the array, know which variables to populate with what information and cycle thru the list.

View 5 Replies

Send A Mouse Click, And Hold It?

Feb 11, 2011

Is it possible to send a mouse click in Visual Basics and have it gold the mouse click down for about 3 seconds then release?

View 2 Replies

Snake Game Freeze When Hold A Key Down?

Apr 8, 2012

I'm trying to make the classic Snake game in VB.NET, but if I hold a key (any key) during the game, after a few seconds the game freezes until I release the key. I've tried lots to fix this, but nothing works, maybe because I don't understand the problem.'m assuming that when I hold down a key, the Form1_KeyDown function gets called, and when, after a few seconds, the key goes into "I'm being held down" mode, that function is constantly called, so the timers don't get a chance to update.

View 10 Replies

Using MDB File To Hold Data On Server?

Jul 23, 2010

Is it possible to use ACCESS DB (MDB) on a SERVER. I would like to use the MDB file to hold my DATA. Has any1 used a multi user vb.net program with Access DB residing on a SERVER? I am just trying out something and do not want to use SQL SERVER for this project.

View 10 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved