|
You have to look into third party components to create PDF files in VB
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
|
That is a shame, but thanks for sharing that with us
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Yeah, that sucks. That would be a nice built in feature.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
I am writing a vb.net program that simply returns the running-config of a given cisco device.
When doing this via the command prompt, hitting the space bar returns the name page of data. My problem is telling the cisco to give me the next page of data using my telnet class. No matter what size I make my return buffer, it doesn't matter. The return text is still broken into "pages". If i send a space (0x20) char, the cisco doesn't see it as the same thing and breaks the text. I've also tried CR, LF, and CR&LF.
Anyone know what I am talking about?
|
|
|
|
|
I have no idea what you need to do to get around this, but I have a more reliable method. Implement a TFTP server in your code, then just tell the router to save the running-config to your server. Whalla, and no screwing around with "next page" spacebars.
|
|
|
|
|
Hi,
I have created a .Net dll (c#) and made it com visible to access from vb6.0. There is a method in dll that returns custom object on successful execution. The custom object has a property of type string array. Can any one tell or give me sample code to read the values in the property array from vb code. Thanks in advance..
|
|
|
|
|
Assuming you have access to the VB6 application, do what I do.
Run the application in debug and, when the object is returned, examine it using 'watch.
From there, you should be able to determine the structure.
Tim
|
|
|
|
|
Thank you very much Tim, it solved my problem
|
|
|
|
|
After the day I had yesterday, knowing SOMETHING worked is a good feeling...
|
|
|
|
|
Hello Tim,
I am facing another problem. On a method call .net dll returns a custom object that has a property called Item which is an array of another custom object Item. I am getting type missmatch error when I try to assign it to a array of Item. Could you tell me where I am doing a mistake?
Below is the code that i am using (I have written a comment where error is):
Private Sub btnRecall_Click()
Dim printSaleReceipt As POSInterfaceDLL.Receipt
If txtReceiptId.text <> "" Then
Set printSaleReceipt = New POSInterfaceDLL.Receipt
Set printSaleReceipt = POS.GetSaleReceipt(txtReceiptId, Customer)
Dim list() As POSInterfaceDLL.Item
With printSaleReceipt
If .receiptId <> "" Then
Dim text As String
text = "Customer Name: " & .CustomerName & " - " & _
.AccountID & vbCrLf
list = .Items 'Error is here
For i = 0 To UBound(list) Step 1
text = text & list(i).Name & " - " & list(i).Quantity & " - " & _
list(i).UnitPrice & vbCrLf
Next
text = text & "Total Tax: " & .TaxAmount & vbCrLf
text = text & "Total Amount: " & .TotalAmount
txtReceipt.text = text
End If
End With
btnRecall.Enabled = False
btnRefund.Enabled = True
Else
MsgBox ("Please enter receipt id")
End If
End Sub
I could see the values from Watch...
Thank you,
Rakesh
|
|
|
|
|
Iam using generic functions in my project,
EntityFlow.Ey_ps_giftvoucher is a entity collection
Dim NewProducts As List(Of EntityFlow.Ey_ps_giftvoucher) = List.FindAll(AddressOf SearchForDate)
I use the function to find the particular code like passing only one parameter
Function FindByItemCode(ByVal item As EntityFlow.Ey_ps_giftvoucher) As Boolean
If item.Psgv_item_code = (TextBox1.Text.Trim & "*") Then
End If
End Function
I need to find the values by passing more than one parameter for example(id and name)
Pls anyone give the right solution to solve this problem
|
|
|
|
|
I'm not clear what your asking.
'Assumes ID is an integer and name is a string
Function FindByItemCode(ByVal item As EntityFlow.Ey_ps_giftvoucher, _
ByVal vID as Integer, _
ByVal vName as String) As Boolean
If item.Psgv_item_code = (TextBox1.Text.Trim & "*") Then
End If
End Function
Is that what your looking for?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
I
In find function iam passing entity item and -(ByVal item As EntityFlow.Ey_ps_giftvoucher)
Function FindBytest(ByVal item As EntityFlow.Ey_ps_giftvoucher) As Boolean
If item.Ps_item_code Like (TextBox1.Text.Trim & "*") Then
End Function
I want to pass any no of entity parameters to get the result for ex i can pass id and name or Id and date of the entity to find the result or id ,Name and Date of the entity
how to write the function
can any you suggest me
|
|
|
|
|
hi flocks,
Is there any way we can find out the total and free memory slots on mother board, types of memory ( DDR-I, DDR-II) and its size.
|
|
|
|
|
WTF?
dim i, j, k, l as integer
i = my.computer.Ram.TotalSlots
j = my.computer.Ram.FreeSlots
k = my.computer.Ram.CurrentAvail
l = my.computer.Ram.TotalAvailIfSlotsUsed
dim Type as string = my.computer.Ram.Name
dim MHZ as integer = my.computer.Ram.Speed
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Hello,
I#m struggling hard with data types and conversion in VB. Could someone please let me know how I would convert a time-stamp (read from a file header as 4-byte i.e. DWORD length / big-endian) into a VB variable so that I can show it in a list field?
Thanks for any ideas,
Michael
|
|
|
|
|
Can you provide an example of the date value that is coming from the file?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
The type conversion is going to depend on what the DWORD value actually represents. Is it a number of seconds since a given base time?
If so, do a DateAdd to add the DWORD value to the base time.
Hope that helps...
Tim
|
|
|
|
|
Thank you both for helping.
The DWORD in the file (big-endian) is 06 00 42 11 (four bytes). I swap the bytes first and place the result in a UInt32 variable (hDWORD).
msg &= Hex(SwapDWORD(br.ReadUInt32)) results in the decimal "06004211".
Yet I don't find a way to convert that value neither to a time-string (e.g. "06:00:42:11") for the list box nor to a DateTime data type. One more "horror" is the thought that - after reading and correcting the time stamp - I will have to write it back to the file...
What do you think?
|
|
|
|
|
Well, I'm half in a daze today and my brain is NOT working at 100%, so all I have is a cheesy solution like this:
'Read from file
Dim DwordValue As String = "06004211" 'IE: Hex(SwapDWORD(br.ReadUInt32))
'Format value.
Dim FileTime As String = Strings.Left(DwordValue, 2) & ":" & Mid(DwordValue, 2, 2) & ":" & Mid(DwordValue, 4, 2) & ":" & Strings.Right(DwordValue, 2)
'To resave current or new value:
FileTime = Strings.Replace(FileTime, ":", "")
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
|
With enough caffeine, I'll eventually come around.
With the previous example, you could use a set length stringbuilder if you're processing a large amount of data.
If the time value is always going to come in at the same length, you could probably also use a regeex to format the value.
Just throwing out some ideas.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Wow - you must really have had some caffeine already
I started reading a bit about stringbuilder and regEx, and I think especially regular expressions could be a powerful way to solve it! As written in my last (edited) response to Tim, it's a movie time-code I'm dealing with. The address in the header is always the same, it's always 4 Bytes, and it should always be formatted as "00:00:42:11" (e.g.)
As a consequence I would need to determine a regEX which starts from the RIGHT side of the string - as in the case of 0 hours and 0 minutes the string would be much shorter. Would that work? (I'm only at chapter 1 with my reading...)
Hoping your ideas flow on like that
|
|
|
|
|
Since it sounds like a regex will work for you and that you'll be processing a large amount of records, see if you can 'compile' the regex (using the RegexOptions.Compiled or Regex.CompileToAssembly option). This will ensure your regex is compiled directly into MSIL code. There's a slight trade off in that it will take a little longer for the regex to load and how it is destroyed; but once loaded will operate much faster. Really not to bad to implement at all.
Check out this ebook and review the section on regular expression (starts at end of page 65) vs a compiled one (whether inline or to an external assembly).
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|