|
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
|
|
|
|
|
|
does this work for you?
tooltip1.ReshowDelay = 5000
???????
|
|
|
|
|
so i wrote it works nice i modify it onli a little bit
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
|
|
|
|
|
|
Hi All!
I've just noticed something really annoying! when you insert the following code into a webbrowser control while it's in designmode:
<OBJECT STYLE="DISPLAY: none" ID="OpenFileDialog1" HEIGHT="0px"
CODEBASE=
"http://activex.microsoft.com/controls/vb5/comdlg32.cab" WIDTH=
"0px" CLASSID="CLSID:F9043C85-F6F2-101A-A3C9-08002B2F49FB">
<PARAM NAME="_ExtentX" VALUE="847">
<PARAM NAME="_ExtentY" VALUE="847">
<PARAM NAME="_Version" VALUE="393216">
<PARAM NAME="CancelError" VALUE="0">
<PARAM NAME="Color" VALUE="0">
<PARAM NAME="Copies" VALUE="1">
<PARAM NAME="DefaultExt" VALUE="">
<PARAM NAME="DialogTitle" VALUE="">
<PARAM NAME="FileName" VALUE="">
<PARAM NAME="Filter" VALUE="">
<PARAM NAME="FilterIndex" VALUE="0">
<PARAM NAME="Flags" VALUE="0">
<PARAM NAME="FontBold" VALUE="0">
<PARAM NAME="FontItalic" VALUE="0">
<PARAM NAME="FontName" VALUE="">
<PARAM NAME="FontSize" VALUE="8">
<PARAM NAME="FontStrikeThru" VALUE="0">
<PARAM NAME="FontUnderLine" VALUE="0">
<PARAM NAME="FromPage" VALUE="0">
<PARAM NAME="HelpCommand" VALUE="0">
<PARAM NAME="HelpContext" VALUE="0">
<PARAM NAME="HelpFile" VALUE="">
<PARAM NAME="HelpKey" VALUE="">
<PARAM NAME="InitDir" VALUE="">
<PARAM NAME="Max" VALUE="0">
<PARAM NAME="Min" VALUE="0">
<PARAM NAME="MaxFileSize" VALUE="260">
<PARAM NAME="PrinterDefault" VALUE="1">
<PARAM NAME="ToPage" VALUE="0">
<PARAM NAME="Orientation" VALUE="1">
</OBJECT>
Then a little grey icon (Kind of like a button with a drawing in it) comes up and pushes everything down a line. This is really messing up my WYSIWYG HTML editor. Is there any way to hide these icons or are they completely unavoidable?
Thanks!
MrWolfy
|
|
|
|
|
I think you have the wrong forum. Nothing in your post screams VB.NET. I just hear the screeching of either HTML, XML, or XAML.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Hi!
You may have a point there. I'll take this somewhere else.
Thanks!
MrWolfy
|
|
|
|
|
I am currently migrating a VB 6.0 windows application to vb.net.We are using crystal reports 7.0 in VB 6.0 where the rpt files are located in a separate folder and manipulated at runtime with proper inputs.
Now i have to write code that uses .net 2005 crystal engine that manipulates the same rpt files in the same way at runtime.Here is my vb 6.0 crystal reports code.
With CrystalReport4
.Reset()
.WindowShowSearchBtn = True
.Connect = gs_ReportConnectStr
If Trim(s_TableName) = TABLE_5A Then '"5"
CrystalReport4.set_DataFiles(0, "WBXD_TABLE57_TMP3_T")
.ReportFileName = REPORT_PATH & "tab5a7.rpt" 'TABLE7_RPT
ElseIf Trim(s_TableName) = TABLE7 Then '"7"
CrystalReport4.set_DataFiles(0, "WBXD_TABLE7_FINAL_T")
.ReportFileName = REPORT_PATH & "tab5a7.rpt" 'TABLE7_RPT
End If
For i_Index = 0 To .GetNSubreports - 1
.SubreportToChange = .GetNthSubreportName(i_Index)
.Connect = gs_ReportConnectStr
If .GetNthSubreportName(i_Index) <> "Spec.rpt" Then
If Trim(s_TableName) = TABLE_5A Then '"5"
.set_DataFiles(0, "wbxd_table57_tmp3_t")
Else
.set_DataFiles(0, "wbxd_table7_final_t")
End If
Else
.set_Formulas(0, "CountryDesc = " & Chr(34) & s_CountryGroupName & Chr(34))
.set_Formulas(1, "CurrencyDesc = " & Chr(34) & go_RefTables.fn_CurrencyDesc(s_TableCurr.Value) & Chr(34))
End If
Next i_Index
.SubreportToChange = BLANK_STRING
If Trim(s_TableName) = TABLE_5A Then '"5"
.SelectionFormula = CStr("{WBXD_Table57_TMP3_T.T573_job_Id} = " & l_JobId) '& " and {WBXD_Table57_TMP3_T.T573_Desc_Upto_Asof} <> " & Chr$(34) & "999999999999999999999999999999" & Chr(34))
ElseIf Trim(s_TableName) = TABLE7 Then '"5"
.SelectionFormula = CStr("{WBXD_Table7_final_T.T573_job_Id} = " & l_JobId) ' & " and {WBXD_Table7_final_T.T573_Desc_Upto_Asof} <> " & Chr$(34) & "999999999999999999999999999999" & Chr(34))
End If
.Destination = i_Destination
i_result = .PrintReport
End With
Can somebody help me out in writing the .net 2005 equivalent code.
|
|
|
|
|
Its sort of urgent.Any help is kindly appreciated.
Let me make things more clear by pointing out what i need in the code.
1..Connect = gs_ReportConnectStr
gs_ReportConnectStr is a connection string using ODBC DSN.What is the code for connection string using odbc dsn in .net crystal reports 2005.
2.CrystalReport4.set_DataFiles(0, "WBXD_TABLE57_TMP3_T")
How can i set datafiles in .net crystal reports 2005.WBXD_TABLE57_TMP3_T is the name of the SQL table.
3..SubreportToChange = .GetNthSubreportName(i_Index)
.Connect = gs_ReportConnectStr
the qns 1 and 2 also apply for the sub reports.
4..setFormulas(index,formula)
What is its equivalent in .net 2005 for both mainreport and subreports.
5..Destination
i need the report to open out in a separate window.How can i do this in .net 2005.
|
|
|
|
|
Well Rameel this is urgent only to you, these forums are to help others to better their programming skills. Therefore your first post was not going to get a response, we are not interested in writing your code for you.
However your second effort shows you are at least working on it so!
1 Go here for ODBC connections clickety[^]
2 Each report has 1 or more tables which all need to have their credentials applied, use foreach table in report.tables
4 - sorry can't help
5 I used to have a seperate form with a viewer, I would open the RPT, connect the tables in the RPT to the database, pass the RPT to the viewer and then display the form.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks a lot Mycroft.
I did go through the articles regarding crystal reports posted here and i am trying to solve it out.
One more help.The link u gave for ODBC is not opening.Can you recheck and include it once more.
|
|
|
|
|
sorry the link was typed rather than copied try[^]
Never underestimate the power of human stupidity
RAH
|
|
|
|
|