|
Hi!When one writes more lines than the richtext visible area a scroll automatictly shows up, but it doesn't keep up with the text that is being written.I would like it to always be at the bottom, showing the latest writes.Isn't there any property or value that can be changed?I can't seem to find it.All i saw in the web was some strange confusing code with handlers and stuff... :P
Thanks in advance.
|
|
|
|
|
This question has been answered many times in the forums. I would suggest you try searching the comments before posting a new question. I answered this one back on Sept.3rd.
In order for the .ScrollToCaret function to work, the RTB must have the input focus:
RTB1.SelectionStart = RTB1.TextLength
RTB1.Focus()
RTB1.ScrollToCaret()
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi!
I can't seem to make it work.My code is like this:
RichTextBox1.SelectionColor = System.Drawing.Color.Red
RichTextBox1.SelectedText = texto
RichTextBox1.SelectionStart = RichTextBox1.TextLength
RichTextBox1.Focus()
RichTextBox1.ScrollToCaret()
Please say that my code has some stupid error, or that i need to set some property to some value.
PS:I'm sorry i haven't searched this forum for the answer, but in my PC this site is very, very, very slow (once i wanted to punch my monitor) and i don't know why it's always transferring data, it never says done...
|
|
|
|
|
Hi! It works fine after all.I had an error in my code.Sorry.
Thank you very much for all your help.
|
|
|
|
|
" SELECT PassID FROM Users WHERE (Today_Date) = #Date# " <---- gives me a Syntax error
how can i search the date field for the current date? I also have a query in Access that asks for the passid . if i can't run the search from my vb code, then how can i call the query from code and pass in the passid into the query?
|
|
|
|
|
You should never, Never, NEVER use string concantenation when building SQL queries. You should be using a parameterized query to do this. The parameter object will handle the validation and proper conversion of the date for you.
Check out the docs on the OleDbParameter class here[^] for more information.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm not using the .Net framework
I'm only trying to look for a record with the todays
date only to verify it exists.
|
|
|
|
|
This is the Visual Basic Forum, not Access. If you were writing code for this, this wouldn't be a problem, but you run the risk of getting flamed for asking questions in the wrong forums.
Since Access can store dates and time in various formats in the same column, for the best results you have to search between todays date and tomorrows:
SELECT PassID FROM Users WHERE ( (Today_Date>=#12/15/2004#) AND (Today_Date<#12/16/2004#) );
This query will work regardless if the date is also stored with the time, like "12/15/2004 10:14:23 AM". If your dates are also stored with the time, then your query never would have worked, even if you got the syntax correct.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am writing this Vb
<br />
strSQLUpdate = "SELECT PassID From Users WHERE (PassID)= " & SearchSQlPassID & " AND (Today_Date)=Date()" <--- works Sweet :)<br />
<br />
'open Connection<br />
strCnxn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\RMSC LOGIN\MYDataBase.mdb;Persist Security Info=False"<br />
Set Cnxn = New ADODB.Connection<br />
Cnxn.Open strCnxn<br />
Set cmdChange = New ADODB.Command ' Create command object<br />
Set cmdChange.ActiveConnection = Cnxn<br />
cmdChange.CommandText = strSQLUpdate<br />
Set rsUser = cmdChange.Execute ' execute the SQL command<br />
Now i want to test the value of the results
<br />
If rsUser.Fields("PassID").Value = 0 Then <-- error here Error 3021 either BOF or EOF is true or the record has been deleted<br />
if the passid doesn't meet the criteria above i want it to display a message
<br />
MsgBox ("You first need to log In before you log out!!")<br />
Cnxn.Close ' Close everything<br />
Set Cnxn = Nothing<br />
Unload Me<br />
how can I test the result without throwing this error?
|
|
|
|
|
Stupid Me !!!!!!!!
why didn't I try
<br />
if rsUser.BOF then <br />
MsgBox ("You first need to log In before you log out!!")<br />
Cnxn.Close ' Close everything<br />
Set Cnxn = Nothing<br />
Unload Me<br />
else <br />
the rest of my code to log the user out
Thanks for the help!! Some times it is neededc to have a different set of eyes looking at the code
|
|
|
|
|
Hi,
I want to write a program in vb by which the user can zip or unzip the selected files without opening winzip.
How i can do that in vb. if any of you have any idea or source code please tell me.
Thanks
Syed Saba
|
|
|
|
|
Do a quick google on the subject, there seem to be quite a few, also search the archives here, there are some examples that may help:
.net zip component - google[^]
Hope this helps
Tom
|
|
|
|
|
Actullay i want to use winzip in my visual basic program and through that i want to zip or unzip html files.
so i want to know how i can use winzip in my vb program through coding.
|
|
|
|
|
Yea, what you are looking for is a component that you can reference in your VB project; this will expose an object that you can use to zip/unzip files.
|
|
|
|
|
Yor are right i am looking for the same thing
|
|
|
|
|
Check out SharpZipLib[^]. To quote the author, #ziplib (SharpZipLib, formerly NZipLib) is a Zip, GZip, Tar and BZip2 library written entirely in C# for the .NET platform.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
How can i make a new form showing the positions of each racer (descending order), i have no idea how to do this as it is all new to me. My existing program is below:
http://www.angelfire.com/mech/harrysk/Assign1_Race.zip[^]
I want the race results after the race has finished, showing the Positions (descending), Name and Distance that they have travelled. Thanks in advance.
|
|
|
|
|
Have a crack at it, then we'll help on the specifics if you get stuck, rather than just writing your program for you.
|
|
|
|
|
This reeks of homework...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Not very clever, adding a link to a site that says explicitly Angelfire does not allow direct linking
from offsite, non-Angelfire pages, to files hosted on Angelfire..
Oh yes, Assign1_Race? The point of assignments is to put into practice what you learn't in the lessons, so you may find life easier if you pay attention to your teacher!
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
|
|
|
|
|
i have mdiform and i want when user open new form i close the old on i used vb6
|
|
|
|
|
I have created race game application (see project attachment: open zip file below), first off sometimes it works sometimes it doesn't, when it does work some problems still occur. The problems i am facing are:
1. why does it not change the rate of the accelelration, deceleration of each contestant when i enter it into their text boxes? (refer to project code-below)
2. when i click on restart and try to run it again all the vehicles disappear???
3. the cars already have default values (all different) so why do they run at the same speed, rate etc. (they all move at the same speed in a row, this always changes with the timer interval i enter into a text box, why?)
4. When i click on the start button the vehicles go out of the screen (down) and start to come up (start the race to see)
There may be more minor problems but i'll post them later if i have time (i got till the morining of 17th, so could someone please reply soon.) I need help on these small problems. Thanks.
Click on this link to download the project (zipped)
http://www.angelfire.com/mech/harrysk/Assign1_Race.zip[^]
|
|
|
|
|
Thought it smelt like homework, see next posting, same applies.
|
|
|
|
|
This may be possible through the windows registry but I don't have a clue on how to fetch those strings/value in hierarchal way.
|
|
|
|
|
Hiya.
Got an easy question here I think
Is it possible to pass an Array into a function withouth having to "dim" the array before hand.
For instance something like this:
Public Function Name(byval inputArray as string())
//some code
End Function
Now if I were to call that function I'd dim the array and assign the values:
dim objArray as String() = {"value", "value" ... "value"}
and then call the function:
Name(objArray)
However - what I'd really like to call the function similar as this:
Name( {"value", "value", ... , "value" } )
That is calling the function withouth having to dim the array.
Is there anyway something similar is possible?
Yes - I know it is a few lines of codes, but I'd still like to know.´
With regards
Alsvha
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|