VS 2010 - Open Multiple Forms (with IF Condition)

Aug 6, 2011

I need to open a form 6 times, I have the following

[Code]...

But when I click the button 6 times all the 6 forms open, but when I close one and click in the button to open again (since I only have 5 opened) the compiler says that I need to sure that the object isn't in use before using it again.

View 3 Replies


ADVERTISEMENT

Multiple Forms Program Needs To Open Successive Forms Somehow?

Nov 3, 2009

i was doing a fair amount of programming many years ago, like 10 it feels like, so I'm sorely not up to date on how my newly downloaded Visual Basic Express expects me to communicate with it.I am writing a program that pulls a cell from a database after the user has gone through several forms to determine which cells they want. When I write it like that, it doesn't sound very efficient, but I've designed it this way for usability.Here's where I have a problem: Should I store the path the user takes in a string, an array, what?

Here's an example:Someone wants baseball stats and trivia. They run my program, main form pops up, they select National League button, the NL Form pops up. Now the way my program is set up right now, is there are two ListBoxes on the form, one is populated, and as the user selects a Team from ListBox1, it jumps to ListBox2. Once they've selected all the teams they want info for, they click a button Next.

What I now need the program to do is show the next form "Team: name" once for each team, and insert the name of the team on the form in the appropriate label which I'll have blank. This form will also do the Listbox thing except the first listbox will populated with Topics like HR Stats, Pitching Stats, Coach History, etc.

View 1 Replies

Forms :: Multiple Forms Open And Close

Apr 16, 2009

I have two forms frmMain and frmNew, and one module modMain. In modMain I hold public variables which are needed for application. My question is how to open and close those two forms when needed? I ask this because if i set frmMain as startup form, then when closed, application will end, and one of those two forms will always be displayed. Also if I set frmNew as startup form, then when I close this form, application will also end. Is there a way to do this from module or something so my application won't end after closing and opening any of those two forms?

View 2 Replies

Open And Close Multiple Forms?

Apr 24, 2009

I have an application that has multiple forms. The "main" form within this application can be accessed from other forms. However, each time this "main" form is accessed throughout the application, a "new" instance is created, resulting in multiple instances of this form being open.

I would like to have "only" one instance of this form open at one time. If it is currently opened, I would like it to be brought to the forefront, instead of opening a new instance.

View 2 Replies

Key Down Event Doesn't Work If There Is Multiple Forms Open

Apr 3, 2012

I am currently making a game with multiple levels when you complete one level the form hides and shows the form for the next level. But the keydown event doesnt work on the second level. How can I make it work?

View 1 Replies

Sum With Multiple Condition?

May 14, 2010

I am developing an application to my official use. In which I have one combo box for selecting the customerName.When I select the custName from the combobox I want to retrieve data from a particular field of a table and sum it within a selected date value. i.e: When the user selects a custName from the combobox the field within the date value should be summed up and grouped by custName. I think it is possible but I dont know how it is to be done.

View 10 Replies

VS 2010 Don't Allow Program Open Multiple Windows

Apr 1, 2012

i am making mp3 player. i didn't wanted to use open buttons so i've associated my app with .mp3 filetype (with If (My.Application.CommandLineArgs.Count > 0) Then...)

The problem is when i want to play next song while the first one is playing it opens my program again so it plays 2 songs at the same time.

I want to do is when im opening new mp3 make it shut down the old one

I guess there is more methods that open in same app but just change the url.

View 7 Replies

Compare Multiple Variables In OR Condition?

May 4, 2011

I have 12 Varibales in VB.Net.

If a = 1 _ Or b = 2 _ Or c = 3 _ Or d = 4 _ Or e = 5 _ Or f = 6 _ Or...... Then
Like That....

For that my string will be so long for 12 varibles...

SO is there is any other way to compare 12 variables

View 2 Replies

VS 2010 Can't Open Forms On Another Computer?

Mar 19, 2012

I've copied a project from one computer to another and while I can open the project and its one module, when I try to open any of the forms, I get this error:

Quote: There is no editor available for 'C:UsersDaBoyesDesktopWattsDBForm6.vb'.

Make sure the application for the file type (.vb) is installed. I can open the forms just fine on their own--I just can't open them from within the project.

View 5 Replies

VS 2010 Open Multiple Files From A Checkedlistbox With The Default Program?

Mar 24, 2011

I have a CheckedListBox. In the box are files from a directory. All *.jpg files.

Now I want to open the checked files with the default program.

View 3 Replies

VS 2010 Open Multiple MP3 Files In Windows Media Player?

Jul 18, 2010

I'm creating a kind of 'playlist manager' application where the user can create his own music playlist and then play it from my application. However, I don't want to give my application any playback features itself, as there are already so many media players around. Instead, I just want to open the files in the current playlist in the media player of the user's choice.

I have a list of MP3 files (their filenames), how do I now open these files simultaneously in, for example, Windows Media Player? I can get it to play one song, using this command (and Process.Start)

[Code]...

Surely this must be possible? You can open multiple files in windows itself simply by selecting them and opening them at the same time. I'm pretty sure the filenames of the selected files will then be in the arguments of wmplayer so that it can open them, but I just don't know in what format.

View 20 Replies

VS 2010 Using A Number In Multiple Forms?

Dec 1, 2011

I made a calculation in one form using 3 textboxes. (I entered one number and multiplied it by another and got the answer in the third textbox.)

I need to bring my answer I got in textbox 3 into another different form later in the project.

how to do this? Something to do with a Module ?

View 5 Replies

.net - Parent/Child Relationships Failing When Getting Data From Parent Class With Multiple Forms Open?

Jun 24, 2009

I have a main form, and some sub forms, and each sub form can have some sub forms. When I have multiple sub forms open, and I try to get data from the parent form, it returns the data from the wrong parent form.For example I have two instances of Mainform.subform running. If I do something like this in a child form of one instance of the subform. It returns data from the other subform.

dim l = Mainform.subform.listofdata

Edit:I am using visual Studio 2008. Winforms, form designed using designer. In my mainform I am doing this

Protected Friend frmMain as Mainform
frmmain = new mainform

In frmMain I am doing this

Protected Friend frmsub as new Subform'
frmsub = new subform

[code]....

View 1 Replies

VS 2010 Multiple Forms In Tab Control And Just Shown

Mar 2, 2012

I have been going a couple of directions as I learn and try to figure out more. Basically, I have a form that has a tab control that contains 6 tabs and tons of controls on each tab. They are like Orders, Invoice, Customer Info, Quotes... What I would ultimately like to do is have individual forms that fit into the tab with a parent/child relationship as well as be able to not use them in a parent/child type of relationship so that they can be used as stand alone forms.

I have done something like this, but the form moves around. I would like to lock it into the top left so that everything lines up.

Dim frm As New Form2
frm.Show()
SetParent(frm.Handle, tab1.Handle)

I also have to pass values from sibling to sibling, but I think that I can handle that if I can come up with a good format.

So overall, I would to have forms that could be in a tab or just displayed as a child not in the tab.

View 1 Replies

How To Make A Statement Run If All Conditions Are True From Multiple Condition Or If Statements

Mar 22, 2011

I have a form that contains multiple conditional or if statements on several defferent for controls.

Example: Radio Buttons, TextBoxes and CheckBoxes.

I am intending to create an order form(demo) where the user can select multiple products.

I have a default order number that changes by one everytime an order is successful.

An order is only successful if all the information on the form is entered correctly.

My question is where do I insert the code for the order number?

Basically for the order number I have a counter that count by increment of one if an order is successful.

Meaning when the user hit place order, and all the infromation is right, then the order numer goes to 1 from zero.

Where do I add the condition for the order number since all the fields must first be completed.

Do I have to create a whole line of if else statements?

View 5 Replies

Forms :: Add Several Labels (boxes) Onto A Panel - If Condition

Apr 6, 2011

I'm currently trying to make a beat generator, which allows you to add several labels (boxes) onto a panel, and then sound will be played when the "play slider" reaches the same x-value. However, i can't make the slider find the boxes. OK, so this is what I've got so far! Clicking my button, a label named sound0, sound1, sound2 is added to my panel_back (which is the background of the player) Private Sub btn_addkick_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_addkick.Click


[Code]....

View 3 Replies

Forms :: Count Rows On Dataset With WHERE Condition

Jan 7, 2010

I have a dataset that I search using the

dataset.tables("table").Select("WHERE clause")

method to query. I then use a datarepeater to display the results. Is there a way to programatically tell if no results are returned? I'm aware of the Dataset.tables.Rows.count, but can this be done after the select method?

[Code]...

View 2 Replies

VS 2010 Accessing Group Boxes From Multiple Forms

Jul 23, 2011

I have written a code and tried linking up groupboxes from my input form called input.vb and the output form called results.vb.

[Code]...

I have used the above codes to access groupboxes from both forms. However, at run time I get errors saying "InvalidCastException was unhandled" and below that it says "Conversion from string to DOuble is not valid". This error points to a value in a group box that is actually hidden or disabled.

View 9 Replies

VS 2010 Make Multiple Forms Have The Same OnClosing Event?

Aug 21, 2011

how to have all forms have the same on closing event with the exception of one form (Form1). I want the forms to show Form1 when one of the other forms is closed. I know there is a way to do it, I just can't work out how.

My code at the moment assumes that each form will have a boolean declared on it as false that will only turn true if you use a legitimate way off of the page (i.e. a regular button on the form). If you instead click the exit button on the title panel it will find the boolean is false and show Form1.

So the only problem I really have is getting the code to apply to all forms without writing it for all of them.

View 3 Replies

VS 2010 Executing When Condition Is Not Met?

Sep 29, 2010

I use this line of

If MADS.Tables(0).Rows(1).Item(13).value >= 0 Then The value of item 13 is negative and it�s a double. Still the code in the condition is executed?

View 3 Replies

Open A Specific Tab In Condition That "Profiles.txt" Is Not Found?

Jan 20, 2009

I want my program to open a specific tab in condition that "Profiles.txt" is not found. It already opens the Control Panel, but it needs to go to the "Add Players" Tab in the Control Panel automatically.
Is there a way to do that?

Also, I have a couple of advanced tabs that should be disabled or hidden until certain conditions are met.

View 3 Replies

Open Multiple Socket Connects To Multiple Servers

Apr 4, 2012

i have a form where i wanted to open multiple socket connects to multiple servers. i defined "clientsocket" as a socket array

[Code]...

View 6 Replies

VS 2010 : Refresh DataGridView According To Any Condition?

Feb 5, 2012

I want to Refresh DataGridView according to any condition (e.g. I changed the color of letters in cellls). This condition is set by another form (it closes when the condition is set). How can I do it?

View 11 Replies

VS 2010 Backgroundworker Error Only On A Condition?

Feb 16, 2010

I cannot figure this one out.. I have a background worker that will perform a task streaming data from some webpages. this data is then passed back and displayed in a gridview. It has been working fine.

I've recently implemented a listbox, which its values will be passed into the function that the background worker will perform as parameters, originally i had taken a single value from a textbox.

Now, I thought maybe it had something to do with the listbox, so I used a static value, just a simple String, as the parameter, and again, I get the TargetInvocationException was unhandled.. There's no difference in how I perform the task I'm trying to have the backgroundworker complete, the only difference is where it exists in my if condition statement:

Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles ScrapeSites.DoWork
Dim results As ArrayList
Dim worker As System.ComponentModel.BackgroundWorker = DirectCast(sender, System.ComponentModel.BackgroundWorker)

[Code]...

View 3 Replies

VS 2010 For Loop Condition Met Not Working

Oct 28, 2011

I have a list of string in an array. I'm loop through those strings and if the text of a combo box matches one of those strings, I want a message to appear. If they don't match, I want a method to be executed.

[CODE...]

The messagebox appears, but the method is still executed. Which means it isn't stopping when it finds the match. I tried exiting the loop, but it still doesn't work.

View 4 Replies

VS 2010 Integer Condition Check?

Dec 1, 2011

i'm starting to learn VB, i've wrote a few little programs following the books and internet resources, so far so good until now, i have to check a range of double integers(e.g. 170-50) if the left integer is == 170 and the right integer is == to 50 then you profit.i have to do this about 200 times but i just need a litow to get started, i've searched for about 4 hrs and read for about 5 and still nothing.

View 2 Replies

VS 2010 Start A Random Timer After A Condition Is Met?

Mar 7, 2012

I want to do smth like instead of typing

vb
Timer1.Start()

I can type

vb
TimerA.Start()

where A is a random integer declared before.

View 1 Replies

VS 2010 Add Context Menu To Windows Explorer With Condition?

Jul 21, 2011

I want to be able to add only a certain context menu to Windows Explorer when a condition is met, that is, when a folder is right click, I should be only add the context menu if that folder is in a certain state.

View 1 Replies

Forms :: Cannot Open Half Of Forms In Designer View

Sep 1, 2011

I have no idea what I have done wrong here, so I'll just attach my project as a zip file and see if any of you are kind enough to look into it for me.I am reasonably experienced in C#.NET but having trouble using VB.NET for a school assignment.I cannot open half of my forms in designer view because "To prevent possible data loss before loading the designer, the following errors must be resolved".

View 1 Replies

Application That Has Multiple Front Ends Developed Using Windows Forms / WPF / ASP / Compact Framework Mobile Forms

Apr 9, 2010

I have the requirement to create an application that has multiple front ends developed using Windows Forms, WPF, ASP and Compact Framework Mobile Forms.I would like to be able to create a series of obejct representing the business logic and have this logic accessible from the various front ends available. My first thought was to use remoting as I'd like to be able to pass the business objects back and forth between client and server but the compact framework doesn't support remoting and also transferring a full framework business object to a compact framework business object doesn't seem possible.My next thought was to use web services but again the passing of business objects seems to be very hard to accomplish. Without doing this I would have to create individual web methods for each business operation.

Finally my next option is to use sockets and write the whole client/server logic within some classes and expose them to the UI/Business layer. My only problem with this is it is not scaleable should the number of clients increase dramatically whereas using remoting or web services I can host the solution via ASP.Net.Does anybody have an ideas on the best way forward for this or even have any input on how they would write an application that required a windows form, wpf, asp website and mobile device GUI all of which want to use the same business logic?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved