|
Yeah, there is that, but nothing in the code snippet posted would generate the error.
|
|
|
|
|
compiler errors (as well as run-time exceptions) provide accurate information about class names, file names, and line numbers for all the problems they want to refer to. And any decent IDE can show source code including line numbers; it is unfortunate Visual Studio has that feature off by default.
Hence: turn on the "show line numbers" option, and then look at the exact line where the problem occurs.
BTW: always log exceptions in their full length, i.e. use their multi-line ToString() result, not their Message property.
|
|
|
|
|
1
modified 28-Nov-12 4:06am.
|
|
|
|
|
how is each sub level defined in the file?
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
|
Make a list where you add a text when you enter a new sublevel. Then iterate until you reach a new level, removing everything in the list.
Where are you stuck?
Bastard Programmer from Hell
|
|
|
|
|
I tried this code to open Google site from Vb.net and display the data in Textbox on the form to textBox on the Google, but didn't success with, by displya the data only the code open the Google.
By the way I using the dll file "SHDocVw"
notice:"description" is the name of TeXtBox in google
Imports SHDocVw
<pre lang="vb"> Dim objIE As SHDocVw.InternetExplorer
objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate("http://Google.com")
objIE.Visible = True
objIE.Document("description").ToString = TextBox1.Text
|
|
|
|
|
Example:
1 st combo box item
2 nd combo box item
3 code no is text box
4 th in combo box item
then above 4 field to generate the auto sr.no. what can code in vb6..
plz help me...
|
|
|
|
|
anghan22 wrote: then above 4 field to generate the auto sr.no.
I have no idea what this is supposed to mean, but you may like to look here[^] for some help.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Example:
1 st combo box is select= LSO then
2 nd combo box is select=Ls1
what are the code...?
plz help me
|
|
|
|
|
sometimes people don't know hoq to ask for what they want.
Encourage them by asking specific questions.
|
|
|
|
|
I don't think this is the forum for your comment; you probably meant to post it here[^], where it would make sense.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
That sadly is what has been tried and tried again. People here will try to get the information out of person asking the question. BUT not everybody has the time to do this on a daily basis
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Cameron Atkinson wrote: Encourage them by asking specific questions
I'll stick to answering questions that I think are worth answering. We're volunteers.
Bastard Programmer from Hell
|
|
|
|
|
We've been doing that time and time again. FAR, FAR more often than not, you never get a response back from the OP.
|
|
|
|
|
ok all. I'll think about it
|
|
|
|
|
I am posting to a rich text box from a visual basic program. I want the text to be immediately visible, but sometimes it is delayed. I am using the following two sets of code with similar results (not always instant). How can I make it instant?
Public Sub postMessageBox(ByVal aMessage As String, ByRef aTextBox As RichTextBox)
aTextBox.Text &= aMessage
aTextBox.Text &= Chr(13)
aTextBox.SelectionStart = Len(aTextBox.Text)
aTextBox.SelectionLength = 0
aTextBox.SelectionStart = aTextBox.Text.Length
aTextBox.ScrollToCaret()
End Sub
Public Sub postMessageBoxSimple(ByVal amessage As String, ByRef atextbox As RichTextBox)
atextbox.SelectedText = amessage & Chr(13)
End Sub
|
|
|
|
|
Manipulating a (rich)textbox takes time. How about a ListBox [^] and drawing the items by hand?
Bastard Programmer from Hell
|
|
|
|
|
Thanks for the help. I really appreciate it.
|
|
|
|
|
You're welcome
|
|
|
|
|
First, you're setting SelectionStart twice. You only need it once.
Second, every time you add a string to the end of the Text property, you're making a copy of the original content and then adding the new text to it, thereby creating two copies of your string. The long your log gets (I assume that's what you're doing) to longer each item added will take to show up.
Also, ScrollToCaret will also present some problems because it only works if the RTB has the input focus and that isn't always possible depending on the system you're writing.
Use a ListBox instead.
|
|
|
|
|
Thanks for the help. I really appreciate it.
|
|
|
|
|
As Dave has already pointed out, adding text by appending what is already there to the new text will create a new copy of the entire text. I believe RichTextBox has an AppendText (or Append ) method that will edit the text in memory and update the UI.
SelectionStart is set twice, once should be enough.
If RichTextBox supports BeginUpdate and EndUpdate , use them. It will speed up UI refresh.
|
|
|
|
|
Hi,
I need help in writing a script for outlook 2003.
This is what i want the script to do for me..
1.) I want the script to run outlook and select a mentioned profile,
2.) Then the script should be able to minimize the outlook window,
3.) After that I need to do send & receive,
4.) And in the last, script should be able to close the outlook properly.
Can anyone help..?
Presently I am using a scripts to run outlook do send and recieve and then close it...
Its working fine the only problem is I am using sendkey(F9) to do send and receive and it only works if outlook window is active.
And plus I want add one more thing, I should also be able to minimize the outlook with this script so that it wont bother other’s when they logon to the computer.
My prsent Script is
<package>
<job id="vbs">
<script language="VBScript">
set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "outlook /profile registration"
WScript.Sleep 20000
WshShell.AppActivate "Outlook"
WScript.Sleep 1000
WshShell.SendKeys "{F9}"
WScript.Sleep 28000
Dim oOL 'As Outlook.Application
Set oOL = GetObject(, "Outlook.Application")
If oOL Is Nothing Then
'no need to do anything, Outlook is not running
Else
'Outlook running
oOL.Session.Logoff
oOL.Quit
End If
Set oOL = Nothing
</script>
</job>
</package>
|
|
|
|
|
I came across something that I thought was kind of odd. My software does data analysis on a bunch of data and there is a function that determines what kind of data point each point is. To do this the function looks at different fields to try and determine it. For example:
Select Case value
Case value.contains("reading")
Case value.contains("cal")
Case Else
End Select
Recently one of the data points sent to this determination function (value ) was exactly "cal". In this case when the value was evaluated in the select statement it wasn't picked up. I need to change the select statement to:
Select Case value
Case value="cal"
Case value.contains("reading")
Case value.contains("cal")
Case Else
End Select
Is this always how the contains methods worked? That if the string was exactly the same as the parameter passed to the contains method that the contains method would return false? I just recently migrated this project to .NET 4 and VS2010, but I'm pretty sure that in .NET 3.5 and VS2008 the first select statement would have worked. Did something change in .NET 4 with how the contains statement is evaluated?
|
|
|
|