Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Stop Listview Flickering?


Hi folks,

I am having trouble in preventing flickering while adding items to a listview.

Please help!




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Stop The Flickering...
Greetings every1,
consider this code,,

Private Sub Timer1_Timer()
Label1.ForeColor=RGB(Rnd*256, Rnd*256, Rnd*256)
End Sub
Timer1.Interval is set to 1.
Now, the label as u can see flickers a lot and sucks. Anyway to improve this stuff.

How To Stop The Flickering.
Greetings every1,
consider this code,,

Private Sub Timer1_Timer()
Label1.ForeColor=RGB(Rnd*256, Rnd*256, Rnd*256)
End Sub
Timer1.Interval is set to 1.
Now, the label as u can see flickers a lot and sucks. Anyway to improve this stuff.

Please Help Me Stop Flickering!
Hi,

I have four imageboxes which update every second. The only problem is, after about three or four updates, the images flicker. Then it will be okay for three or four more, then it will flicker again..

This becomes rather annoying after a prolonged period of time.

Please help!

TIA!

Stop Flickering
I am doing a real basic Screen Saver using a label to display system time. The label of course, bounces all over the screen. The problem is that is flickers so bad. There has to be a way to stop it from flickering? I'm just using a constant while loop, and incrementing the top and left properties of the label by one each iteration.

Thanks,
Shane

How Do I Stop The Flickering
hey ppl,

i have a problem with the text flickering when i run the mouse over the form.. any ideas?



Edited by - Ahmz_055 on 12/6/2004 3:57:08 PM

Flickering - Anyway To Stop It ?
Hi,

I'm using the forms circle method to make a ball bounce around on my form. This effect is simple enough and easy to code, but to make it one circle instead of many circles I need to use .cls

The Code:

Code:If C = 5 then Form1.Cls: C = 0

Form1.Circle (A,B),Radius
C = C + 1


The timer interval is 10, I realised at that speed there is going to be some major flickering (thus adding in the If function above to soften the effects). However, flickering is still a major problem. Is there any way to stop the form from redrawing anything but my circle? Or can anyone suggest any other way to have a circle bouncing around (preferably without having to use a picturebox or another control)?

How Do I Stop Flickering Graphics?
I've got two Image Boxes on top of each other. One is a person, the other is the person's clothing. I have the person blink, his facial expressions change, etc, but whenever it does it makes the image flicker as it changes it. I wanted to do the images like this because that way the person can wear all sorts of different clothes without me having to remake every facial expression and body movement for each different clothing. But the flickering is bad and I don't know how to get rid of it.

Any suggestions? If there's a better way to do this too, please tell me. Thanks ahead of time.

Oh, quick note, the top image box, where the clothing image goes, has a transparent background so it doesn't block all the image beneath it.

API To Stop Control Flickering?
I know there is one avaible to do this... but I need to apply it to a listview...

my listview has some icons that update every 50 miliseconds... this causes flickering...

I just need the api and how to apply it to my listview

How Can You Stop Form Flickering?
im using a manifest file to have a xp style for my app, but it keeps flickering whenever i move over a control that has been "styled"

how can i stop this?

Picture Flickering Must Stop!!!
I plan to have a picture box move up and down creating a fading up and down color effect. I need to get the picture box the stop flickering but yet still have a timer move the picture box.

How can i get the flickering to stop...?

QB Flickering, Impossible 2 Stop
How do I stop flickering when moving objects in QB in screen 13???

Help! Stop Flickering Images
I have an image control that contains an .ICO in the corner of a picture box, but when the picturebox refreshes (which is every few seconds) it makes the image in the image control flicker - Anyway to stop this??

The image control contains an icon with the letters "X Y" in it. It is to help visually ID the XY grid drawn with the LINE command.

If you know how to stop the flicker or have a better way to do this PLEASE LET ME KNOW!! All suggestions (good or bad) accepted. I am at the far end of frustration now!

Thanks for 'da help!

How To Stop Label Controls From Flickering?
I'm working on a little app that involves a loop statement that updates a label control very frequently (around 3000 times). Everything works, except for the fact that it flickers. I was wondering if there was any way to stop it.


EXAMPLE:


Code:
For X = 1 to 3000
lblLabel.caption = X & "files found"
Next X

Stop Flickering On Form Load
I have a listview on one form, and when the user clicks on one of the listitems, it loads that persons details into a second form, which has a listbox and approx 20 textboxes on it.

I have tried hiding the second form until it's loaded and I have tried using the LockWindowUpdate on both forms, but I still get a terrible flicker of the second forms textboxes etc.

Any comments will be most welcome.

Here is my code. Please bear with me as it may be a bit rough

This is the code for the listview click event.
Below is the sub for loading the second form (LoadDetails)

Code:
Private Sub lvwIns_Click()
On Error GoTo ErrTrap

'stop error if no records to show
If blnRecords = False Then Exit Sub

'stop if user not clicked on any item - empty white space
If TypeName(lvwIns.HitTest(sglX, sglY)) = "Nothing" Then
lvwIns.SelectedItem = Nothing
Exit Sub
End If

Dim lvwItem As ListItem
Dim RecNum As Long

'get the memb_ID number from the listview
RecNum = lvwIns.SelectedItem.SubItems(4)
'set boolean to stop error re-loading the form
FromLoadDetails = True

frmMembershipDetails.Visible = False
LockWindowUpdate frmInsuranceRenewals.hWnd

LoadDetails RecNum

'add the name of the selected members name to the text box (txtSearch)
Set rs = New ADODB.Recordset
Set cn = New ADODB.Connection
cn.ConnectionString = strConnection & App.Path & "Membership.mdb"
cn.Open

strSQL = "SELECT Memb_ID, First_Name, Middle_Name, Surname FROM tbl_Membership"
strSQL = strSQL & " WHERE Memb_ID = " & RecNum
rs.Open strSQL, cn, adOpenForwardOnly, adLockReadOnly, adCmdText

Dim strTemp As String
If rs!Middle_Name.Value = "" Or IsNull(rs!Middle_Name.Value) Then
strTemp = rs!First_Name.Value & " " & rs!Surname.Value
Else
strTemp = rs!First_Name.Value & " " & rs!Middle_Name.Value & " " & rs!Surname.Value
End If

rs.Close
cn.Close
Set cn = Nothing
Set rs = Nothing

FromLoadDetails = False

'add name and highlight
If lngSearch = 1 Then
frmMembershipDetails.txtSearch.Text = strTemp
frmMembershipDetails.txtSearch.SelStart = 1
frmMembershipDetails.txtSearch.SelLength = Len(frmMembershipDetails.txtSearch.Text) - 1
End If

'open new form
frmMembershipDetails.Visible = True
LockWindowUpdate 0&

Exit Sub


LoadDetails sub:

Code:
Public Sub LoadDetails(MembersID As Long)
On Error GoTo ErrTrap

LockWindowUpdate frmMembershipDetails.hWnd

'load form to stop rs, cn error of being closed
frmMembershipDetails.Visible = False

Set rs = New ADODB.Recordset
Set cn = New ADODB.Connection
cn.ConnectionString = strConnection & App.Path & "Membership.mdb"
cn.Open

strSQL = "SELECT * FROM tbl_Membership"
strSQL = strSQL & " WHERE Memb_ID = " & MembersID
rs.Open strSQL, cn, adOpenForwardOnly, adLockPessimistic, adCmdText

frmMembershipDetails.txtMembership(0).Text = rs!First_Name & ""
frmMembershipDetails.txtMembership(1).Text = rs!Middle_Name & ""
frmMembershipDetails.txtMembership(2).Text = rs!Surname & ""
frmMembershipDetails.txtMembership(3).Text = rs!Street & ""
frmMembershipDetails.txtMembership(4).Text = rs!Town & ""
frmMembershipDetails.txtMembership(5).Text = rs!City & ""
frmMembershipDetails.txtMembership(6).Text = rs!County & ""
frmMembershipDetails.txtMembership(7).Text = rs!Post_Code & ""
frmMembershipDetails.txtMembership(8).Text = rs!Home_Tel & ""
frmMembershipDetails.txtMembership(9).Text = rs!Mobile_Tel & ""
frmMembershipDetails.txtMembership(10).Text = rs!Email & ""
frmMembershipDetails.txtMembership(11).Text = rs!DOB & ""
frmMembershipDetails.txtMembership(12).Text = rs!Date_Joined & ""
frmMembershipDetails.txtMembership(13).Text = rs!Insurance_Due & ""
frmMembershipDetails.txtMembership(14).Text = rs!Grade & ""
frmMembershipDetails.txtMembership(15).Text = rs!Last_Graded & ""
frmMembershipDetails.txtMembership(16).Text = rs!Membership_Number & ""
frmMembershipDetails.txtMembership(17).Text = rs!Occupation & ""
frmMembershipDetails.txtMembership(18).Text = rs!Notes & ""

'reset boolean for txt changed
blnUpdate = False

rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing

frmMembershipDetails.cmdClear.Enabled = True
frmMembershipDetails.cmdPrint.Enabled = True
frmMembershipDetails.cmdUpdate.Enabled = True
'frmMembershipDetails.Visible = True

LockWindowUpdate 0&

Exit Sub

How To Stop Flickering When I've Change Picture?
It's frinkering.
When I try to swap image or picture for make an amimation.

Thank you.

How Do I Stop Flickering In Moving Graphics?
I haven't dealt with graphics in vb before, but I know of a common graphics method to reduce/eliminate flicker in animations called double-buffering.

The flicker is caused from clearing the old frame before drawing the new one. To counter this problem you actually would have 2 picture boxes (or whatever you're using) the first one is the visible one that will display the animation. On the second buffer, you do the calculations for the next frame and place all the objects there, then once the frame is ready for display you change the image on the visible buffer to that of the second buffer.

Since I haven't done this in vb before I'm not to helpful in the code department, but hopefully you'll find this method usefull.

Stop TextBox Flickering Form Resize
Hi
can anyone suguest any idea or may have some example code on how I can stop Flickering of a textbox when resizeing a form.

Any help whould be greatfull.

ListView Flickering
a little silly question



i have a form with a listview control that is Upgraded(A new item added) every half second, The listview control flickers (flashes) every time it is upgraded, how can i stop this flickering and make the listview control updates SMOOTHLY



Thanx

Flickering ListView!
A WebBrowser project uses a ListView which lists all the URLs which a user has visited. This ListView gets loaded when a CommandButton is clicked. When any of the URLs is clicked in the ListView, the user is taken to that URL.

Assume that the ListView is visible. A user clicks a URL & he is taken to that URL. Now keeping the ListView open, if the user clicks another URL, that URL gets added to the ListView at the very end & the user is directed to that URL. The problem is until this second URL has downloaded completely, the ListView goes on flickering & flickering & flickering but I don't want this flickering.

Any idea how do I stop the ListView from flickering when a URL is getting downloaded?

Listview Flickering
When listview control is updated frequently and randomly it flickers too much.


Since only one row is updated, WM_SETREDRAW message makes no difference as after updating one row the display is enabled.


I did use listview messages like LVM_SETTEXT etc. to change the listitem and subitem values. But, listitems collection does not get updated by that method.


Has anybody got a solution to this problem ?


Thanks very mcuh


Giri

I Need To STOP Image FLICKERING! The Regular Image Control Flickers
So heres the problem....

I'm working on a skinning module for my software and i have menu pages,, on each page i move image controls around so that I can have multiple pages of buttons....

When I click the different menu buttons the images flicker, its not so bad on a fast computer, but on slower computers it really shows.

Does anyone have ANY idea of how to stop this flickering? Ive tried putting the controls on a picturebox / frame, and making the frame invisible/moving it off the screen, but that doesnt work... no matter what I do the images always flicker.

I would use the picturebox because that doesnt flicker,, but it doesnt support transparencies and theres always a box around the image.


Any ideas would be greatly appreciated.

Thanks!

Flickering Listview By Data Updates
Hi,

I do use a listview (report-view) for displaying download informations.
The last item in the lvw is frequently updated with the current download progress (5%, 6%, 10%, etc.).
While updating the listitem the whole listview with all lines are flickering.
I have no idea how to prevent this
I already added a 'DoEvents' but without success.


Code:
Private Sub Inet2_StateChanged(ByVal State As Integer)
....
li = lvwDownloadStatus.ListItems.Count
lvwDownloadStatus.ListItems(li).SmallIcon = "DownloadProgress"
lvwDownloadStatus.ListItems(li).ForeColor = vbBlack
lvwDownloadStatus.ListItems(li).SubItems(3) = lProcStatus & " %"
DoEvents
...
end sub
Any idea how to prevent this?

Thanks
Stefan

ListView Control Never Stops Flickering!
I'm making an app that updates a ListView control in Report View about once per second, with info about downloads/proggress/etc.

My problem is, the control wont stop flickering Whatever I do it seems to have the need for flicker. I've tried using LockWindowsUpdate() and "'SendMessage IPList.hWnd, WM_SETREDRAW, False, 0&" but this just makes it worse as this FORCES a control.refresh after each Update, whereas my code only updates fields/subitems which have changed.

Does anyone recon this sympton and knowshow to deal with it?

How To Stop The Shape From Flickering(A Shape Control Is Used)
Hello Every1,
I have a peuliar problem for u guys. Follow closely the code given below......

Dim x1 As Single, y1 As Single
Dim draw As Boolean
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
x1 = X
y1 = Y
draw = True
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If draw = True Then
Shape1.Left = x1
Shape1.Top = y1
Shape1.Width = X - x1
Shape1.Height = Y - y1
End If
End Sub

Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
draw = False
End Sub

The shape sizes according to our mouse, the only problem is the shape flickers. Can any1 stop that flickering. I'll be really happy if any1 can do it for me. Thank u...

PS: I have tried changing the AutoRedraw & ClipControl options on & off. They dont help...

Changing Background Brings On Flickering [RESOLVED=> Bye Bye Flickering]
I've read much in this forum about flickering but as yet haven't found a solution to my specific case.
I use a image control which contains a gif image with transparent background. It stays in a fixed position on a picturebox, and in this picturebox the movement of a complicated geometric structure is simulated by repeated use of the line method inside 2 loops. Between any two consecutive static images I issue a Picturebox.Cls and this is the cause of much flicker, though the intended movement in the picturebox goes smooth like a dream.

Before I try to make my algorithm a little more clever I'd like to know if flickering can be held back by some other means.

Stop Listview Selection
I am trying to stop the first row in a listview being selected when the form is first loaded.
I have tried using the

Code:
Listview1.SelectedItem = Nothing

in the Form_Activate and this doesn't work.
There is no other control on the form to set the focus to.

Any ideas or workarounds?

Stop Drag In Listview
I found this code


Code:

' REQUIRES THE MSGHOOK.DLL LIBRARY

Const WM_NOTIFY = &H4E
Const LVN_FIRST = -100&
Const LVN_BEGINDRAG = (LVN_FIRST - 9)

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (dest As _
Any, source As Any, ByVal bytes As Long)

Private Type NMHDR
hwndFrom As Long
idFrom As Long
code As Long
End Type

Dim WithEvents FormHook As MsgHook

Private Sub Form_Load()
' start subclassing the current form
Set FormHook = New MsgHook
FormHook.StartSubclass Me

' fill the ListView1 control with data
' ... (omitted) ...
End Sub

' this event fires when the form is sent a message

Private Sub FormHook_BeforeMessage(uMsg As Long, wParam As Long, lParam As Long, _
retValue As Long, Cancel As Boolean)

' the ListView might be notifying something to its parent form
If uMsg = WM_NOTIFY Then
' copy the MNHDR structure pointed
' to by lParam to a local UDT
Dim nmh As NMHDR
CopyMemory nmh, ByVal lParam, Len(nmh)

' check whether the notification is from the ListView1 control
' and whether it's the beginning of a drag operation
If nmh.hwndFrom = ListView1.hWnd And nmh.code = LVN_BEGINDRAG Then
' yes, cancel this operation
retValue = 1
Cancel = True
End If
End If
End Sub




but I can't get it to work (I have a lisview on my form).

It craps out at:

Dim WithEvents FormHook As MsgHook

Any ideas?

Stop Listview Loading
Hi everyone!

I'm filling a listview with a lot of data. If the user gets tired, he can press a button "Cancel" which should stop the listview loading.

To do that, in the loading loop I put a flag which is continously read at every cycle, for example:

Code:
While count<MaxCount And GoOn

'fill listview
'...
count +=1
End while

' Routine for cancelling
Private sub OnBtnCancel_click (...)
    GoOn=False
end sub
 

However, while the listview is filling up, I cannot press any button because the UI is freezed. So the Cancel button is unuseful.
Usage of Listview.BeginUpdate and Listview.EndUpdate() is useless.

The only way I found to make this work is to have the listview filled by another thread... but this is of course illegal because one should have the UI thread which created the listview to handle it, and not another thread.

Does someone have an idea?

Thank you

Stop Movement Of Listview Icon
hello friends,

I add items (as Icons) and set the view to Icons. When I select and move
one of the items within the listview control, it appears to drag outside the
boundaries of the listview control and the vscroll and hscroll bars appear.
The problem is I want the items to remain aligned, not randomly spread
around. Also, this is a problem because my list view control is about 2
inches square. Can I keep the icon within the white space of the control
and can I keep everything aligned?

How To Stop The Renew Index's For Listview ?
peace be with you

i make a small project used " listview "

i add a 3 items therefore the index's will be [ 1 - 2 - 3 ]

when i remove the index "2" the index's changes like this [ 1 - 2 ]

and number [2] is the index 3 before the removed

the question is :

how to set the index's not changes ??

thanks

Stop ListView Column Header
Hi Everyone,

I am using an example from VBnet about subclassing and responding to notifications from the ListView Header.

http://vbnet.mvps.org/index.html?cod...ifications.htm

The question I am trying to figure out is this. How can I get a column header to stop resizing once it has gotten to a location to a certain location. For example, stop column 1 from resizing any smaller when pt.X = 20. I would appreciate any help.

Thanks.

Stop ListView Selection When Not Wanted
Wow... that's a tough topic. It's easier to explain than what it means in the subject.

I have a TreeView-ListView interfase. The problem I'm having is when I right-click over the ListView, e.g., show it's corresponding popupmenu, and select an option which would not open any new menu or something. E.g., change some values to variables, or change the apearance of the app. What happens is that the mouse (I don't know how to explain it) "keeps" on selection status, and would select all the items you hover the mouse over after this. Of course, this would end if you click anywhere or sth. But I want to avoid this "autoselection status". Does anybody know how to do it??

How To Stop First Colume Edit In A Listview
How do you stop first colume edit?

ListView - Stop Icons Moving
Hi,
I'm using a listview control in the Icon mode, to display a control panel for my application. The only problem is that when a user clicks an icon, when you move the mouse it moves the icon as well.

Is there any way to stop the user moving the icon?

Stop And Start A Service From A ListView
Hi

I want to be able to stop and start a service that is selected from a ListView, I've tried searching but cant find anything, does anyone have any ideas?

Thanks



LIVERPOOL FOOTBALL CLUB - 5 times Champions of Europe!! 1977, 1978, 1981, 1984, 2005

FA Cup Winners - 2006

Edited by - johneast on 3/15/2006 6:31:40 AM

Stop Item Dragging/moving In ListView
Is there any way you can stop the user from moving the item position in a listview?? I need them to stay the same as i added them first by code, with them being fixed for the user and not allowing any movement of item position!

thanks!

Stop And Start A Service Selected From A ListView
Hi

I want to be able to stop and start a service that is selected from a ListView(using XP), I've tried searching but cant find anything, does anyone have any ideas?

Thanks


ListView Control. STop From Editing Items In Listbox
how can i stop from editing items in a listview control as shown in this picture:


http://www.po2upload.com/uploads/no_change.GIF

Stop Duplicating Items From Gettign Added In A Listview
Hey guys I have a listview called report. These items get added froma list6 click event.

But is there a way to prevent duplicate items in the report listview?

Thanks!

Flickering
Im working on a teleprompter program for my video production class and ive got the text scrolling with a label. the only problem is when the label scrolls, i get that classic flickering usually associated with timers. i tried slowing down the timer, and speeding up the movement of the label, but now it just flickers a little slower, and its all choppy. is there a way to get rid of that flickering?
-thanks

End The Flickering!!!
OK so I am definatly a newbie to VB6, and here I am trying to write with it (first program in vb6 ever), and I am having some massive flickering problems . Can you recomend how I might fix that, right now my program moves the "shapes" by changing the tops and lefts of the shapes. What can I do?

Flickering...
If i were to have a timer moving some images and the interval is at 1 how can I get rid of that ugly flickering? While the images are moving across the screen they will flicker white every so often, and I was wondering if there is some way of stopping that. Thank you.

Flickering In Vb
hi just started making my first game where u can roam around and interact with the environment but there is a problem. I am using 4 timers for movement that correspond to the keys w,s,a,d but when i run it and walk around the character flickers. I was just wondering if any one knows a quick way to eliminate this undesireable effect.

Thanks

Flickering
I've searched this forum, but haven't figured out my problem.

I have image controls on my form, and when I move them, they flicker. I want no flicker.

I've read on other posts about possibly using GDI+, but I don't know what it is. Googling for it makes it seem like its a VB.net thing and not VB 6.0. Is this right? Or could GDI+ be the solution to my problem? If so, is there a link that explains to me how to use it. If I could just build a Hello World application, I can probably learn it fast enough to use.

Also, as I move the objects around on the screen, I like to give the user the option of having it trace a path where it's been. I do this with pset statements. But the problem is that the trails disappear if another form is moved over the paths. The few things I've tried, like autoredraw or using line objects also cause major flickering. Could GDI+ solve this for me too?

Thanks for your thoughts.

Flickering
i am using a loop with a wait function in it to move objects across the screen, how do i stop the flickering when doing this?

FLickering ?
Hi,

When i put label on frame, sometime label flickering even i'm not update/change anything on the label. Flicker happen Especially when i move mouse. Is that normal?

Flickering
I have a few games with bouncing labels. but the labels flicker. I don't want this so how do I prevent this?

Dam Flickering
Hi,

I have many child forms (MDI Form also) with many, many textboxes on it. When i run the save procedure, each form opens up, data is saved, then form closed, the next form is then loaded and so om.

The problem is that the rate of loading / unloading is uick and the screen flickers as a result.

I have tried to use the "hide" and "visible=False" in the code to no avail.

Is there a way to hide the program as it saves the data, then show it again when the save process has completed ????

The Flickering...
I can't beat damn flickering on my form. I'm still not 100% what is actually causing it... I think it might be the PlayNextSong Function.

Maybe I should just change the form style?

Don't steal code out of my project please.

Copyright © 2005-08 www.BigResource.com, All rights reserved