|
|
could also use "if my.Computer.FileSystem.FileExists(strFilePath) then".
I have found the IO.File method to perform better if checking a large amount of files though.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Also learn to use the english language, text speak in the forum is discouraged. You have a kyboard, use it!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
Can anybody give me how to use StringBuilder Class or its similar one in VB 6.0. Atleast give me any link sor code snippet.
Thanks a Lot,
Aleem Mohammad.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
|
I beleive you have asked this question a number of times. StringBuilder is in DOTNET and is NOT in VB6.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
If he would've read the article that sum guy posted when he last asked this question he would've find out how to use Mid in vb6 to accomplish what he wants. This "write my code cause i dun wanna read anything" is starting to be more than boring.
Code? Yeah i love it fried together with a glass of wine.
|
|
|
|
|
You have been asking this question over and over for a week and have been getting the same answer for a week.
Stop spamming the board.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
<sarcasm>No, please don't stop asking. Do it again and again. People love rading the same question without end.
|
|
|
|
|
I would like to ask if anyone knows wat is the maximum number of character a RTB can have? And wat is the maximum interval a timer can have??
|
|
|
|
|
Subjugate wrote: wat is the maximum number of character a RTB can have?
Up to available memory.
Subjugate wrote: And wat is the maximum interval a timer can have??
The depends on which Timer you're talking about. If it's the Timer in the Toolbox, then it's Int32.Max, or about 2.14 billion. If it's the Timer in the Threading namespace, then it's Int64.Max, or about 9.2 Million Trillion milliseconds.
In either case, if you need to set an interval that high, you really need to rethink your design.
|
|
|
|
|
Dave Kreskowiak wrote:
In either case, if you need to set an interval that high, you really need to rethink your design.
I agree. Though it is nice to know what the limit is, the upper bound really doesn't have any practical purpose. I can't even begin to think of anything that would need that long of a duration between ticks. Especially the 9.2 million trillion milliseconds, that is quite a few years ( ~291 million )
"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
|
|
|
|
|
Thanks for the ans. I wanted to know is becos my application is a 24/7 running application. i am afraid if my RTB just full and i am not aware, it might crash the application.
|
|
|
|
|
You don't need a Timer to go for that long. You just set it to fire once a second, then, once per minute, you can compare the current time to a "scheduled" time for a process to kick off. It's utterly pointless to have a timer going for any entire day. What if your app DOES crash, or the machine goes down or loses power?? How are you going to reset the timer to a proper schedule?? That's why you have it check against a known time, instead of a known interval.
As for the size of the RTB, you really need to make sure you save off the log information to a file instead of relying on the RTB to hold onto it for you, for the very same reasons I just mentioned above. Cna you think of anything worse than losing half a days data because you didn't save each piece to a file when you received it?
|
|
|
|
|
Hi all,
I have a project with VirtualQueryEx in vb.net. Some line of My code here :
=============
Public Structure MEMORY_BASIC_INFORMATION
Public BaseAddress As Long
Public AllocationBase As Long
Public AllocationProtect As Long
Public RegionSize As Long
Public State As Long
Public Protect As Long
Public Type As Long
End Structure
Public Declare Function VirtualQueryEx Lib "kernel32" (ByVal hProcess As IntPtr, ByVal lpAddress As Long, ByRef lpBuffer As MEMORY_BASIC_INFORMATION, ByVal dwLength As Integer) As Integer
processHandle = OpenProcess(PROCESS_ALL_ACCESS, 0, m_ReadProcess.Id)
Dim mbi As New MEMORY_BASIC_INFORMATION
VirtualQueryEx(processHandle, addr, mbi, Marshal.SizeOf(mbi))
==============
But, VirtualQueryEx not working in vb.net .
Pls, help me fix error or give me some advices. Thank you alot
Best regard
|
|
|
|
|
I'm using vb2005
I have the following code
Private Sub TextBox1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox2.MouseHover
If TextBox1.TextLength > 0 Then
ToolTip2.SetToolTip(TextBox2, TextBox2.Text)
Else
ToolTip1.SetToolTip(TextBox2, "Dubbelklik linker muisknop voor" vbCrLf & "Nieuwe Afspraak" & vbCrLf & "Of om Afspraak te Bewereken.")
End If
Private Sub TextBox2_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.MouseHover
If TextBox2.TextLength > 0 Then
ToolTip2.SetToolTip(TextBox2, TextBox2.Text)
Else
ToolTip1.SetToolTip(TextBox2, "Dubbelklik linker muisknop voor" vbCrLf & "Nieuwe Afspraak" & vbCrLf & "Of om Afspraak te Bewereken.")
End If
End Sub
But if i run my application and i mosehouver twice over the same textbox
the the tooltip will show 2 times the first time verry short 0.5 seconds the second time 5 seconds it doesn't matter if the textbox has text or not. Whath can i do about that ?? I tried a lot of thinks even with other code. It's always the same.
|
|
|
|
|
Tell me you don't really have a textbox1 and a textbox2 in your code ?
Have you tried some logging code to see how often and in what order your two methods are called ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
you are using the mousehover event to show the tooltip.....
you could possible use the mouseleave event to not show/close/exit the tooltip....
thanks
Anoop
|
|
|
|
|
I tried different ways like this
Private Sub TextBox1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.MouseEnter
If TextBox1.TextLength > 0 Then
ToolTip1.Active = False
ToolTip2.SetToolTip(TextBox1, TextBox1.Text)
Else
ToolTip1.Active = True
ToolTip1.SetToolTip(TextBox1, String.Format("Dubbelklik linker muisknop voor{0}Nieuwe Afspraak{0}Of om Afspraak te Bewereken.", Environment.NewLine))
End If
End sub
Private Sub TextBox2_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox2.MouseEnter
If TextBox2.TextLength > 0 Then
ToolTip1.Active = False
ToolTip2.SetToolTip(TextBox2, TextBox2.Text)
Else
ToolTip1.Active = True
ToolTip1.SetToolTip(TextBox2, String.Format("Dubbelklik linker muisknop voor{0}Nieuwe Afspraak{0}Of om Afspraak te Bewereken.", Environment.NewLine))
End If
End sub
Private Sub TextBox1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.MouseLeave
ToolTip1.Active = False
End Sub
Private Sub TextBox2_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox2.MouseLeave
ToolTip1.Active = False
End Sub
but it's alway the same can you help me a little bit ?
modified on Monday, November 17, 2008 3:18 AM
|
|
|
|
|
sorry, but is the problem with the tooltip showing twice or
the tooltip showing when there is no text in the textboxes?
try this though...
Private Sub TextBox1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.MouseEnter
If TextBox1.Text <> "" Then
ToolTip1.Active = False
ToolTip2.SetToolTip(TextBox1, TextBox1.Text)
Else
ToolTip1.Active = True
ToolTip1.SetToolTip(TextBox1, String.Format("Dubbelklik linker muisknop voor{0}Nieuwe Afspraak{0}Of om Afspraak te Bewereken.", Environment.NewLine))
End If
End sub
AND TO hide the tooltip
Private Sub TextBox1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.MouseLeave
tooltip1.Hide(TextBox1)
End Sub
hope this helps you
Anoop
modified on Monday, November 17, 2008 3:59 AM
|
|
|
|
|
The problom is as follow
When i mousehover the first time over a textbox, it doesn't matter if there is text in there or not, The tooltip comes exact as i want.
But if i go for a second time over the same textbox the tooltip wil appear a verry short time about 0.5 seconds(that's the problem) and then he leave, after these 0.5 seconds it wil show again for 5 seconds.
And i can not let it show ones as long as i want, shell we say 5 seconds.
|
|
|
|
|
if i get you correctly, then try this...
Private Sub TextBox1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.MouseEnter
If TextBox1.Text <> "" Then
ToolTip1.Active = False
ToolTip2.SetToolTip(TextBox1, TextBox1.Text)
Else
ToolTip1.Active = True
tooltip1.ReshowDelay = 5000
ToolTip1.SetToolTip(TextBox1, String.Format("Dubbelklik linker muisknop voor{0}Nieuwe Afspraak{0}Of om Afspraak te Bewereken.", Environment.NewLine))
End If
End sub
this will keep it visible for 5 secs until you go over the control again and it will restart the 5 sec count.
hope this helps
Anoop
|
|
|
|
|
Thanks now it works exact as i want i modify your code only a little bit
as follow
Private Sub TextBox1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.MouseEnter
If TextBox1.Text <> "" Then
ToolTip2.Active = True
ToolTip2.ReshowDelay = 5000
ToolTip2.SetToolTip(TextBox1, TextBox1.Text)
Else
ToolTip1.Active = True
ToolTip1.ReshowDelay = 5000
ToolTip1.SetToolTip(TextBox1, String.Format("Dubbelklik linker muisknop voor{0}Nieuwe Afspraak{0}Of om Afspraak te Bewereken.", Environment.NewLine))
End If
End Sub
so i put the reshowdelay twice 1 for tooltip1 and one for tooltip 2
thanks for your help
|
|
|
|
|
good stuff,
thanks
|
|
|
|
|
|