i am working on a college project in visual basic 2010. in my program, i noticed at the last minute that i needed to add a "main" window. in this main window, i want to have all my other forms opened by buttons (i know how to do that part of it).
the problem i keep having is the window with the options to save the information pops up, not the main window. is there a way to easily fix this? maybe a snippet of code, because the only way i can think of is to scrap the project, start over from scratch adding my main window first, then the others.
Dows anyone know how I can build a timeout feature into a windows forms app.
The app is event driven, but I am thinking of somehow using a timer which counts down for say 10minutes, and one the timer ticks then we time out the user.
The problem I have is how can I reset the timer each time the mouse is moved or clicked.
I need to work with custom controls, I want to be able to set the properties of my controls so when I put them on my windows forms they will show up in the properties window thing.
Is there an easy way to set the tab order for controls on a form in Visual Basic 2010 Express? I saw some references to a "View / Tab Order" menu item, but I don't see anything like this in the View menu when I am designing a form.
I have several forms that have a DataGridView object in them. I recently discovered the AllowUserToOrderColumns attribute. I set it to true and I can reorder the columns at will. The problem is that the order for these columns is lost once the form is closed. Ok, how do you save the order for these columns and then restore them to the form once it has been reopened?
am planning to write a simple program which reads two binary files and apply a simple math function ((file1-file2)/(file1+file2)) then outputs the file (file3). Then the user selects the file (file3) outputted as an input and the program again reads the file and apply another math function ((file3 - 0.2) / (0.5 - 0.2)) to it then output the final file (file4).I would like to eliminate the user input or at least minimize the user input. In other words, the user should execute the program once at the beginning and the program should do the rest. Basically there will be 2 form applications in my program. I want to make it automatic in a way that the program will select two files itself (the user should not select) then output the result and then takes that as an input and applies math function etc.My problem is that I do not know how to start the second form application after the first program ends because the second form application inputs the file which was outputted by the first form application.
i have a problem and my project is stop now so i must solve this problem i have a listbox in my project and simple is; so this infos are irregular. i getting this infos with a loop into listbox. i want this infos be sub-bottom.
I am using the 2005 Power Packs Print Forms, I need to hide the filetoolstripmenu in order to print because it come through on my client page So I am using filetoolstripmenusitem.visible= false, then calling print but i think its happens to fast so part of the filetoolstripitem is still coming through on my print image Is there something i can do to pause it for a second?
I have the code which checks if there is a selected tab
Private Function GetBrowser() As WebBrowser If TabControl1.SelectedTab IsNot Nothing Then For Each c As Control In TabControl1.SelectedTab.Controls If TypeOf (c) Is WebBrowser Then Return c
I have a panel with some controls in it (several textboxes, a slider, 2 buttons, and a small groupbox).. When I click a button, I want all of the textboxes within the panel to be readonly... So I have this code: [code] When I run it though, I get the following error:Unable to cast object of type 'System.Windows.Forms.Button' to type 'System.Windows.Forms.TextBox'.If I remove a button, it moves on to give me the same error but for a label..
Just opened the VS2010 pack I've been meaning to get round to for ages. Where is the setting to use un-docked forms in the de?I know I can un-dock each for manually but thats pants.
Did vs2008 or vb.net got some of the solution to solve properties setting of the components are same with each other? Example: like I want to standard the datagridviews' property, each of the datagridviews' property is same with each other. but each time I create the new datagridview. I have to manually set the datagridview 1 by 1.
I'm doing an application for a school to help them keep track of student attendance and because I'm rather new to VB 2008 .NET I'm sure I'm missing something simple.see the screen shot and attached sample application showing the problem I am having.
The screen shot shows 3 open forms. I'm not able to get the value from the 3rd open form into the Student ID textbox of the 2nd form even though my messagebox shows a value is really in there.The attached application has 3 forms similar to the production application I'm writing which also includes 3 forms. Could you look at the application and tell me what we are missing to get the textbox data in the 2nd form to show up?
I have developed a VB.net 2008 application.My application is running successfully in x86 machine.I write some files in windows folder.When I test it on Windows 7 x64 machine with administrator log in there is no problem with this.If i run it with other user log in it gives me an error for access denied for files in Windows folder.
im not 100% sure this is the right place for this, but thought I'd give it a shot.I created a windows service, and it accepts startup parameters to set the connection string for my database connection. (-L for live, -D for dev, -S for stage etc.)[code]I installed the service using installutil (I already tried using sc.exe) and I can't specify startup parameters.So if I go into Services and go into my service properties and manually type -D into the Startup Parameters box and hit start, I get -D as my parameter, life is good. But the parameter won't save in the startup parameters box, it just reverts to a blank box whenever I close the properties page.[code]
Do you know why this happens? If (strCampaignFolder <> "") Then 'Next line works fine when strCampaignFolder already has a value set by FolderBrowserDialog1.SelectedPath further below.
FolderBrowserDialog1.SelectedPath = strCampaignFolder Else 'PROBLEM: Next line causes the external .NET code 'UnsafeNativeMethods' to put the app to sleep when strCampaignFolder has no existing value!
I have a list box on my form with 2 value - "2010" & "2011". When I change the value in the listbox it should set the minimum and maximum value of 2 datetimepickers. Each time I try to change the value I get an error - for example if I change the listbox from 2011 to 2010 I get the error: "Value of '31/03/2011 00:00:00' is not valid for 'MaxDate'. 'MaxDate' must be greater than or equal to MinDate. Parameter name: MaxDate"
If ListBox1.SelectedIndex = "0" Then DateTimePicker1.MaxDate = #3/31/2011# DateTimePicker1.MinDate = #4/1/2010# DateTimePicker2.MaxDate = #3/31/2011# DateTimePicker2.MinDate = #4/1/2010# End If If ListBox1.SelectedIndex = "1" Then DateTimePicker1.MaxDate = #3/31/2012# DateTimePicker1.MinDate = #4/1/2011# DateTimePicker2.MaxDate = #3/31/2012# DateTimePicker2.MinDate = #4/1/2011# End If
I have a panel with 5 labels and 5 listviews in it. By default they are hidden. At runtime I want only the ones shown that are needed. For example, if there are enough players for three tables then three tables should show up. I know how to make the controls visible, but not sure how to control how many are actually displayed. I also think I may have to do seperate loops and seperate the control types?
Private Sub Set_Tables() Dim tables As Long tables = Math.Ceiling(NumPlayers / NumPerTable)
I am having one heck of an issue with a webbrowser control I am using. As part of my job, I am working on creating a tool to automate an older system that we still use. The part that is being automated is web-based, and the group running the automation does not have access to any automation tools like QTP. In order to give them something they can use, the idea was to build an application just for them. In this application, I have everything working perfectly, with the exception of the most important part: the entry of a policy number. The policy number goes into a textbox, and then the user presses a button. A part of the automation sequence involves the use of a timer.
If I manually navigate to the appropriate page and put the .SetAttribute statement in a button action on my form, it works perfectly fine. However, if I put the .SetAttribute statement anywhere that is being controlled by the timer ticking, it does not work.So, this works:
Private Sub btnTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTest.Click Me.wbPrestige.Document.Window.Frames("WORKSPACE").Document.GetElementById("policynumber").SetAttribute("value", "1234567") End Sub
but this does not:
Private Sub timerLoad_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timerLoad.Tick Select Case currentStatus Case Status.wait_for_retrieving
[code]....
As a note, I do not have the Select statement in the Tick action; I have it in its own little sub. However, since it functions the same way no matter where it is, and to save space, I combined everything here. Also, at the time of the timer firing and setting things into motion to enter the policy number, the page is already fully loaded, so I don't think it is an issue with that, though I could be wrong.
It does not throw an error. The "1234567" above is passed in as a string, and doing a watch on it at run-time does show that the value is actually in there. It just seems like the .SetAttribute is not registering on the textbox. I have tried a few things ranging from "what-if" all the way to "that-is-so-dumb-it-just-might-work." Nothing seems to do the trick. I have tried sleeping everything for a few seconds just to see if there was an issue there. I have tried issuing the .SetAttribute command a few times in a row thinking it just wasn't taking the first time. Since setting .Focus() didn't seem to work for it, I even went so far as using SendKeys to move focus to the textbox on one attempt and API calls for mouse clicks (to click inside of the textbox) on another attempt. As a last crazy attempt, I had the Select statement doing a .PerformClick on btnTest (which works if I navigate to the page manually).
Most of the apps I write have a base / home form and a few other forms (three of four typically) which pop up in response to controls clicked by the user. I'd like to be able to set some properties to be the same for all the forms in an app; particularly properties like BackColor and FormBorderStyle. Yes, I can manually set the individual properties for each form in the VB IDE, but I'd prefer to be able to have one line of code in the base / home form for each property along with one line for each dependent form which says something to the effect of "use the same property value as the base / home form has". Overall, my objective would be to have one single line of code in the app which, when changed, would apply the changed property to all the forms. For example, a single line which I can change to take the BackColor from Apple to Orange for all the forms ...
I got a form, another form, another form, another form, etc.And I got a quit form (Msgbox is not pretty)So, there starts a problem.I have two quit forms now, so that the user can pick the best one.The problem is that I don't know how the user can pick it. I have a quit button in Form3. I want SettingsForm have one label that says "Use the new quit dialog:" and two RadioButtons (which it has.) The Yes Radiobutton = Uses the new form, the no button uses the old one.Settings save the selection for the next session, etc.
RadioButton2 = Yes RadioButton1 = No Label = Use the new quit dialog ButtonQuit = The Quit Button