Visual Basic Background Image Flicker on PRESSING TAB - vb.net

I am making an application using VB.NET 2010 and I have set a background image which flickers every time I open any new Form or hit tab for jumping from textbox to textbox
By pressing (tab) it only flickers once but always flicker when ever I close the form and open again.
I have tried everything; background image set to, STRETCHED, CENTRE, ZOOM but still it's the same.
Only thing is when I remove my background all is well, can you help me; what could be the reason of this?
Screenshot is attached please have look

You could try setting the form's DoubleBuffered property to True. However, by looking at your screenshot, it seems like you'd be better off just using a PictureBox control to contain the image.

Related

VBA: Can't change Image Control picture after click on element

Setup
I have an Excel VBA UserForm with an Image Control element. When clicking on buttons in the form, the Image Control's Picture source is set / updated with the following code:
Set MyForm.imgControl.Picture = LoadPicture(pathToFile)
Problem
When the user clicks on the Image Control, updating its Picture source doesn't work anymore. The problem occurs, no matter when in the workflow the Image Control is clicked:
Example 1: User clicks a button to set the Picture (and pictures sets correctly). User clicks on Image Control. User clicks a different button to change the Picture -> displayed picture doesn't change.
Example 2: User clicks on Image Control right after Form load. User clicks on button to change the Picture -> displayed picture doesn't change.
If the user never clicks on the Image Control, everything works perfectly smoothly. It's worth noting that clicking on the Image Control doesn't visibly focus it.
Question
Clicking on the Image Control shouldn't make a difference in whether or not the Picture can be updated or not. How can this be done? Or, at least, does anyone know why the explained behavior is happening, or is it just a bug?
The Control does have Click / MouseDown / ... events (which are empty), but they don't take a Cancel parameter.
It does sound like a bug, as you say, but as a workaround, I'd suggest forcing a repaint after changing the picture:
Set MyForm.imgControl.Picture = LoadPicture(pathToFile)
MyForm.Repaint

Infragistics State Button Checked doesn't show borders

Here is my question. I have some state button tools in my Toolbars Manager. When I set Checked = True, I don't see that button is checked. Actually I see it, but without borders as usual. Instead of that I can see light-light blue background in my state button tool. Could you please answer why is it happen and how can I change my code to view state button checked state as usual (with borders and usual background) ?
I was able to reproduce your problem setting the BorderAlpha property to Transparent.
Resetting to Default reenables the border around the Tool.
The property is present in every Appearance settings of the button, but the one I have used is the PressedAppearance of the Tool (Large or Small depending on your customization)

Update image on button VB.net

I’m trying to make a button that displays an image, that’s easy, but the image is an editable icon so I want the image on the button to be updated every time the form is started how can this be done?
I am making the assumption that you are using WinForms and saving your editied icon to a file.
Take a look at this MSDN page on ButtonBase.Image Property.
From above link:
button1.Image = Image.FromFile("C:\Graphics\MyBitmap.bmp")
You can put this in the New Subroutine after the InitializeComponent Statement. or in your Form Load event.
Use Graphics method and also handle the Paint event of Button. You can add text and primitive drawing on Image or Button region.

VB Datagrid Disable AutoScrolling Focus on Selected column

Kinda new here but needed help and a good friend suggested this site.
My problem is I have a data grid in Visual Basic, it works fine but as the columns extend past the width of the window I needed a scroll bar. This is where the problem arose. When a column past the 4th is clicked the scrollbar will shift to give it focus. As there are check boxes here they are constantly clicked and when they are the scroll bar shifts but the button isn't checked and must be clicked again.
I was hoping there was a way to disable this Auto focus so clicking a column will not cause the scrollbar to move.
Any help would be greatly appreciated. ^__^
There is no real autoscroll in vb, one of the sub method was causing it to jump by checking another cell off the screen then defaulting back to the one shown which had the appearance of a jump.

giving effects to buttons in vb.net

Image shows the buttons on my UI in vb.net
All these buttons are having background images. Now what i want is these buttons be shown as inactive when actions corresponding to them are not available so I am making them cmd.enable = false but still on UI there is no visual effect of this disabling them on these buttons. They keep looking same as in enabled mode. So how to give effect of disabled state to these buttons.
In the same way i want effect to be visible when mouse is hovered over these buttons and buttons are clicked
They don't look like buttons at all, it looks like a row of images. Use a real Button or a ToolStrip with ToolStripButtons, set their Image property. When you set their Enabled property to false then they automatically remove all color from the image, making it look disabled.