Forms :: Code Running - But User Still Can Access Form ?
Feb 23, 2010
I am trying to figure out how to have a form running in a loop waiting for the user to input something....
such as:
private function looping()
while 1=1
if textbox.text = "hi" then do_something()
endwhile
end function
How can I do this? threading? Backgroundworker?
View 3 Replies
ADVERTISEMENT
Jun 22, 2010
I was a vb6 user, done a few projects only with forums Now i am moving to vb.net(vb2010) and i have some trouble.Lets say we have a form(form1), a module(mod1) and a textbox on the form1.
i want to start a Sub (DoWork) in the module but in a new thread.
Dim Thread1 As System.Threading.Thread
Thread1 = New Threading.Thread(AddressOf mod1.DoWork)
Thread1.Start()
The DoWork sub does some stuff and when it's finished i want to change the text of a textbox1 in the main form and start another sub (DoWork2) on the main form under the main thread not the one DoWork is running under.
Plese do not refer me to another post that mighe give me a part answer, try to explain to me what i have to do and why.
View 3 Replies
Apr 13, 2010
I only managed make the form always on top. But what I want is when the form is on top, user cannot access the other application in the windows.
For example : Some messagebox won't let users access the other application until the users hit the OK button.
View 1 Replies
Mar 30, 2009
I am trying to figure out how to generate code from user input. In Visual Studio 2008, Visual Basic.My script always begins with:function Init (Quest)Then from here a user would input a quest name, type and zone in a interface using windows forms.[code]I would also like to have these available on the UI but wont generate unless a user checks a box to add them or there is a box already for them but wont step into the code unless the user enters something into the box.Is there anyone that can explain how I would go about doing this. Or maybe some kind of visual studio plugin that will help me out.
View 2 Replies
Feb 27, 2009
I have some code that queries all the printers on our print server and returns a list. I need this code to work so please don't reply with comments asking why I am using it when you can simply type \Server to list the printers (I know this, but need the code to work as part of a larger application). When running the following code on an IT PC with admin rights, it works. When running on a restricted user PC, it doesn't. How can I add permissions in code to elevate the EXE to 'run as administrator'? [Code]
View 14 Replies
Sep 10, 2008
I recently just started working somewhere which will involve me coding VB in MS Visual Studio .NET 2003. I've been trying to refresh myself in VB by reading things online, but I just discovered an error while trying to run some practice programs (attached as error.png). Basically it says that I need administrator access.I'm waiting on an IT guy to grant it to me, but in the meantime I'm trying to figure out if there's a way that I can test my code without being an administrator.
View 1 Replies
Jul 9, 2010
I have a window service that Inherits System.ServiceProcess.ServiceBase. While running in debug mode (havent tested compiled), the thread does not see the current user credentials. I need the credentials so I can set up the WebProxy and I would prefer to use the account that service is running under instead of passing the user and pwd as a string.Can someone help me figure out why the code running in the class the inherits from ServiceBase does not have have the credentials of the logged in user?
View 1 Replies
Jun 20, 2012
i have a query iam able to add items in listbox from form 2 to form1 from windows application in vb.net but iam unable to add items in listbox from form 2 to form1
View 3 Replies
Aug 1, 2011
i made a form as big as my screen and remove the button on the title bar to ensure that the form will not be tamper with, but i still can make it small using mouse arrow drag, going to last border of the form.
View 4 Replies
Jan 4, 2010
I've got a form that opens up whilst data is being pulled from the database in another form (basically a box to say it's loading), the form opens when I want it to and the gif shows but doesn't run until the code on the other form has finished.
View 5 Replies
Jul 15, 2010
We have a purchased application written in Visual Studio 2005 that uses tab controls for displaying information. One of the tabs is for reporting and I am trying to run some code to enable and disable a Validate button. It has a proprietary report component (LxReportView1) that is initially disabled. As user enters information, the Validate button is used to check for required fields. After data entry entries have been validated, user click Validate one last time and record gets flagged as validated and report component (LxReportView1) gets enabled for use. Ideally, whenever this Report tab is clicked, it will run my code EACH TIME.[code]Works fine when user's first action is to bring up a record that has already been validated. So when user clicks on Report tab, report component LxReportView1 has been enabled for use and the Validate button has been disable just as designed. Problem is that given a list of records, if user selects a record that has NOT been validated yet and then later on brings up another record that has been validated, code does not run. How can I get this code to run EACH and EVERY TIME the form loads.
View 4 Replies
Apr 28, 2011
I have just built a full main menu for my pc game and need to terminate the running program using a button held within the form. I have built a button labeled exit and tried a couple of closing codes such as:
Me.Close
ExitApplication
View 2 Replies
Dec 13, 2011
i am trying to develop a project for my academics...i.e, windows application s/w... how to get the thumbnail view(in win7 taskbar shows in that manner?) of all applications that are appearing on taskbar with code in vb ..
View 1 Replies
Jan 19, 2012
I have a form which I use to read data from a text file and export it to an excel template file. The data it reads is constantly updated so I would like to add a check box to cause the data to be read every 10 seconds. It's set up so the user can either do one quick scan by clicking a button, or they can click the button while also having the check box checked and it will scan every 10 seconds.The problem is, once I check the check box, I can't uncheck it. I have created a greatly simplified version of my original code to demonstrate this concept.
[Code]...
View 1 Replies
Feb 22, 2012
for the any of the button in vb the c# code which is written is not working at all after running a form example: exit, message box even these also not working give me solution
View 1 Replies
Nov 16, 2010
What i want is :
There is one windows app ( made in .NET 3.5, VS2008, C# ) for Windows XP SP2 & SP3
generally users can change there IP or modify their IP Address.
Now,when my apps starts i dont want users to change there IP Address untill my app stops.
View 3 Replies
Oct 15, 2011
I have an application that has an Ms Access 2007 DataBase which runns great if access is installed. Is there any code that I can use in vb that I would be able to run access with out installing it.
View 5 Replies
Apr 26, 2011
I dynamically load a user control in a form (Form 1).
In my user control there are two things :
a Textbox (TxtBox1) and a Command Button
WHen the button is clicked, it opens a new form (Form 2) Form2.ShowDialog()
My question is, in Form 2, how can i set a value to TxtBox1 of the user control?
View 2 Replies
Jul 28, 2010
I have a DataSet(dssongs) with a DataTable(dtsongs) on a form(songsForm).
I am adding rows to the dataTable using the following
Dim dr As DataRow = songsForm.dtSongs.NewRow
dr.Item("colSongFile") = file
dr.Item("colSongTitle") = ""
[Code]....
How do I refer to a DataTable on another form?
View 2 Replies
Jul 30, 2011
I am trying to write general function to set the attributes of the command button and want to access this function from any forms.But I am getting error in this function.[code]
View 1 Replies
Jun 1, 2011
i have tried googling this and cant find a way to do this, i hav 2 projects in the same solutions, i am trying to write a bit for Solution1_Project1_Form1 to open a windowsForm in Solution1_Project2_Form2.
Start main application & View 2nd application FROM within the main application.
Start the 2nd application WITHOUT using the main application.
both applications need to read and write to a database, i dont think this makes a big diferance but thought i would mention it
View 2 Replies
Jan 3, 2012
I have about 60 Child forms
Each have a variable with same name.
In Main form I want to set the value of the variable of the active child.
One way of doing that is like
Select Case Me.ActiveMdiChild.Name
Case "formName"
frmformName.Variable=0
I donot want to do that as it involves writing many cases and I may miss some.
Is there some other way of doing it .
I tried
Dim O as Object = Me.ActiveMdiChil
O.VariableName= 0
and its various variants but its not working
View 3 Replies
Mar 11, 2010
i have a access database with two tables, one for customer and one for booking.
I then have a form application i made in VS 2008 which lets a user enter details such as their name phone number ect into text boxes.
All of the information the person enters thoughout the program is shown via labels at the end, all on one form.
Would it be possible to then have a button that when clicked saves all of this information into the access tables into the correct columns, im sure it must be possible i just don't really know where to start.
View 14 Replies
May 8, 2009
I am having trouble with this project I am working on. I am a beginner to vb and have some background in access databases. I will attach my am doing an inventory project. When you execute the form, a main form pops up that allows you to choose Production or Inventory. My issue is with the Production. In the production form that pops up after clicking Production, there are text boxes to be filled out by the user based on the production run.plementing a class that will give the box count based on the box type entered. I have to use a class based on the project requirements.
Basically to calculate the usage, enter in a random number for Pods Produced, then enter in a box type (which is A box, B box, C box, D box, Master Case). I want the Public Class Box Count in the code to be able to be placed in the production form's main class code and calculate the box count based on the box type entered. If A box, box count should be 50. If B Box, box count should be 100, If any other box is typed in, the box count should be 150
View 4 Replies
Jul 18, 2011
I'm running an application under an account that is not the account logged-on to the PC.
Within the application I need check if the logged-on user is a member of the Administrators group. Below is the code I'm using. From what I've read, WindowsIdentity.GetCurrent() should return an object associated with the logged-on user. It doesn't, it returns the same information as the call to System.Threading.Thread.CurrentPrincipal. Which is the information associated to the ID running the application, not the logged-on user.
[Code]...
View 8 Replies
Oct 22, 2009
I want a string and a listbox, both which are in a form to be modified by an instance of a class method. Should (could I):
1. Pass the entire form to the class method as parameter.
2. Pass the listbox and the string to the method as parameters.
What's the best approach to get access and modify this string and listbox on the form.
View 3 Replies
Aug 18, 2009
I have a windows application with a main form, on which a user control is added dynamically when a device connects trough USB.
On a user control, there is a thread wich is getting data from the device trough USB and when it is finished, I want to change a progressbar that is located on the main windows form where user control reside.
This is the code that is I call on the user control thread to change the progress bar value:
Frm_Main.UpdateProgressBar(CInt((AllBytesReceived / MaxBytesInFlash) * 100))
and this is a code that is called on the main form:
Private Delegate Sub UpdateProgressBarDelegate(ByVal value As Integer)
[Code]....
View 8 Replies
Jun 2, 2009
I created a class library containing some properties and methods, when I call a specific method that runs a sequence of tests, it reports "out of memory exception". When I take the same code and build a form.exe, I do not get the "out of memory exception".
View 6 Replies
Oct 6, 2009
I use the code about video capture of this site, it ran very well ! VB Helper: HowTo: Capture video from a video device such as a Webcam with VB .NET But I want to change the interface of form then after I customize my new one with button, picturebox (with the right name), copy the code again except this paragraph #Region " Windows Form Designer generated code "
[Code]...
View 6 Replies
Apr 7, 2011
What I have is a user control that has two RichTextBoxes. In the user control, there is RichTextBox1's TextChanged event, I want it to set RichTextBox2's Text to the same as RichTextBox1's Text, I'm currently using: RichTextBox2.Text = RichTextBox1.Text. The user control is on the main form, when I run the application and type I get this error: StackOverflowExecption was unhandled. [Code]
View 4 Replies