Opening Random Forms?
Apr 10, 2012on visual basic how can you open random forms? (im doing a quiz with questions on separate forms and would like to open random forms to show the random questions)
View 24 Replieson visual basic how can you open random forms? (im doing a quiz with questions on separate forms and would like to open random forms to show the random questions)
View 24 RepliesI got a question can I make a dll for opening forms?
View 3 RepliesI'm new to non internet programing. But I got to start somewhere. So i'll try and make this simple I have a MDI parent form with a tab control section. From a link in the toolbar i would like to open a diffrent form in my tab section. This is what I figured out so far if its even close.
[Code]...
Firstly though, I'll have to mention that I'm a relative newcomer to vb.net and don't really know that much about advanced functions.I have my main form which dynamically generates 15 buttons.
Each of these buttons will need to open another form, depending on which form has been assigned to that button in a config file (the config file isn't yet done, as I want to get it working simply by hardcoding the name of the forms for the time being)
The way I have it in my head is that I would assign the form name that needs to be open to the name of the button, if that makes sense....However, I have absolutely no clue how to do it, I've tried a couple of things but to no avail.
Here's my code, and I have no problem changing any part of it if it will help things along, this is just the only way I know how to create dynamic buttons.[CODE...]
I am attempting to find a way to get an existing form to close and re-open (with the controls re-set). If I use a method like
[Code]...
Is there any switch that will allow you to open an application over all the other currently open applications? My problem is getting Explorer to open over all the other currently open applications. Right now, it only opens in the background......
View 5 RepliesI want to open a VB.net form using a ThreadPool with a maximum of 10 threads. I need to do this because, the form should open based on a live event and i need atmost 10 forms on the desktop at a time. If i open the form on every live event without using a ThreadPool, the desktop will be floaded with many forms. I am using QueueUserWorkItem method of threadpool to queue a method which opens the form. In this queued method, there is form1.show() statement called. But after displaying the form, this method finishes execution and again we have 10 threads available in the system. I somehow want to either keep this method running so that 1 thread is occupied or i want to keep the thread alive till the form1 is closed by the user. I want the 11th form to appear on the desktop, only when any of the existing forms out of the 10 (already on desktop) is closed.
View 2 RepliesI have a group of buttons all with different labels. I want to have each of these specific buttons open up the same form, but my problem is when I write the code of form1.show it pops open twenty or so different windows. How to I make one button open just one window?
View 15 RepliesOver the past months I have been working on small windows forms applications and learning vb as i go along. The aim was to pull these altogether into one big application.
I am now at the stage of pulling these together I have created a new project (called MainMenu) and designed all the buttons and interface. I have added my other projects (SISApp, CURApp) to this project. File > Add > Existing Project. I can see these projects in the solution explorer.
Now my problem. How can show Form2 in the SISApp project when I click ButtonX in the MainMenu project.
I dont just want to show Form2, i want all the functionality and the database connection in form2 to also work etc.
I might be going about this the wrong way, but I'm trying to create a form that will include a single button, for instance "Enter". When "Enter" is clicked, I want the form to then display the contents of form 2, which might include more buttons and/or a textbox, etc. I want to do all this without ever opening or closing a form.
View 3 RepliesIn a MDI application, for opening a form in the MDI, I am using the following code
Private Sub RoleToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RoleToolStripMenuItem.Click
Dim lobj_ChildForm As frmRole
'Check if form is already open
lobj_ChildForm = Nothing
[code]....
As you can see, I need loopong through all the open child forms.
I have a form which gets populated by 15 buttons dynamically at runtime (these need to be dynamic as there will be a user config file at some point)What I need these buttons to do is to open a specific form when clicked. Which form that opens will be dealt with in the config file.
Public Class frm_MainScreen
Private Sub frm_MainScreen_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim count As Integer
Dim ImageDir As String
[code].....
I have a button on my form. When I click it, I want a form to be opened exactly on the location where the button is.
View 1 RepliesI am writing a Class Library for a GIS Windows application. The class has a form that I open when I load the dll command in the application. After the form opens the form moves to the back of the GIS Windows application, and I want it to be in front of the GIS Windows application all the time. How can I do this?
View 1 RepliesI am making a webbrowser,how to prevent my browser from opening new IE windows. Because what happens is, there are some links that will open new windows and therefore IE comes in place because it is set as default windows browser which I really don't want because my browser looks really bad if it opens links in another webbrowser.I want it to be just a basic browser, it has only one window, and it should navigate within that window. This is because the browser is integrated in a bigger application only for some website applications that are related to this main application.I am using VB.net 2008 Express Edition?
View 9 Repliesi have my web browser made by visual basic have some futeurs like history , bookmarks , downloader, HTML Editor, Source, etc i make my it my default web browser but when i open .html or .htm files how can i make it navigate to the HTML File (and please without using open folder browser) i wanna make it like mozilla or internet explorer navigate to the site i have saved befor or make it
View 1 RepliesI'm just having a small problem with tabpages. I have a program that have multiple forms (on startup they are all created and hidden, except for the one being viewed by the user). When the user open one particular form, I has a tab control with two pages. I also have a toolbar. when the user click a menu option, I call a method that assigns all my controls to a variable (to be used in an insert statement later).
Here's an example of that Sub:
Public Sub SetValues()
'page 1
DateCreated = Date.Now
DateEdited = Date.Now
DateCompleted = Me.DateTimePicker2.Text
[Code] .....
The problem is, the controls on the second page cant be "seen" (this is confirmed by placing a msgbox in the above sub, which comes up blank) until the user open the second tab, at least just once. Then its ok. I know I can just run a small method to quickly open all tabs, but is there a reason this is happening, and a better way to do this?
I've just finished creating a basic login system which enables you to create an account and select either a "Student" or "Teacher" account.
Once the account is created it's stored in an Access 2007 database. The field the account type gets stored in is called AccountType. When users log in with their unique username and password I want the program to take them to a different form depending on whether they have a student or teacher account.
I have a program that will let you open a certain table in the database and query it on a child form in a MDI parent form. Of course the child form is a new instance of an existing form.The thing I want to do is that the opened table in the child form cannot be reopened again in the other child form. So I did was to create a childform name on every new instance of a childform depending what is the name of the table.
The first thing I did to do this restriction is to put the names of the opened table to an public array and when the user tried to reopen the table, the program will check if the childform name is already existing... and if it exist it will not let the user to open the table in new childform.When the childform is close it will erase it's name to the public array. And it can be open again.If you don't understand what I want to do this is the situation for example in a microsoft office when a word document file was open it will be put in a childform, and when the user tried to open the word file again and still the word file is open in the microsoft word the application will tell it's user that the word document file is still open.
not quite sure why this is happening but I am just debugging right now and the buttons I am using are opening the wrong forms, I have made sure of the form names, button names etc and it looks all good but specifically the btnPrintReport is opening up the form enterAuditForm while btnProcessAudit is opening printAuditForm instead of their correct ones.
Here's my code, it is rather simple. The reason why I am using a separate sub as my btnPrintReport is because I am using that also on the baseForm's OnLoad Event, which again is also opening the wrong form.
[Code]...
i have a query of opening a new Application(eg. UgNx,Ansys)file with in a Panel (Which is already dropped on a Window Form).
For Example :-There in one Window Form and i have fixed a Panel there now with in the panel i want to open a new Application like other softwares UG NX or Ansys.
I am in the process of upgrading a VB6 Project to Vb.net. My problem is that when I open a child form in my project from within the Parent form a new instance of the Parent form is created. The code is fairly simple:
frmnewContract.MdiParent = Me
frmnewContract.Show()
I am running Microsoft Visual Basic 2010 Express. I created a simple program that is nothing more than dozens of Windows Forms that are linked together by the various clickable buttons I put on each form. The program is like a "book" with several pages, and you jump to a specific page by clicking on specific buttons on the current page ("Windows Form").
My question is, how do I change my program so that when it is launched, instead of just 1 Windows Form opening, the program opens up several Windows Forms (of my choosing) automatically? In other words, instead of my "book" (VB program) opening "page 1," when I run it, I want it so that pages 4, 7, 8, 10, and 15, are "opened" whenever I run my "book."
Is there some code I need to insert into each Windows Form I wanted opened automatically when the program is loaded? Or is this a MS VB 2010 Express environment option I need to set?
I am trying to create a simple game for children for my final year project, I have a number of form that will display a different type of question for each form. I am aware of the form1.Show() and form1.Hide(), is there anyway that I can load a form on random. for e.g, lets say I have form1, form2, form3, form4.I want the order of the forms to be shown in random order.
View 4 RepliesI have created a main form.. added 7 forms to the porject.. I want to select the forms at random plus count the forms as they are slected and when the count = 7.. a messgabebox should be displayed.. the forms seem to be selected at random each time i click the next buttoon as i have called the frmmain.random() method from the main form for each click butotn on each form.. but the count doesnt work and all 7 forms dont open.. sometimes 1 form opens then goes back to main screen or it goes past 7. but never shows the message. not sure how to go about it. Also im coding in VB using visual studio 08.
View 1 RepliesIt is my goal to write a program to run a retail store. I am an intermediate Access developer, so I have a good grasp of the basics.However, I find that developing in VB 2010 is quite different.I will have forms for:
Company Information
Employee Information
Supplier Information
Customer Information
Invoices & Purchase Orders
All I really need to know at this point is the code to open and close each form.
I need to generate two different random numbers but this:
Dim r1 As New RandomDim
r2 As New Random
l1 = r1.next (0,1000)
l2 = r2.next (0,1000)
give me random numbers, but they are same any suggestions?
Random Numbers for Bingo Card?
View 7 Repliesim working on a little project and i need my form1 to basically spam itself in random locations...
View 5 RepliesI have an MDI parent screen that loads on startup and a lot of child forms that load when opening. So as the child forms load there's a lot of flashing and it looks really ugly. Once they're loaded all I have to do is use a bring to front, maximized command and it works smoother than closing a form and opening a new one every time a different form is selected. I've tried creating a splash screen, minimizing the forms on load, etc and everything still works in order so first the splash screen then the forms load.
How would you set it up so a splash screen stays on top of all other forms for like 5 seconds while the forms load in the background without seeing them load? Right now the screen shows then when it's done it moves on to step 2 which is loading the child forms. If no splash screen, how do I make it load so you don't see all the child forms opening at once?