How to tell when the DevExpress FindPanel is closed? - vb.net

I am currently programming in Visual Studio 2010 within VB.NET and am using DevExpress v10.2.
I just started programming with the WinForms XtraGrid FindPanel and so far it works wonders. However I was wondering if there is any way to know when the user closes the FindPanel. Right now if gridview.OptionsFind.AllowFindPanel is True and gridview.OptionsFind.AlwaysVisible is False then the user is able to click on the x and close the FindPanel. Is there anyway to catch this closing? I don't want to stop it just do a couple of things once it is hidden or closed.
Thanks

Apparently DevExpress Gridcontrol doesn't have a separate event for whether the FindPanel is hidden or shown. Instead I used the GridView's Layout event and inside checked if the FindPanel was visible or not with: gridView.IsFindPanelVisible

Related

Display controls in Designer VB.Net 2013

I have a set of controls which are added dynamically to a panel. The number of controls depends on which tab a user selects from TabPage control, which is embedded in a form.
At the moment, the controls don't appear in Designer, but appear during execution.
I managed to display controls for other forms which are not dynamic by moving the non-design code to the vb file, but how can I display the other ones?
The only answer that I know of is to add your code in the .Designer.vb file of the Form.
BUT! I strongly advise you to avoid that if you are not sure how it works! Custom code in the .Designer. files can break your form design and project with possible random crashes.
Also, your code can be changed and removed by the Visual Studio designer:
Custom code in designer.vb file goes away when making edits in design mode
Instead, you can make the panels into custom user controls and add those to the tabs.

WinForms ShowInTaskbar=False vs Tabbing between applications

I have a WinForms application (VB.Net), where I have set ShowInTaskbar=False for all forms except the main form. This is because all other forms are dialog windows of some sort, and I did not want them to show up separately in the task bar.
What I see now is that when no dialog is open in my application and I use Alt+Tab keys to tab between currently open applications, I don't see a tile for my application. I do see a tile when there is a dialog open. This is very counter-intuitive to me.
As I said earlier, ShowInTaskbar property is true for my main form. What else is required? Thanks for your help!
After further research, I found that my problem was being caused due to having the form border as FixedToolWindow and ShowInTaskbar=False on the dialog windows. I changed the form border to FixedDialog, and set MaximizeButton=False, MinimizeButton=False. That fixed the issue.

Visual Basic : How to Block all message boxes, popups and alert dialog

I am making a webbrowser using VB 2010, and I often see popups regarding script errors or advertisement when browsing. I want to disable all message boxes and script error boxes too. I do not want to stop or block scripts from running, I want browser to continue running them but not to show the popup alerts.
WebBrowser1.silent = True isn't working
Thanks in advance
You have tagged this as VB.NET, which I believe is incorrect. In .NET you would use webBrowser.ScriptErrorsSuppressed = true as shown here: Disable JavaScript error in WebBrowser control
The Silent property is available on the ActiveX web browser control in VB6 and probably VBA (?). I believe there is a problem with setting Silent to true there, because it gets set back to false at run time whenever the control is loaded. There is an example on how to work around that by using a timer control, which is available here: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=43907&lngWId=1

How do you make the open form the only one that is selectable?

How do I make it so that a VB.net form that is opened from another form (say a settings form) is the only one that can be selected?
I'm using Visual Studio 2012, and I can't see any obvious tools for this, but I'm not sure what I'm looking for. I have tried various possibilities like TopMost = True, but that is not quite it. Thanks.
Just use ShowDialog instead of Show to open the new form.
This will open the form as a modal dialog, and while it is open, no other form can be selected by the user.

Tabcontrol in VB.NET

Using VB.NET in Visual Studio 2005, how do you disable or make read only a particular tabpage?
The only way I can see, for now, is using the TabControl.Selecting control event and manage everything by code.
Just turn e.Cancel to true to block access to a specific tabpage.