|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Updating FormsHello Everybody,
I would like to automatically display the updated text box information on a form. I am using a timer to trigger the code to update the .text information for the text box but the text box does not automatically update the display. How can I call the paint event to update the form display? or is there another way? Chad
Show quote
Hide quote
"Chad" <C***@discussions.microsoft.com> wrote in message If you start a new project, drop a timer and a multiline textbox with news:C435731C-A837-4AD6-B359-89A54B14A6CF@microsoft.com... > Hello Everybody, > > I would like to automatically display the updated text box information on > a > form. I am using a timer to trigger the code to update the .text > information > for the text box but the text box does not automatically update the > display. > How can I call the paint event to update the form display? or is there > another way? > > Chad scrollbars on the form. This code should show the current time in that box twice per second. There should be no need to call any events or anything. Of course, we're talking VB6 here so ymmv '======== Option Explicit Private Sub Form_Load() Debug.Assert Text1.MultiLine 'stops if text1's not multiline Debug.Assert (Text1.ScrollBars Or 2 <> Text1.ScrollBars) 'need vertical Text1.Text = "" Timer1.Enabled = False Timer1.Interval = 500 Timer1.Enabled = True End Sub Private Sub Timer1_Timer() With Text1 .SelStart = Len(.Text) .SelText = Now & vbCrLf End With End Sub '======== -- Ken Halter - MS-MVP-VB - http://www.vbsight.com DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm Please keep all discussions in the groups.. "Chad" <C***@discussions.microsoft.com> wrote in message news:C435731C- A837-4AD6-B359-89A54B14A***@microsoft.com> Hello Everybody, If you aren't also running other code then the display *should* update> > I would like to automatically display the updated text box > information on a form. I am using a timer to trigger the code to > update the .text information for the text box but the text box does > not automatically update the display. How can I call the paint event > to update the form display? or is there another way? automatically but you can try to force it by using <textboxname>.Refresh and/or Me.Refresh -- Reply to the group so all can participate VB.Net: "Fool me once..." Thanks for responding,
I am running on .net, and I have a parent form with two child forms. The parent form is not really being displayed except for the menu bar. Both child forms are displayed and running different processes. The <textboxname>.Refresh is not an active option, I tried it and it does not refresh as well as me.Refresh. Is there any other way to refresh the form or textbox information? Thanks again, Chad Show quoteHide quote "Bob Butler" wrote: > "Chad" <C***@discussions.microsoft.com> wrote in message news:C435731C- > A837-4AD6-B359-89A54B14A***@microsoft.com > > Hello Everybody, > > > > I would like to automatically display the updated text box > > information on a form. I am using a timer to trigger the code to > > update the .text information for the text box but the text box does > > not automatically update the display. How can I call the paint event > > to update the form display? or is there another way? > > If you aren't also running other code then the display *should* update > automatically but you can try to force it by using <textboxname>.Refresh > and/or Me.Refresh > > -- > Reply to the group so all can participate > VB.Net: "Fool me once..." > > "Chad" <C***@discussions.microsoft.com> wrote in message news:3C1EDB2A- 45CA-4FD1-9CA8-D5E0362B0***@microsoft.com Show quoteHide quote > Thanks for responding, > I am running on .net, -- <response type="generic" language="VB.Net"> This newsgroup is for users of Visual Basic version 6.0 and earlier and not the misleadingly named VB.Net or VB 200x. Solutions, and often even the questions, for one platform will be meaningless in the other. When VB.Net was released Microsoft created new newsgroups devoted to the new platform so that neither group of developers need wade through the clutter of unrelated topics. Look for newsgroups with the words "dotnet" or "vsnet" in their name. For the msnews.microsoft.com news server try these: microsoft.public.dotnet.general microsoft.public.dotnet.languages.vb </response> Thanks Bob for the assistance...
Chad Show quoteHide quote "Bob Butler" wrote: > "Chad" <C***@discussions.microsoft.com> wrote in message news:3C1EDB2A- > 45CA-4FD1-9CA8-D5E0362B0***@microsoft.com > > Thanks for responding, > > I am running on .net, > > > -- > <response type="generic" language="VB.Net"> > This newsgroup is for users of Visual Basic version 6.0 > and earlier and not the misleadingly named VB.Net > or VB 200x. Solutions, and often even the questions, > for one platform will be meaningless in the other. > When VB.Net was released Microsoft created new newsgroups > devoted to the new platform so that neither group of > developers need wade through the clutter of unrelated > topics. Look for newsgroups with the words "dotnet" or > "vsnet" in their name. For the msnews.microsoft.com news > server try these: > > microsoft.public.dotnet.general > microsoft.public.dotnet.languages.vb > > </response> > > > |
|||||||||||||||||||||||