USB class for Visual Basic.net


Can any one help me with USB interface. I am looking for a class that would be a starting point for use with communications with RS232 serial adaptors and Dallas One-Wire USB adapters like the DS9490. I do not understand the coding process and could use the help.
Posted On: Monday 24th of December 2012 01:08:13 AM Total Views:  313
View Complete with Replies

RELATED TOPICS OF Visual Basic PROGRAMMING LANGUAGE




how to capture the dos print job from dos and send to usb windows print

\t i would like to capture the dos print job from dos and send to usb windows print job (i.e. printers like deskjet and laserjet USB port)
VIEWS ON THIS POST

226

Posted on:

Monday 24th September 2012
View Replies!

Thread help with updating statusbar label (Cross-Threading)

Misha Zhutov [MVP]http://submain.com | Post Points: 5 sp!ke Richmond, VA Since 9/15/2003 Posts 6,220 Reputation 35,933 Reply Scott Waletzko (sp!ke) replied on 4/6/2007 7:03 AM rated by 0 users Be sure to also check out the Threading FAQs right here on VBCity, they cover creating threads and updating user components from background threads (with two different methods to choose from).
VIEWS ON THIS POST

254

Posted on:

Saturday 13th October 2012
View Replies!

dos printing on usb port in win 7

i have created a batch file as follows copy "d:\pharma\printvch.txt" "net use lpt1:\\ysf\ysfEpson /persistent:yes" i have dmp printer epson lq 300 connected via usb i wanted execute the above batch and print it on the dmp printer but its not working what I ll have to do to print this
VIEWS ON THIS POST

251

Posted on:

Tuesday 16th October 2012
View Replies!

Re: Vb6 usb comms on windows 7

Hi . I'm new here. I use VB6 to write SCADA software. I use USB/Serial converters to interface to PLCs. My application works fine on Windows XL but data seems to be blocked on Windows 7. I've tried different USB/Serial and replaced drivers without success. Please can someone help Sam
VIEWS ON THIS POST

177

Posted on:

Tuesday 16th October 2012
View Replies!

how to Detect attached usb/serial device attached to computer

, how do i detect attached usb/serial device on computer, and detect when its removed i found a code here but i am having complication using it. it uses subclassing sort of to detect this. any ideas pls
VIEWS ON THIS POST

149

Posted on:

Thursday 18th October 2012
View Replies!

how to convert macro in excel to vb

how to convert macro in excel to vb
VIEWS ON THIS POST

148

Posted on:

Wednesday 28th November 2012
View Replies!

Http Wrapper and pausing the bot / program

Fixed This post has been edited by nick1200: 03 August 2009 - 09:39 AM
VIEWS ON THIS POST

118

Posted on:

Wednesday 28th November 2012
View Replies!

Color Modes

Can any one kindly let me know about, How to get information about color mode of JPEG/TIFF images using VB
VIEWS ON THIS POST

60

Posted on:

Thursday 29th November 2012
View Replies!

security error

ereor: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. code: Public Class MainForm Private myConnnection As New SqlConnection() Private myConnnectionString As String Private myReader As SqlDataReader Private adapter As SqlDataAdapter 'Private myCommand As SqlCommand() Private myData As New DataTable Private myRowPosition As Integer = 0 Private Sub MainForm_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed myConnnection.Close() myConnnection.Dispose() End Sub Private Sub ShowCurrentRecord() If myData.Rows.Count = 0 Then txtTemplateNumber.Text = "" txtTempDescription.Text = "" Exit Sub End If txtNewTemplateNumber.Text = myData.Rows(myRowPosition)("Temp_Num").ToString() txtTempDescription.Text = myData.Rows(myRowPosition)("Description").ToString() End Sub Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load myConnnectionString = "Data Source = Trainingsql;Initial Catalog = CareLabels;Integrated security=SSPI" Dim myConnection As New SqlConnection(myConnnectionString) myConnection.Open() Dim mySelectQuery As String = "Select Temp_Num,Description from CareTable1" 'myReader = New SqlDataReader(mySelectQuery, myConnection) Dim adapter As New SqlDataAdapter() adapter.SelectCommand = New SqlCommand(mySelectQuery, myConnection) adapter.Fill(myData) Me.ShowCurrentRecord() End Sub Private Sub btnNewLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewLabel.Click Dim drNewRow As DataRow = myData.NewRow() drNewRow("Temp_Num") = txtNewTemplateNumber.Text drNewRow("Description") = txtNewTempDescription.Text myData.Rows.Add(drNewRow) adapter.Update(myData) myRowPosition = myData.Rows.Count - 1 Me.ShowCurrentRecord() End Sub End Class MOD EDIT: Added code tags.
VIEWS ON THIS POST

159

Posted on:

Thursday 29th November 2012
View Replies!

video switching

how can i connect the 3 live video inputs to show up in the output screen..and add some shortcut key to each live video using the key 1,2 & 3 to switch the 3 live videos.. the code is attach or download it here: http://rapidshare.co...ersion.rar.html password: 4731234567 need immediate help for this..thank you in advance This post has been edited by reborn29: 14 January 2009 - 06:06 AM
VIEWS ON THIS POST

199

Posted on:

Thursday 29th November 2012
View Replies!

Distance Traveled

I need to make a code that just simple loops and prints on the input. Example you will put the speed your going and than the time if you put 50 miles per gallon it will just double it so it would be 100. Any help would be appreciated i did some what this for starters, but doesn't work. Private Sub cmdRunDemo_Click() Dim sngTotal As Single Dim intNumScores As Integer Dim sngAverage As Single Dim strInput As String Dim intCount As Integer strInput = InputBox("Vechile speed", _ "Enter a Value") strInput = InputBox("time", _ "Enter a Value") Do Until strInput
VIEWS ON THIS POST

75

Posted on:

Thursday 29th November 2012
View Replies!

How to generate invoice in Data Report in VB 6.0

I like to generate a simple invoice in Data Report in VB 6.0. I have developed an application to collect individual prices of items and calculate the gross payment. Now i like to generate and invoice in data report. Could someone refer me a tutorial on data reports or explain the required method to achieve what i require.
VIEWS ON THIS POST

222

Posted on:

Thursday 29th November 2012
View Replies!

Inline IF condition is True - VB6 also looks at False part?

General Dim rsBrand As New ADODB.Recordset Private Sub Form_Load() rsBrand.Open "tblBrand", Cnn, , adLockOptimistic End Sub Private Sub cboBrand_DropDown() Call PopulateCombo(cboBrand, rsBrand, 1) End Sub Public Sub PopulateCombo(ByVal cbo As ComboBox, ByVal rs As ADODB.Recordset, ByVal No As Integer) With rs .Requery Do While Not .EOF cbo.AddItem IIf(cbo.Name = "cboBrand", .Fields(No), .Fields(1) & " " & .Fields(2)) .MoveNext Loop End With There is the error message "Run-time error '3265': Item cannot be found in the collection corresponding to the requested name or ordinal." and the line cbo.AddItem IIf(cbo.Name = "cboBrand", .Fields(No), .Fields(1) & " " & .Fields(2)) is highlighted. Placing the cursor on .Fields(2) shows the error message. The error is because tblBrand has only 2 fields. However, since cbo.Name = "cboBrand", does VB6 not go only to the True part (.Fields(No)) It looks at the False part (.Fields(1) & " " & .Fields(2)) also (and thus causes the error) I prefer the Inline IF function to the If...Then...Else statement for IIF takes only 1 line. I will have to use If...Then...Else if IIF does not work in this case. What about the advantages and disadvantages of each over each other This post has been edited by AN1554: 22 April 2012 - 03:26 AM
VIEWS ON THIS POST

148

Posted on:

Friday 30th November 2012
View Replies!

How do I detect Picture box collisions in VBA?

I build a game in excel visual basic but I cant seem to detect collisions. Anyone have any idea how to do this Sub Form1_KeyDown(allthestufftodetectwhichkeyisbeingpressed) if left = char("leftasciichar") then image.left = image.left -10 end if dim widthleft as integer dim height as integer if image11.left >= image2.left then widthleft = image2.left + image2.width if image11.left = image2.top then height = image2.top + image2.heaight if image11.top
VIEWS ON THIS POST

237

Posted on:

Friday 30th November 2012
View Replies!

date code

i have a calendar on a page and the front of my application. there is an associated option to select one or two weeks. what i want to do is depending on which option is selected (eg. 1 week or 2 weeks) after selecting arrival date i want the return date to automaticaly populate. Eg. i select 1 week for travel and the date selected is the 18th i want the return date field to be populated with th 25th as the return and so on for a different selection. Private Sub MonthCalendar1_DateChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles MonthCalendar1.DateChanged If MonthCalendar1.Selectionend
VIEWS ON THIS POST

246

Posted on:

Friday 30th November 2012
View Replies!

HOW to ADD hex?

hey will anybody like to tell me how do i add hex in already maded vb6 program \t\t
VIEWS ON THIS POST

82

Posted on:

Friday 30th November 2012
View Replies!

find and match record in VbA

Dim oFSystem As Object Dim oFolder As Object Dim oFile As Object Dim sFolderPath As String Dim SQL As String Dim i As Integer Dim var_FileCN As String Dim sFile As String Dim var_FilePattern As String Set dbs = CurrentDb() Set obj_RSCN = New ADODB.Recordset sFolderPath = "D:\Tmp\DATAIN\" Set oFSystem = CreateObject("Scripting.FileSystemObject") Set oFolder = oFSystem.GetFolder(sFolderPath) Set obj_RSCN = dbs.OpenRecordset("SELECT File From specificfile", dbOpenDynaset) MsgBox obj_RSCN!File For Each oFile In oFolder.Files If Not obj_RSCN.EOF Then If obj_RSCN!File > oFile Then sFile = Mid(oFile, 16, 30) obj_RSCN.AddNew obj_RSCN!File = sFile obj_RSCN.Update obj_RSCN.MoveNext Else If oFile > obj_RSCN!File = True Then ' obj_RSCN.MoveNext 'MsgBox i & " files were imported." End If End If End If Next
VIEWS ON THIS POST

99

Posted on:

Friday 30th November 2012
View Replies!

Mysql Connection to the Internet

, im developing a website rightnow and im using mysql as its database, i also want to connect the program i did in visual basic 6.0, my problem is that i never encountered to connect a database that is online, is anybody know how can i do it, im usign adodb connection for the connection of vb6.0 to the mysql database.
VIEWS ON THIS POST

94

Posted on:

Friday 30th November 2012
View Replies!

DICE GAME HELP

This program studies the Image List control and random numbers. Design a form that uses Picture Box controls to store die images. Images die1.jpg, die2.jpg, die3.jpg, die4.jpg, die5.jpg and die5.jpg are stored on our First Class conference. Each image is 50 x 50 pixels. When the user clicks the Roll the Dice button, display random die images and compute the winner in the left List Box. You should report the value of the computers roll, the player roll and the win status. Use class-level variables to count the number of wins for the computer, number of wins for the player, and number of ties. When the user clicks the Summary button, report the values in the three class-level counters with one of three messages, depending on the output: If the computer wins, report Looks like I beat you! If the player wins, report Looks like you won this time! If the computer wins equals the player wins, report "It looks like a draw." When the user clicks the Clear button, reset the class-level counters to 0 and clear the two List boxes If you can help - please email me at {EMAIL REMOVED} Attached image(s)
VIEWS ON THIS POST

129

Posted on:

Friday 30th November 2012
View Replies!

Padding Left and Right

Okay, so I have no clue how to format by padding left and right. I have two integers, two strings, and another integer that I need to align neatly in columns. There is a total of about 100 columns, and they have to be neatly aligned. Here is my code: Console.Writeline(num1.ToString().PadRight(5) + num2.ToString().PadRight(5) + str1.PadLeft(20) + str2.PadLeft(20) + num3.ToString().PadRight(5)) So yah, how do I pad it correctly so the columns can be neat and aligned.
VIEWS ON THIS POST

108

Posted on:

Friday 30th November 2012
View Replies!

KDKEVIN needs help in forms

hey i have a form (doesnt matter what size) and i have a shape that is in the middle of the form and it seems there is like 2 sides also i have a bouncing ball. i tried to say that when the ball falls on the right side a msgbox says "hi" and if it falls on the left then it says "bye", how would i do that i tried but it didnt work and i'm using vb6 thx u
VIEWS ON THIS POST

216

Posted on:

Friday 30th November 2012
View Replies!

railway reservation

how to make railway reservation software in visual basic 6.0
VIEWS ON THIS POST

121

Posted on:

Friday 30th November 2012
View Replies!

warnings in visual

=/ At the pictures in addenda to the visual I have seen warnings How to resolve: /
VIEWS ON THIS POST

259

Posted on:

Friday 30th November 2012
View Replies!

Free Visual Basic Software

Hi! I'm taking a Visual Basic class right now and I was wondering if you can get a free Visual Basic program. I want to be able to bring my assignments home and work on them, but I can't because I don't have the software to. I tried using something called Visual Basic: Express Edition from Microsoft, but it only lasted so long and then my trial was up. So if anyone knows of any lasting Visual Basic Software that I can simply download onto my computer, I would very much be grateful.
VIEWS ON THIS POST

50

Posted on:

Friday 30th November 2012
View Replies!

Correct the formula

I am using vb6 and crystal report 10. In my report i want that the page number of the page should not start with 1 ,rather with number given by user. for which i made a formula field with the coding QuoteNumberVar startNum := 5; "Page " + ToText((PageNumber + startNum), 0)
VIEWS ON THIS POST

151

Posted on:

Friday 30th November 2012
View Replies!

Dao Append

I have this old code that was written in VB4 and Access 97. I have moved it up to VB6 and created the database in the 2002 format. It works with the old code, using the DAO 3.5 Library. However, with the DAO 3.6 library(which seems to be required to open the database) it will not let me append a table to it. It comes back at me and says the database or object is read only. Is there something that I am missing Here is the code that is used.... Dim CParts_Data As TableDef ' the common parts table 'create the tables Set CParts_Data = DB.CreateTableDef("cpartstbl") 'provide a source database type and database name with connect property CParts_Data.Connect = "text; database=" & App.Path 'provide the name of the text table with the sourcetablename property CParts_Data.SourceTableName = Desfile 'append the tabledef to create the link DB.TableDefs.Append CParts_Data It is creating a table based on a text file that is specified by the user.
VIEWS ON THIS POST

69

Posted on:

Friday 30th November 2012
View Replies!

Efficiently scanning strings for numeric characters

Have you ever considered using regular expressions for this I am not sure if you are using .NET or VB 6, but both support the use of regular expressions (.NET has it built in and VB 6 needs the vbscript library). The idea with regular expressions is that it look for patterns and creates matches. For instance... If I had the string "Area 51 - Page 3" I could throw a regular expression of [0-9]+ against it and it would result in an array of matches. This array would have two elements... one match would be "51" and the second would be "3". Then once you have your matches, all you would have to do is compare element 2 (the number 3) with element 2 of another string (lets say it was 4) and you would know which match is changing. To give you an idea of how this works, you can try the following website... Regular Expression Library At the bottom you will see two boxes, the first will say "Source" and the second will say "Pattern". In the source box type Area 51 - Page 3 and in the pattern box type [0-9]+ and hits submit. Then scroll down to the bottom and you will see a place where it says "Matches" and shows you the two numbers from the string. Once you try this out, I am sure your problems will dissolve like button on a hot skillet. Let us know if you have any further questions. "At DIC we be regular expression loving code ninjas!" This post has been edited by Martyr2: 18 November 2007 - 01:32 PM
VIEWS ON THIS POST

319

Posted on:

Friday 30th November 2012
View Replies!

Convert Integers to Roman Numerals

I REALLY need help with this one I don't know where to begin..PLEASE Question: create a vb program that displays the roman numeral for any integer given BETWEEN 0 and 4000
VIEWS ON THIS POST

60

Posted on:

Friday 30th November 2012
View Replies!

a logic function in Visual basic 6.0 finding a string within a string

We are creating a chat bot that would recognize or at least get hints from a text string encoded by the user and we will be setting constants that would be the output once a specific text string is found within the entry made by the user. We are using excel programming before and the syntax used should be like this. =IF(ISNUMBER(SEARCH("hi",$A$1)),hello",C2) using this syntax in excel, it will find the word "hi" within the text string found in cell A1 (for example the text string contains "hi, i am the king of the world"), and if it finds it (true condition), it will show "hello" (value if true), else it will run another if statement in cell C2 (value if false). the thing now is that this kind of syntax is not working in visual basic. Is there a function in Visual basic that can be used that would show the same result as what we used in excel
VIEWS ON THIS POST

203

Posted on:

Sunday 2nd December 2012
View Replies!

Problem in Making ActiveX Control using MSFlexGrid

Hi and Salam to Every One I am making an OCX control using MSFlex Grid in it. When I take TextMatrix property in a property page it Works fine but when I want to give multiple Headings on Design it Shows Correct Result only on Design Time, but when I Execute the Project by F5. It Removes all Headings and Only Shows the Last one that I have Entered in the Grid I have Thoroughly check the Code but I cant Fix it. If any one can Please Help me By this Problem I will really been Thankful for Him/Her Suggestion will Highly Appreciated Best
VIEWS ON THIS POST

124

Posted on:

Sunday 2nd December 2012
View Replies!

Is it possible to sort listbox items?

Is it possible to sort listboxes I've got five listboxes, but I want to sort by a single listbox and have the others automatically sort themselves accordingly. For example, let's say that I have first name, last name, phone number, etc. and I want to sort by last name and have the other columns automatically sort accordingly.
VIEWS ON THIS POST

91

Posted on:

Monday 3rd December 2012
View Replies!

Programatically creating a GUI in VB

Generally speaking i am a fairly good programmer, i can work in Java, C++ and C# but at my newest job i am not allowed any of these languages on my pc. For fun i have been creating a multiple choice quiz game which takes questions and answers from a text file. i am trying to make this completely dynamic and believe that i have created all of the necessary back end functions to achieve my goals. the point the program is at is that i have initialised several arrays with data (questions, answers and which answer is the right one). i have a number nQs (number of questions) which is the lengths of all of the arrays. The problem i have is one of how to dynamically create a gui within VB when the user clicks a button. Also i must mention, i am using VB from within Word 2003 as i have no other programming languages here. At present my document has a label, a button and a textbox. the onclick method of the button performs all the magic of initialising the internal data structures and its next task is to create rows of One row for each question (determined from the value entered into the textBox) So to re-itterate, i want to do something equivalent to the following Javacode: for (int i = 0; i
VIEWS ON THIS POST

73

Posted on:

Sunday 23rd December 2012
View Replies!

temperature converter in Visual Basic

how do you program on visual basic a temperature converter
VIEWS ON THIS POST

70

Posted on:

Monday 24th December 2012
View Replies!