Code Is Running Twice
Apr 24, 2012I have already got the start date to verify if after end date and display message, but when i put the following code .focus it seems to run the code twice[code]...
View 1 RepliesI have already got the start date to verify if after end date and display message, but when i put the following code .focus it seems to run the code twice[code]...
View 1 RepliesI have a program that runs some code when i click a button on a form when done running the application ends. I want to automaticaly run the code when the users clicks on the exe. I have put the code that i want to run in the startup forms load event but that doesn't start
View 2 RepliesIs it possible to have code running in the background and still be able to use other parts of the program (i.e. firing other events).For example I have a instant messaging chat in my program and when the user has a new message then the display flashes from green to red as seen below
[code]...
But I still want to be able to continue using the other functions in my program despite having this code running in the background (which highlights to the user that he has a new instant message by changing the display background colour)How can I overcome this?
I have been working on them and adding to them for several months. Out of nowhere, one of the subs in my project is not recognizing updated code. I had a for loop in there that was acting funny so I changed something and noticed no difference. I messed with it for a while and decided to just replace everything in that sub with a simple msgbox and it still tries to run the code that was previously there. I have built the solution, rebuilt it, cleaned it, closed and reopened it, removed the bin and obj folders and restarted my computer several times. This is not a server program or anything dealing with IIS or anything like that.
View 4 RepliesProject running old code instead of new
View 2 RepliesI have an application that checks the available disk space on the host machine and, if the free space is less than some constant, calls a batch which e-mails people who should be notified about such things using sendemail.exe.The VB code works properly, calling the .bat exactly as it's supposed to, and the .bat (when run independantly) works properly, sending of a lovely e-mail.But, when I put them together, the batch file reports that "'sendemail' is not recognized as an internal or external command, operable program or batch file.".I'm well aware of how the PATH variable works and have been sure that the path to the .bat is within PATH (hence why it works when I just run it from the command prompt). I can only assume that, somehow, PATH does not apply to processes run from VB.NET for some reason.
VB.NET segment:
If FREESPACE > GetFreeSpace(DRIVE) Then
'Not enough free space
[code]......
I was wondering if its possible to have a txt file in your resource's on your program that contains a class..[code]Can i somehow call and run this class from my main form? But it would still just be in a text file in my.resources.I was thinking maybe i would have to have it read the file then use CodeDOM and run that..
View 1 RepliesI am trying to fire off an FTP of files. I have broken down the code to the barest minimum. I have used the Shell Command with success before but the solution is now evading me.
Sub Main()
Dim strGetFileCommand As String
strGetFileCommand = ("c:\Windows\System32\FTP.exe -i -n -s:getcash.scr 10.113.1.7>113Log.txt")
Shell ("cmd /c" & strGetFileCommand)
End Sub
I can run the command from the c:> prompt at the command line so I know that it is correctly formed.
is there any way to run the WPF storyboard using code in VB.NET? If yes how can we do it? And if i am not gonna get answer to this question too then let me know.
View 3 RepliesI am an end user of a VB based program and our windows 95 based machines are dying of old age. Before getting my boss to agree to my trying out a newer machine I would like to know if there is any chance of getting this program to run.
I know that I need to be able to drive 3 serial (485 / 422/ 232) ports one of which is on an ISA bus and the other 2 are located internally on the motherboard. Another factor in trying to do this is the drivers are missing for the 485 card and I hoped
to be able to locate newer drivers easier.I think the VB code was created under VB3, but we do not have the expertise / tools to be able to disassemble the .exe file.
I have a link that looks like a button from this html <p class="link-styleContact"><a href="#"><span>Email Contact Form</span></a></p> can I run a code behind file when this is clicked on by adding the routine name to the href? like below
<p class="link-styleContact"><a href="ContactFormClicked" runat="server"><span>Email Contact Form</span></a></p>
I have a Window Forms application (using clickonce installation, running on a terminal server) that occasionaly ends up with a thread that appears to be running in a tight loop. The user doesn't know this happens as the app continues to run as expected. Also I have determined that I can kill the problem thread without any apparent affect on the app.
I can use Process Explorer to find the instance of an app with the problem and can isolate the thread with the problem but haven't found any way to look into the thread to find anything that would help me determine what is causing the problem. Does anyone know of a way to some additional information about a thread, like maybe strings, that would help me zero in on the issue?
I have a number of msgbox's I only want to be displayed if I'm debugging (running inside the IDE)
Is it possible to raise a flag as such:
If RunningInsideIDE=True then
I have a self made program (visual Studio 2010 VB) that is running OK but.when i write data to a listbox the output in the listbox appears after the code is finischeded running.
View 5 RepliesWe 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 RepliesI 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 RepliesI have a combo box I am filling on form load.I am using "SelectedindexChanged" to detect changes in the index to run the code when the combobox is used.Unfortunately, it runs the code on start up as well.
View 5 RepliesI have notice that when a module is running the screen does not update properly.For example if I change a label to read "Please Wait..." The second half of the label does not display until the program is idle.Can I get the screen to update while its running.
View 2 Repliesthe user of my application is able to run a diagnostic tool which is part of my application. This diagnostic tool searches every file on the computer, logs the names, and if the my program is able to then the file will be read.
My program has other uses as well. If the user wants to do something else in my program then i want the diagnostic code to run in the background. I don't want this code to prevent users from using other features of my application since the diagnostic search does take time.
How do i do this? Threading? A background worker? If the anwser is Threading which i am pretty sure it is, how do i set up a thread? My computer has 4 GB of RAM - 2GB & 2GB so i know i am able to do this smoothly.
This is just wierd.When i run this code, my computer gives a little sound, like that POST-sound when you boot your computer
[code]...
why is it doing that? btw im using 2008 but im sure the code works in most other versions.
I have this code:
Public Class Transform
Dim inputFile As IO.StringReader ' Object variable
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ofdOpenFile.FileOk
[code]....
And I am getting these errors:
'Private Sub Transform_Load(sender As Object, e As System.EventArgs)' has multiple definitions with identical signatures. Line 15
'strOutputPath' is not declared. It may be inaccessible due to its protection level. Line 51
Type 'XslCompiledTransform' is not defined. Line 83
I have a group of RadioButtons in VB.NET. I would like to create one function that will handle all of them together. My code is below.
[Code]...
i'm working on a internet cache cleaner.. i load the cache files in a listbox and send them to the recycle bin. in this process, the app stalls until completion and the stall depends on how many files are in the cache.how can i do this and keep my app active, not stall?
View 14 RepliesWhat type of coding requires administrative rights? Does deleting files or copying files or using the shell / system.diagnostics.process.start()
View 1 RepliesThis may be a strange question and have no answer but I thought I would post it to see how you would go about doing it. I have a line of code:
Grade = Math.Round((Math.Abs(CorrectAnswers) / TotalQuestions) * 100)
Basically that line just figures out the grade no major code work there, what I want to do is execute that specific line with different variables without running the whole application and navigating to the point in the application which for this segment would be completing a 150 question exam, or coding some #temp page and running it from there.
I'm writing a macro to automate the process of attaching to the IIS worker process (w3wp.exe, Windows Server 2k8) from Visual Studio. The trouble is that I often two app pools running at any given time, one in x64 mode and one in x86 mode. This means there are two processes called w3wp.exe running at any given time, and the only way to distinguish between them is the mode they are running in. When I use the "Attach to Process" dialog, there is a "Type" column that shows that information so I know which w3wp.exe to attach to, but I can't figure out how to get that information in my macro.[code]....
View 1 RepliesI need code to fit for an 'if then' statement based on an operating system. So let's say I am running windows XP, the program detects it, and with a simple if then' statement it opens form2, if i was running vista, it would open form1. So basically i need something like: If (WindowXP current OS) then form2.open, If (windowsvista currrent OS) then form1.openOf course, the above statement won't work because I need code to support the detection of the O.S.Note: I just need code for just these two O.S'es, also I don't care if its Windows XP SP1 2, or 3, just as long as it's an XP.
View 4 RepliesIn the Visual Basic 2010 development environment... i.e. cannot edit code when running in 64 bit mode.
View 2 RepliesI want to go back to the input line in the four places in the code that say something like strinputmessage = strnegative or strinputmessage = strnonnumeric.I need to be able to go back to where you input the data so that the index does not increase.I tried using a GoTo <23> to go back up to the line i needed but then it gave me all these weird errors about the End and Next were missing.[code]
View 3 RepliesHow to I run multiple threads in VB.NET? Say I need 2 threads - one that prints 100 numbers in a loop and the second one that asks for the user's name and prints it inside a message box.
View 1 Replies