Show form without losing focus [duplicate] - vb.net

This question already has answers here:
Show a Form without stealing focus?
(19 answers)
Closed 6 years ago.
I've created a small form that acts like the office notifications (fades in\out above the notification icon tray)
I'm having problems showing this form, I want to display it without the focus being taken from my main application (or any other form), I've managed to get the attached code doing roughly this, (using Me.Activate to take back focus) But this isn't great - focus switches for an instant plus I want to show the form from various areas in my application...
Dim frm2 As New frmNotification()
frm2.TopMost = True
frm2.Show()
Me.Activate()
Any Ideas?

A similar question has been answered here.
Show a Form without stealing focus?
The code is in c#, let me know if you need help in converting it to vb.net. Sorry for the delay.

Related

can't get vba to show code for all buttons [duplicate]

This question already has an answer here:
How to view code for all subs in a module at the same time
(1 answer)
Closed 6 months ago.
Working in VBA in Access
In one of my databases "General" in the drop down shows the code for all buttons.
For some reason this database does not, and I have to manually select each button... ie RunFDE, RunQP1
Not sure how to fix it.
Want to see code for all buttons at the same time.
Figured it out.
Bottom left has Procedure View and Full Module View.
Full Module View is what I want.

Allow developer to drag controls onto user control with panel [duplicate]

This question already has an answer here:
UserControl with header and content - Allow dropping controls in content panel and Prevent dropping controls in header at design time
(1 answer)
Closed 3 years ago.
I have a vb winforms user control which has on it a panel (docked-full). I want a coder who drops my user control onto a form to then be able to drag other control onto the panel of that user control. I've seen several custom designer examples, but none seem to work for me.
Image shows user control and concept
You just need to make the modifiers property of Panel in your UserControl set public

Convert VB.NET MDI Application to Non-MDI? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have inherited a VB.NET project from a departed coworker. I have zero experience with VB, .NET, or VB.NET, I am a JS developer so this is all Greek to me.
My supervisor would like me to remove the "MDI-ness" of the application. I.e. we are looking at MDImain.vb and in the previous application (pre-conversion) there is no MDImain. This project was converted from VB6 to VB.NET and we are struggling to get things working again; the supe's opinion is that eliminating the MDI-ness of the application will help straighten it out. So the question is: is there a straightforward way of making an MDI VB.NET application into a non-MDI one?
Note: I have seen other similar threads with people recommending that the application simply be rewritten from scratch. I wholeheartedly agree, and would like to do that, but our manager refuses this option as it he believes it will take too long.
Note from comments: the original application was not MDI, this can be confirmed, for example, by running the existing executable and seeing that it is not an MDI application. The VB6-to-VB.NET conversion in VS 2008 somehow made the old VB6 application into an MDI application without asking. (I have shadowed a more recent conversion attempt and seen that adding MDI functionality is not part of the process as we encountered it.) We are trying to figure out how to either prevent this MDI addition in another conversion attempt, or to undo it in the result, since we did not want it.
Your Main Mdi Form has a property called IsMdiContainer That is why it is MDI to the operating system. Change that. That form should be like this Search for MyApplication OnCreateMainForm() that is where the app "starts" look at that form to see its IsMdiContainer property.
The other detail is that where you have code that creates and spawns new forms you will have to be aware of the 3 different form display concepts that change when going from MDI to single forms.
Public Sub CodeInForm1()
Dim frm As Form
frm = New Form2()
' Code Concepts for VB Parent Child in MDI and Non MDI scenarios
frm.MdiParent = Me ' MDI Concept
frm.Owner = Me ' No MDI but still linked
frm.Show(Me) ' Anoter way to link Forms when spawning a new one (No MDI)
frm.Show() ' No Specific Parent Assigned
End Sub
The other thing to be aware of is that the Active Menu concept changes between MDI and separate forms.
If you try these changes do them on a copy of the code.
From what you have said so far, it sounds like your VB6 application had an MDI main form (possibly named Main.frm).
This is used as a 'container' to allow the display of child forms (and also somewhere for the menu).
If you have the VB6 IDE installed (Visual Studio 6) you can confirm this.
If this is the case, removing the "MDI-ness" will change the whole concept of any converted code and create more work for you.

Vb.Net Quiz Application Multiple Views

I am developing a quiz application in VB.Net . The UI is shown below.
The questions are generated randomly from a set of 500 questions and stored into an array. The questions are also stored in an arrray.
When the user clicks next another question and set of answers loads from the array "Questions".
The user should be able to go Back and go Next , when the user goes back he/she should see the value of answer for that question
Which VB.Net Control(s) should i use for this pls . Cause i was using multiple forms initially but it became inefficient since the questions were more than 5 Qusetions
Set new text to label on button click. To keep track of previous question, store the id of it somewhere. Settings for example.

Microsoft Access - Loading Continous form as subform into Tab Page [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I would like to know how to create a subform that is a continous form. I have a Form that contains a Tab control. On one of my tab pages, I would like to host 2 continous forms(sub-forms), and toggle display of each based on records returned from the database. What I have right now is a blank page with a sub-form. I am unable to drag the continuous form control onto the sub-form and I am unable to drag it, it seems to the tab page either.
How can I add a continuous form to a Tab Page?
The general idea is that you simply create the continues form, you then save it. Now just open up your form with the tab control on it. Say a form that looks like this:
In above, I selected the second tab called pricing. And you can see I have placed a number of controls on this tab, but I am also about ready and am going to drag + drop in that continues form from the left side called tblBookOptions1.
When you drag, make sure you see the whole tab go "black", else this means you not dragging the form on to the tab control, but are likely "missing" it when you drop the form in. So the highlight has to go black, else you mssing the tab control.
You see this:
After you "drop" and let go of mouse, then resulting form in design mode this looks like this:
Of course the most fantastic feature of Access is those sub forms, and in fact I then can take the above whole complex form and drop it into another form using the same drag + drop.
The result is incredible relational data modeling of child tables, and it all works without having to write one line of code to maintain such related structures.
The resulting form can thus have several continues forms. In this following example have a continues form at the top part (not behind a tab). You can also see the resulting continues form that displays as a grid in the bottom half – and note how it is displaying based on the tab that selected in this case (pricing).