|
Prissy,
Thank you very much for the code I appreaciate the help im glad Dave explained it to me as this would of been cheating :P
|
|
|
|
|
I don't do it any other way! Good Luck!
|
|
|
|
|
Is it VB 6 or VB .NET? I don't know about return statement in VB 6? I'm forgot to choose Question. Oh, it's a VB .NET Discussion. I don't know. Sorry.
|
|
|
|
|
|
I use System.threading.timer() to read RS232 data periodically,
But I found it seems the threading.timer() produces many threads,like each cycle it use a new thread to read.
Is the threading.timer use many threads of threadpool?
|
|
|
|
|
How are you using it? Creating it once then just handling the event, or some other method? Can you post the code where you instantiate it and where you handle it?
|
|
|
|
|
econy wrote: But I found it seems the threading.timer() produces many threads,like each cycle
it use a new thread to read.
From the documentation:System.Threading.Timer is a simple, lightweight timer that uses callback methods and is served by thread pool threads. It is not recommended for use with Windows Forms, because its callbacks do not occur on the user interface thread.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I got error message while installing an VB.NET applicaiton -
"Cannot Start Application
An error has occurred writing to the hard disk. Check if there is enough available space on the disk. Contact the applicaitonh vendor..."
In the Detail, it has -
"ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\amldoc1\VB 2003\Project\FTT\publish\NetCommFieldTestTool.application resulted in exception. Following failure messages were detected:
+ Downloading file:///C:/amldoc1/VB 2003/Project/FTT/publish/Application Files/NetCommFieldTestTool_1_0_0_0/Converter.netmodule.deploy did not succeed.
+ The file 'C:\Users\aoum\AppData\Local\Temp\Deployment\K4ZJZGMC.N2C\5045Z1V0.DDV\Converter.netmodule' already exists."
I have tried the solution posted on your site --> Publish - Application Files and select "Include" for all dll files.... still the same error.
Any idea or suggestion?
Thanks for your help!!
|
|
|
|
|
You try clearing out your temporary files before installing?
|
|
|
|
|
yes, I cleared the temp files under Windows\Temp and Users\(myid)\AppData\Local\Temp... still the same error...
There's "install.log" in then Temp\VSD666.tmp -
"
The following properties have been set:
Property: [AdminUser] = true {boolean}
Property: [InstallMode] = HomeSite {string}
Property: [ProcessorArchitecture] = AMD64 {string}
Property: [VersionNT] = 6.1.1 {version}
Running checks for package 'Windows Installer 3.1', phase BuildList
The following properties have been set for package 'Windows Installer 3.1':
Running checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe'
Result of running operator 'VersionGreaterThanOrEqualTo' on property 'VersionMsi' and value '3.1': true
Result of checks for command 'WindowsInstaller3_1\WindowsInstaller-KB893803-v2-x86.exe' is 'Bypass'
'Windows Installer 3.1' RunCheck result: No Install Needed
Running checks for package '.NET Framework 3.5 SP1', phase BuildList
Reading value 'SP' of registry key 'HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5'
Read integer value 1
Setting value '1 {int}' for property 'DotNet35SP'
The following properties have been set for package '.NET Framework 3.5 SP1':
Property: [DotNet35SP] = 1 {int}
Running checks for command 'DotNetFX35SP1\dotNetFx35setup.exe'
Result of running operator 'ValueGreaterThanEqualTo' on property 'DotNet35SP' and value '1': true
Result of checks for command 'DotNetFX35SP1\dotNetFx35setup.exe' is 'Bypass'
'.NET Framework 3.5 SP1' RunCheck result: No Install Needed
Launching Application.
Application appears to be an application manifest
Launching application manifest via dfshim "
Any idea?
Thanks for your help!!
|
|
|
|
|
How to view the list of PC names on the LAN using vb6
|
|
|
|
|
Step 1: Ditch VB6 and get the free VB.NET Express version of Visual Studio, here[^].
It's VERY unlikely anyone is going to help you with VB6 anymore. It's long been a dead language.
|
|
|
|
|
For starters, I agree with what Dave said... do not use VB6; use a .NET language instead.
Second, rather than simply asking for code, show what you've done and ask for guidance from there.
Tim
|
|
|
|
|
Execute the "net view >computers.txt" command, and read the "computers.txt" file.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Is the VB.NET winform application multithread or single thread?
if I want to use threading.timer in a VB.NET application, do I need pay attention to the MTA, or STA?
|
|
|
|
|
econy wrote: Is the VB.NET winform application multithread or single thread?
Yes, VB.NET supports free threading.
econy wrote: if I want to use threading.timer in a VB.NET application, do I need pay
attention to the MTA, or STA?
Doesn't matter unless you are doing/using something COM-related. What are you doing?
|
|
|
|
|
I want to use a thread to read data from serial port periodically
|
|
|
|
|
I wrote a small program, just want to test DateTime.Now and System.Timers.Timer.
I set Timer interval = 50/40, i.e 50ms/40ms
And in the timer elapsed event, call a StreamWriter.write() function,
tstText = "111" & Space(11) & Format(now, "hh:mm:ss.fff ")
mFileStreamWriter.Write(tstText)
But I found in the text file which stors the data, the timer resolution is 62-65 ms.
01:38:13.423
01:38:13.485
01:38:13.548
01:38:13.610
01:38:13.673
01:38:13.735
01:38:13.798
01:38:13.860
01:38:13.923
How can I make the resolution to 50ms, 40ms? or it is impossible to do it in Windows OS or any OS?
|
|
|
|
|
Since Windows is not a real-time operating system, and is pre-emptive, and..., and..., getting dead on timer ticks just isn't possible. You can use various tricks to get better resolution, but even those have their limits. A few people have written articles about getting 1us resolution, but nobody has proven they work beyond any doubt.
Under Windows 7 and below, depending on the hardware, the default timer resolution is +/- 15.6ms. This means that a tick will be anywhere within about a ~32ms window of when it's actually supposed to be fired. You can change the resolution down to 1ms, but it's system-wide change that effects everything running on the system, not just your app. See this[^] for more info.
|
|
|
|
|
After some operations, I want to set the StreamWrite object be NULL.
Now the code I wrote as follows:
mFileStreamWriter.Flush()
mFileStreamWriter.Close()
mFileStreamWriter = Nothing
But MSDN said is/isNot only used to compare the reference, not value.
So = Nothing means let an object refer to Nothing, right?
|
|
|
|
|
Nothing in VB.NET is null in other languages.
You don't have to set the streamwriter to Nothing. It does nothing for you at all.
|
|
|
|
|
|
If the StreamWriter is a local variable which never escapes the current method, wrap it in a Using ... End Using[^] block. This will ensure that the Dispose method is always called, even if your code throws an exception.
Using stream As Stream = File.OpenWrite("path\to\your\file.txt")
Using sw As New StreamWriter(stream)
...
End Using
End Using
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi all...
I have a questions about opentype font ...
whether we can show OpenType feature in vb.net?
and if it can where I can get a tutorial and script
Thank you for reply
best wishes,
dee
|
|
|
|
|
Deeane wrote: whether we can show OpenType feature in vb.net? That's possible.
Deeane wrote: and if it can where I can get a tutorial and script CodeProject[^]. It's in C#, but the same applies to VB. If you're having trouble translating it to VB, post again here
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|