|
I find finally some useful print info. So printing works at the desired start punt Y. But where does it end?
My X-start is always 0 that's o problem. but the Y where does it stops?
I will calculate if needed but how?
rtf use many fonts can have pictures in it
|
|
|
|
|
|
I know. I can now print multiple pages. I can start on the page on every Y coordinate. I need now to know where it ends. So that my program can continue with the other info that must be on the same group of pages.
Now I have about 15 different print jobs that continues printing takes a new page if there is not enough room to fit on that page. but al that info is just printed. e.graphics.drawstring and images. Now I have rtf but I don't have the ending Y.
|
|
|
|
|
If you go to the link I provided and read it all you will see an example that shows exactly how to get this information.
|
|
|
|
|
I knew how to calculate Y on normal printing.
I fond out with your links how to print rtf.
However calculate Y with rtf I have not found. English is not my language. It myth be the reason but I can't find it.
|
|
|
|
|
It is exactly the same. Every time you ptint a line you need to use the font details of the text on that line to calculate the Y-increment. If you are using multiple fonts on a line then you would use the font with the largest character height.
|
|
|
|
|
RTF prints not 1 line but a rectangle
res = SendMessage(Handle, EM_FORMATRANGE, wparam, lparam)
|
|
|
|
|
Sorry but I have no idea what that means.
|
|
|
|
|
Good day. anyone can help me to build an audio player with a spectrum analyzer, i've used this function to do Play , Pause and Stop :
<DllImport("winmm.dll")> _
Private Shared Function mciSendString(ByVal strCommand As String, ByVal strReturn As StringBuilder, ByVal iReturnLength As Integer, ByVal hwndCallback As IntPtr) As Long
End Function
my problem is how to capture sound and apply FFT , the FFT Function is like this :
Private Sub FFTAudio(ByVal RealIn() As Integer, ByVal RealOut() As Single)
|
|
|
|
|
Why did you repost the same question again hours after you posted it??
DON'T DO IT AGAIN. It's considered rude to spam any forum with the same question over and over again.
|
|
|
|
|
crikey - someone got up in the wrong side of the keyboard this morning
Bryce
MCAD
---
|
|
|
|
|
Yeah, testing and tweaking a piece of system software all day will do that to you.
|
|
|
|
|
I'm sorry i'll never do it again , i'm a new member in that forum .
|
|
|
|
|
|
Hi i need to make an audio player application which contain a sound spectrum Vu Meter , i've used this function for play pause and stop :
<DllImport("winmm.dll")> _
Private Shared Function mciSendString(ByVal strCommand As String, ByVal strReturn As StringBuilder, ByVal iReturnLength As Integer, ByVal hwndCallback As IntPtr) As Long
End Function
I Need to capture the sound from the sound card then apply FFT (Fast Fourier Transform) , the FFT function is like this :
Private Sub FFTAudio(ByVal RealIn() As Integer, ByVal RealOut() As Single)
please someone can help me , appreciate it
|
|
|
|
|
What exactly do you need help with? You haven't said.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I need help to show the sound spectrum of the audio file being played by the application
|
|
|
|
|
Why can't some people protect the beautiful nature?? 
|
|
|
|
|
This is not the forum for a question like that.
|
|
|
|
|
Lakmali Perera wrote:
Why can't some people protect the beautiful nature??
..and which movie inspired this programming question?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Lakmali Perera wrote: beautiful nature Is that a new phrase for the Visual Basic Ecosystem?
|
|
|
|
|
Why do i get the error - "Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic", when I try to pass a String array from vb6 to a class:Property string array in vb.net?
This is the vb6 code:
Option Explicit
Private Sub btnTest_Click()
Dim strTest(4) As String
strTest(1) = "abc"
strTest(2) = "def"
strTest(3) = "ghi"
strTest(4) = "jkl"
On Error GoTo err1
Dim clsTest As ComTest.clsValues
Set clsTest = New ComTest.clsValues
clsTest.SingleString = "this is my string"
clsTest.stringArray = strTest
MsgBox "Single string = " & clsTest.SingleString, vbInformation, "Test"
Dim x As Integer
For x = 0 To UBound(clsTest.StringArray)
MsgBox "Multi string 2 = " & clsTest.StringArray(x), vbInformation, "Test"
Next x
Exit Sub
: err1
MsgBox "Error: " & Err.Number & vbCrLf & Err.Description, vbCritical, "btnTest_Click"
On Error Resume Next
End Sub
This is the vb.net class
Imports System.Runtime.InteropServices
<ComClass(clsValues.ClassId, clsValues.InterfaceId, clsValues.EventsId)> _
Public Class clsValues
#Region "COM GUIDs"
Public Const ClassId As String = "095dc64d-141f-46f9-9af2-1c5e633b459b"
Public Const InterfaceId As String = "86ec1f14-1ef4-446d-9172-b92cf260cd16"
Public Const EventsId As String = "1605e412-8b11-4ee0-a34c-9ec04464737f"
#End Region
Public Sub New()
MyBase.New()
End Sub
Private mSingleString As String
Public Property SingleString() As String
Get
Return mSingleString
End Get
Set(ByVal value As String)
mSingleString = value
End Set
End Property
Private mStringArray() As String
Public Property StringArray() As <MarshalAs(UnmanagedType.SafeArray, safearraysubtype:=VarEnum.VT_BSTR)> String()
Get
Return mStringArray
End Get
Set(<MarshalAs(UnmanagedType.SafeArray, safearraysubtype:=VarEnum.VT_BSTR)> ByVal value As String())
mStringArray = value
End Set
End Property
End Class
The class has been compiled and the .tlb has been registered.
The class has been referenced in vb6.
Error on clsTest.StringArray(x) in vb6 when trying to run project
modified 3-Mar-14 10:14am.
|
|
|
|
|
You don't seem to be setting the StringArray property anywhere. You also have a line which doesn't look like it should compile:
clsTest strTest
Is this a typo in your question?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank you for the reply
It is a typo but this is where the error occurs, see error message at top of message after correction.
|
|
|
|
|
I suspect the problem is that the array needs to be passed ByRef , which isn't supported in property setters. Try replacing the property setter with a method:
Public Property StringArray() As <MarshalAs(UnmanagedType.SafeArray, safearraysubtype:=VarEnum.VT_BSTR)> String()
Get
Return mStringArray
End Get
End Property
Public Sub SetStringArray(<MarshalAs(UnmanagedType.SafeArray, safearraysubtype:=VarEnum.VT_BSTR)> ByRef value As String())
mStringArray = value
End Sub
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|