|
Hi,
I am using Word Object library in my program to open word documents and save it as RTF documents. It seems this is not saving the Header/Footer information in the RTF file.
Any Suggestions?
Thanks.
GTS
|
|
|
|
|
Hi,
hope somebody out there can help me out...
I want to configure a DDE data feed in my VB.NET application. Is this possible or can I only use Visual Basic 6.0? Case "Yes": how should I do this?
Case "No": could someone tell how to make this feed in Excel?
Thanx,
H.J.Verschuren
|
|
|
|
|
Hi there,
i found a really good article about multithread tcp handling, but i code in VB.NET and the source is in c#; i managed to translate most of the code, but some of them are out of my knowledge, please help
##################
private Thread [] ThreadTask = new Thread[NUM_OF_THREAD] ;
ThreadTask[i] = new Thread( new ThreadStart(this.Process) );
ThreadTask[i].Start() ;
//NUM_OF_THREAD is a const
##################
public ClientService(ClientConnectionPool ConnectionPool) {
this .ConnectionPool = ConnectionPool ;
}
//is this a function ? a sub ? how do i translate 'this' ?
##################
lock( ConnectionPool.SyncRoot ) {
if ( ConnectionPool.Count > 0 )
client = ConnectionPool.Dequeue() ;
}
// lock opens {} as an if ?
#################
Thanks in advance
|
|
|
|
|
|
Thanks,'me' worked perfectly
I understood what
private Thread [] ThreadTask = new Thread[NUM_OF_THREAD]
say, the matter is that i cannot find a way to rewrite it in vb
the only near declaration accepted from the syntax that i found is
Private ThreadTask as Thread(NUM_OF_THREAD)
but i miss the 'new' part. Any idea ?
Thanks again for the kind help
|
|
|
|
|
|
|
Thanks, i'll study it, i found just a few mins ago the synclock function, i hope it will work in a nice way but i'll check the monitor first
|
|
|
|
|
Yo all, have entered a stupid problem which I'm not sure is a bug in VB. I have this code:
<br />
Dim Record as Recordset, DB as Database<br />
Set DB = OpenDatabase("c:\db.mdb")<br />
Set Record = DB.OpenRecordset("BASE")<br />
Yet this remarkably simple code falls over when setting the recordset, because there is a "data type mismatch" (groan), when in fact there is no data type mismatch. OpenRecordset returns, guess what, a recordset, so wtf????? To add insult to my injuries, if I declare Record as a Variant instead, the line proceeds and guess what, Record gets cast to a, wait for it, Recordset object (ie. I can access the variant as I would a recordset and in debug the fields are identical), and all the data is intact and correct. Also, interestingly (though wankily) if I cast the Recordset object to a variant using CVar and then call OpenRecordset, I get no errors and indeed no recordset object, its just set to 'Nothing'. Is this just another episode of why VB is so sh*t? Can someone explain to me how a function returning a Recordset object can have a data type mismatch when trying to assign to a Recordset object??? Honestly, this is basic programming logic which this stupid, shitting language cannot grasp. I await someone to prove me wrong.
|
|
|
|
|
OK guys, found the answer elsewhere on the web, and guess what, its sh*t. Basically VB defines two recordset objects, both called 'Recordset', for ADODB and DAO, which is fair enough. However, fatally, VB CANNOT differeniate between the two, so whenever you specify Dim Record as Recordset it always assumes you are using the ADODB recordset object, hence the data type mismatch because OpenRecordset returns a DAO recordset, duh. This is exactly why VB is sh*t. C++ adopts a technique of namespaces, if there is ambiguity in the type the compiler will throw an error saying 'use of ambiguous types', nice, addresses you to the problem. VB just kicks up some bullshit AT RUN-TIME, which is horrible, horrible, horrible, because no end of bugs could manifest themselves. You even have to specify Option Explicit to force the compiler to point out basic compiler errors such as undeclared identifiers. This is wank. Anyway, the solution is declare the recordset as part of the DAO 'namespace' like so Dim Record as DAO.Recordset .
VB should be burned on a cross and sent to hell for its sins
|
|
|
|
|
Yeah, I know exactly what you mean. It just totally disgusts me how flimsy the compiler is, and annoying when have a line myvar = and then press enter and it comes up with a box saying you did something wrong, when really you were just gonna cut and paste some code. I only use VB when absolutely necessary, like when I have to knock up some bullshit app in a day or so. Its strange mind, cos this guy at work, Mark, he loves VB, personally I think he must be a bit sadistical to love VB.
Lots of Love Simonxxxxx.
|
|
|
|
|
I tried to fill a combobox with xml data, but it wont work
the sourcecode is like this:
Dim ds As New DataSet("Koder")
ds.ReadXml("D:\Utveckling\dotnet\tester\forms tester\Forms test\bin\Codes.XML")
Dim i As Integer
For i = 0 To ds.Tables(0).Rows.Count - 1
With ComboBox1
.Items.Add(ds.Tables(0).Rows(i)("code").ToString)
End With
Next i
I recieved a error message with:
Invalid Cast exception
my xml sheet look like this:
<xml>
<aktiviteter>
<br />
<id>1001</id><br />
<avtivitet>Hej</avtivitet><br />
<br />
<id>1002</id><br />
<avtivitet>Då</avtivitet><br />
<kostnader>
<kkoder>
<id>9001
<kostnad>Bilresa
How should I solve this problem
|
|
|
|
|
Hi
I need some suggestions for VB.net books.What are the titles you recommend...
Regards, Agni.
|
|
|
|
|
mastering VB.NET is a good one..
one disadvanage is that it does not focus on VB.NET as an Object Oriented language,, it teachs you how to make things you used to make in VB6 ,, in VB.NET this time..
|
|
|
|
|
Thank you HSPC...
Regards, Agni.
|
|
|
|
|
Hi
I need to format a long string into user definable line lengths, i.e.
The cat sat on the mat and the dog bit the cat (linelength=10)
The cat
sat on the
mat and
the dog
bit the
cat
The cat sat on the mat and the dog bit the cat (linelength=11)
The cat sat
on the mat
and the dog
bit the cat
Can any of the regext gurus help me with this one? Note that a line ending can be a comma, semicolon, color, period.
Many thanks
Jeremy Holt
|
|
|
|
|
|
Ian
You're quite right, I don't know whay hadn't thought of that before.
I wrote this which seems to work:
Public Shared Function ToParagraph(ByVal Text As String, ByVal LineLength As Integer) As String
Dim arr As String() = Text.Split(New Char() {" "c})
Dim sb As New Text.StringBuilder
Dim CurrentLine As Integer = 0
For i As Integer = 0 To arr.Length - 1
If CurrentLine + arr(i).Length + 1 <= LineLength Then
CurrentLine += (arr(i).Length + 1)
sb.Append(arr(i) & " ")
Else
CurrentLine = arr(i).Length + 1
sb.Append(vbCrLf & arr(i) & " ")
End If
Next
Return sb.ToString.TrimEnd
End Function
Regards
Jeremy
|
|
|
|
|
|
Hi;
I hv C++ program which declare a return message as LPstr datatype, when i want to add reference this C++ program and used in VB.net & i receive this message in String datatype. After built, an Type mismatch error comes out.
Any one know how to convert LPstr datatype to any relevant datatype in VB.net
Headache Unmanaged Code
|
|
|
|
|
Has anyone done anything with an application that works with winfax or just windows fax?
|
|
|
|
|
I've got a HelpProvider control on my Project form with all the necessary Properties. If I run my project and press F1 on the form, it opens the correct Help file, but gives the following error:
"Index not yet installed"
What is the problem?
Pls F1!
|
|
|
|
|
i make program using java as server and vb as cliet. Client can get message from server but server can not get message from client..why...???
java code below
public testvb()
{
while(true)
{
Socket s=new Socket();
try
{
server=new ServerSocket(8888);
s=server.accept();
}
catch(Exception e)
{
}
try
{
in=s.getInputStream();
reader=new BufferedReader(new InputStreamReader(in));
out=s.getOutputStream();
writer=new PrintWriter(out);
System.out.println(reader.readLine());
}
catch(Exception e)
{
}
}
}
vb code below:
winsock.send "Sending message to server"
|
|
|
|
|
Hi all VB gurus, I'm a C++ person attempting to use the wizardry of VB for a quick DB app. I've used some DTPicker controls and want to compile the whole thing up in one exe, so I can run it any windows PC. Currently, it complains about a missing .ocx file if I run it on a machine without VB. Can't seem to find it any where in the project settings. Do I have to package it up like a dll using the Package and Deployment wizard or something? cheers all
|
|
|
|
|
Yes, you have to create a setup package that includes all the dependent files.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|