Hello!
i have used vb.net 2005

My program have a form with a listbox, combobox, progressbar, groupbox,labels, panels,datagrid and textbox.
I want to have a background image (jpg) datagrid, panel, labels and the form background color added.
The other controls have been set to Transparent BackColor.

BackgroundImage property isn't so good solution I think.
My program flicker if I open it or if another program is over and I set focus on my program.
Both the picture and all the other controls on the form flicker.

Can someone give me a better or perfect solution what I can do?

First, set doublebuffered to true on the form.
Second, when you load things like listboxes, comboboxes, grids, you should alway wrapper the Fill command like this.

lbSomeListbox.SuspendLayout()
'populate the listbox
lbSomeListBox.ResumeLayout()

Using the suspend/resume layout improves load time since it stops the control from being redrawn as each record (item) is being added until its added them all, then on resumelayout it paints the screen. This too can minimize flicker.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.