|
I am writing a RFID driver and I face a problem in writting "set baseband filter"
Here is the problem
Filter mask:
H G D B C E
1/0 1/0 1/0 1/0 1/0 1/0
I want to use Window application form in visual basic language to do this. If the Filter H,B,C of the filter turn on, Filter mask byte should set to &H4C. If all the filter turn on, The mask byte will be &H3F.
So how to write this??
If H,B,C of the filter on,shall I get the string "1 0 0 1 1 0"
and convert it into binary , and then to hexidecimal?? If yes, how to convert it?
If no, any easy way to do this programme??
Thank you for your suggestion.
|
|
|
|
|
It isn't advisable to use VB.NET or any other .NET language to write a driver.
|
|
|
|
|
Hi,
I need to convert this coding VB 5.0 to VB.Net 2003. This print button coding in billing system. I use BIXOLON SAMSUNG SRP-275 mini printer. There was sample coding but it's in VB 5.0. But I write my program in VB.Net 2003.
This is the coding......
'//////////////////////////////////////////////////////////////////
Private Sub Command1_Click()
For Each prnPrinter In Printers
If prnPrinter.DeviceName = "BIXOLON SAMSUNG SRP-275" Then
Set Printer = prnPrinter
Exit For
End If
Next
If Printer.DeviceName = "BIXOLON SAMSUNG SRP-275" Then
Printer.Font.Size = 9
Printer.FontName = "FontControl"
Printer.Print "x"
Printer.Font.Size = 9
Printer.FontName = "FontA2x1"
Printer.Font.Bold = True
Printer.Print "* Joshua Cafe *" + vbCrLf
Printer.Font.Bold = False
Printer.Font.Size = 9
Printer.FontName = "FontControl"
Printer.Print "w"
Printer.Font.Size = 9
Printer.FontName = "FontA1x1"
Printer.Print " 3000 Spring Street, Rancho,"
Printer.Print " California 10093,"
Printer.Print " Tel) 858-519-3698 Fax) 3852"
Printer.Print vbCrLf + "---------------------------------" 'LF
Printer.Print "Orange Juice 5.00"
Printer.Print "6 Bufalo Wing 24.00"
Printer.Print "Potato Skin 12.00"
Printer.Font.Bold = True
Printer.ForeColor = RGB(255, 0, 0)
Printer.Print "Subtotal 41.00"
Printer.ForeColor = RGB(0, 0, 0)
Printer.Font.Bold = False
Printer.Print "Tax 6% 2.46"
Printer.Font.Bold = True
Printer.ForeColor = RGB(255, 0, 0)
Printer.Print "Member Discount 2.30"
Printer.ForeColor = RGB(0, 0, 0)
Printer.Font.Bold = False
Printer.Font.Bold = True
Printer.Print "Cash 100.00"
Printer.Print "Amt. Paid 41.16"
Printer.Font.Bold = False
Printer.Font.Bold = True
Printer.ForeColor = RGB(255, 0, 0)
Printer.Print "Change Due 58.84"
Printer.ForeColor = RGB(0, 0, 0)
Printer.Font.Bold = False
Printer.Print "---------------------------------"
Printer.Font.Size = 9
Printer.FontName = "FontControl"
Printer.Print "x"
Printer.Font.Size = 9
Printer.FontName = "FontA1x1"
Printer.Print "Member Number : 452331949" + vbCrLf
Printer.Font.Size = 9
Printer.FontName = "FontA1x1"
Printer.Font.Bold = True
Printer.Print "Have a nice day !" + vbCrLf
Printer.Font.Bold = False
Printer.Print "Sale Date: 07/01/03"
Printer.Print "Time: 12:30:45"
Printer.Font.Size = 9
Printer.FontName = "FontControl"
Printer.Print "w"
Dim pic As Picture
Set pic = LoadPicture(App.Path & "\free5_100.bmp")
Printer.CurrentX = 60
Printer.CurrentY = 5000
Printer.PaintPicture pic, Printer.CurrentX, Printer.CurrentY
Printer.CurrentY = Printer.CurrentY + pic.Height
Set pic = LoadPicture(App.Path & "\cafeblue208.bmp")
Printer.PaintPicture pic, Printer.CurrentX, Printer.CurrentY
Printer.CurrentX = 0
Printer.CurrentY = 9000
Printer.Font.Size = 9
Printer.Font.Name = "FontControl"
Printer.Print "g"
Printer.EndDoc
Else
MsgBox "SRP-270 windows driver don't installed"
End If
End Sub
'///////////////////////////////////////////////////////////////////////
Pls help me to solve this problum
Regards
Kusal
|
|
|
|
|
hey i wanna compare two dates in VB.NET ,for these 2 dates i ve used the monthTimer Picker
thx for this code
ok
job
|
|
|
|
|
kigali wrote: hey i wanna compare two dates in VB.NET ,for these 2 dates i ve used the monthTimer Picker
It doesn't matter what you used to pick the dates. The dates will be in a DateTime object. You can compare them in the normal way
a = b
a < b
a > b
a <= b
a >= b
|
|
|
|
|
Hey all VB.NET Developper
i have designed a Reservation system and i want to automate it so that the when the reservation date is reached .the system can cancel the reservation and the Room becomes free
i want to compare the systemn date and the reservation date which is stored in oracle Database
please help me
ok
job
|
|
|
|
|
Hi,
You already know everything? Wat do we need to tell u?
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
I have a form with no border, how do I code it so that the end user can still drag it around the desktop?
|
|
|
|
|
Hi,
you need to implement your own drag/drop for this.
try the following code
<br />
'Declare vars<br />
Private CurX As Double<br />
Private CurY As Double<br />
<br />
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove<br />
<br />
If e.Button = MouseButtons.Left Then 'use mouse_left_button<br />
Dim pt As Point<br />
pt.X = Me.Left + (e.X - CurX)<br />
pt.Y = Me.Top + (e.Y - CurY)<br />
Me.Location = pt<br />
Me.Refresh()<br />
End If<br />
<br />
End Sub<br />
<br />
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown<br />
CurX = e.X<br />
CurY = e.Y<br />
End Sub<br />
Above is a simple drag/drop implemented using mouse move and mouse down events
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
Private Sub SetPoint()<br />
If hdMousedown = True Then hdMousedown = False Else hdMousedown = True<br />
pt = Me.PointToClient(Control.MousePosition)<br />
End Sub<br />
<br />
Private Sub Form1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Form1.MouseDown<br />
SetPoint()<br />
End Sub<br />
<br />
Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Form1.MouseUp<br />
SetPoint()<br />
End Sub<br />
<br />
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Form1.MouseMove<br />
If hdMousedown = True Then<br />
Me.Location = New Point(Control.MousePosition.X - pt.X, Control.MousePosition.Y - pt.Y)<br />
End If<br />
End Sub
Posted by The ANZAC
|
|
|
|
|
i have a problem with my printer, i wanted to send an esc/pos command to the printer but i dont know how to send it to LPT port through vb, can someone help with this? thanks before...
Audrey
|
|
|
|
|
You're looking for this[^] example. WHo would have thought sending data directly to an LPT port would be so complicated.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
wuih..... huh.... thanks for the article... i'll try to read it... hopefully understand it... but anyway thanks
Audrey
|
|
|
|
|
Sir/Madam,
Can I programically ascertain , the number of users who has accounts on my operation system
I can find out the user who is currently logged in .
By the following code.
System.Environment.Username
But I want to know the no of users who has account on the operation system.
Please help.
Thanks and Regards
Pankaj
|
|
|
|
|
Hi if i select month and year based on that...,
i need that month all dates in my datagrid...,
Plz help me...,
Magi
|
|
|
|
|
if you want dates of a month in a column just for first date of month as
dim date as new date(yyyy,mm,dd)
i.e. dim ldtFirst as new date(2007,04,01) - for april
and loop through the ldtFirst.DaysInMonth - gives total number of days in the current month, add the rows in the datagrid
Milan
|
|
|
|
|
plz tell me in loop what condition we want to give...,
I am new in this..,
Plz send some sample code...,
then it will be usefull for me....,
Magi
|
|
|
|
|
in this way...........
Private Sub LoadDates()
Dim dt As New DataTable
Dim dr As DataRow
Dim lIntIndex As Integer
Dim lIntDysInMonth As Integer
Dim curDate As New Date(2007, 4, 1)
lIntDysInMonth = Date.DaysInMonth(2007, 4)
dt.Columns.Add("dates")
For lIntIndex = 1 To lIntDysInMonth
dr = dt.NewRow
dr.Item(0) = curDate.ToShortDateString
curDate = curDate.AddDays(1)
dt.Rows.Add(dr)
Next
DataGrid1.DataSource = dt
End Sub
Milan
|
|
|
|
|
thank u friend.....,
Magi
|
|
|
|
|
Hi All,
I am working on a project which is like LAN messenger. I am new to Sockets in .NET. Could anyone help me with a simple example.
|
|
|
|
|
Hi All,
I have a bit of a newbie question I cant seem to figure out. I am using VB 2005 Express.
I want to change the size of paper to A5 during, but the kind property is read only
If there is a log then print A4 if not print A5.
I use VBMySQLiect to get data from a MySQL database.
My Code:
<br />
Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click<br />
SQL = "select * from clients where id = '" & lvwList.SelectedItems.Item(0).Text & "'"<br />
For i = 2 To lvwList.SelectedItems.Count<br />
SQL = SQL & " or id = '" & lvwList.SelectedItems.Item(i - 1).Text & "'"<br />
Next<br />
rs = gCnn.Execute(SQL)<br />
With prnPreview<br />
.Document = prnDocument<br />
If bLog Then<br />
.Document.DefaultPageSettings.PaperSize.Kind = Printing.PaperKind.A5<br />
Else<br />
.Document.DefaultPageSettings.PaperSize.Kind = Printing.PaperKind.A4<br />
End If<br />
.ShowDialog()<br />
End With<br />
End Sub<br />
What do I need to do?
Thank you
Andrew
|
|
|
|
|
i want unmovable running form
what i do
|
|
|
|
|
give 'None' as its border style
|
|
|
|
|
there is not border style
pls help me
|
|
|
|
|
He's talking about the Form's BorderStyle property. Set it to None and there won't be any method for the user to move the form from where it appears.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|