I have a sub in which I call different subs, depending on a value I pass through. It works fine for all but the last one. It executes the sub I call but then comes back to the first sub and runs the second one again
I am working with a datagridview and 2 text boxes.TextBox 1 is for entering time of the day and TextBox2 is for entering time duration in that order. After TextBox2 looses focus I am converting the times into index numbers in my DGV1 and filling the selected indexed rows with some data. The data then is checked and if there are issues message is display prompting the user to correct it. However, all my codes for checking the data and selecting options are in the DataGridView1 event handler:
Private Sub Datagridview1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MouseUp
Is there a way to execute one Subroutine from another Sub. Sort of simulating a mouseup click programmatically ? Correction: there are 7 sets of those TextBoxes representing 7 days of the week. I am trying to avoid duplicating all that error handling codes in all 14 boxes. I have read that MouseEventArgs are protected so it may not be easy.
I'm trying to execute a SQL command, but I just can't find out why this is not working. This is how I defined the "execute" function in my class named "clsSQL":
[Code]...
Probably, I just need another pair of eyes, 'cause I can't see what am I doing wrong Could this be related to the database and not to my code?
So, I want to execute a javascript on WebBrowser1 when I press a button. Normally, I'd just navigate to the javascript to execute it. Like this:
Private Sub WebPageEditorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WebPageEditorToolStripMenuItem.Click WebBrowser1.Navigate("javascript:document.body.contentEditable='true'; document.designMode='on'; void 0")
[Code]....
This makes it where I can't leave the website and it keeps me on that one website. But the problem is that navigating to the javascript is not like [URL] so it won't let me execute javascripts that way. So, basically, my question is:
Is there any other way to execute a javascript with Visual Basic 2008 without navigating to it?
i seem to be having issues with my simple count down project. The count down work how I want it, there is also a pic of a rocket that move up when the count down button (Button4 - the form was set up in class as a quick example, so there was no need to name the buttons) is pressed. The problem is that the count down "10....1...Blast Off" shows after the rocket has moved up, I want the countdown text to show, then the rocket to move.The countdown is outputted to a ListBox.Here is my code thus far: (I have re-worked is a bit, starting to look messy)
[Code]...
I am not sure if I should be doing it as a function, that was just one of my attempts to get it to output everything in the right order.
I wanna know how could I do to:Assemble a finished program, install it, and leave it executing in second plane to just push a key to work. Execute it once at the windows start and execute just a single key to make it work.I'd like to know what should I put before the assembly
If certain conditions are met within a given subroutine, I would like to execute two other subroutines. Note that the other subroutines I want to call/execute "handle" a lot of events
vb Private Sub S2_Enter (ByVal sender As Object, ByVal e As System.EventArgs) Handles S2.Enter If upltschanged = True Then
I've created a program that creates a registry value when it is run, and when this program is uninstalled I need it to remove this registry value if it exists. So I wrote a little command line VB.NET program that simply checks for the reg value and removes it if it exists and I added this to the Uninstall section of the Custom Actions tab in the Visual Studio deployment project that I created for this app.
I know that the command line app works because if I run it myself manually it deletes the registry value, but when I uninstall my application it does not remove the registry value so obviously this command line app is not being executed.
Ok I'm creating a sql query with a string variable and executing it in vb. The string would look something like: Insert Into Table (vara,varb,varc) Values ('vara','varb','varc') This works fine.
I have published application before and they all (3 setup files) work fine. The problem is I don't know anymore how I exactly did it. Now I am trying to publish another form which has a connection to my sql database. The publishing goes fine: publishing folder is: C:Movie-databaseApplication 4 and installation folder is the same, and I therefore leave it empty. Application is available only online. But when I execute the published setup.exe I get two windows with no info about the error: see attachment.
I have published application before and they all (3 setup files) work fine. The problem is I don't know anymore how I exactly did it.Now I am trying to publish another form which has a connection to my sql database. The publishing goes fine: publishing folder is: C:Movie-databaseApplication 4 and installation folder is the same, and I therefore leave it empty. Application is available only online.But when I execute the published setup.exe I get two windows with no info about the error: see attachment.
I'm trying to create a program that does the following:Executes the following command line string (wmic /node:computername bios get serialnumber)Prompts user for the "node" entry Displays the resulting serial number in a dialog box I'm a bit of a noob at this (I haven't coded anything in VB since early 2000s) so I'm at a bit of a loss where to start. I plan on including some functions to submit the node entry and the resulting serial number to a database in the future for archiving as well.
Is there a command in vb that can be used to pause a routine to give time for the form to show before the routine starts as my routine is running and completing before my form shows up?
y question is I have a program that is used to add inputs to an array when the OK button is clicked. My problem is that the after the first click of the OK button the Do while loop does not execute again for a 2nd click.lling out my hair. Here is the code.
Public Class InputValue Public Shared InputArray(0 To 9) As Integer
we want to write a DLL using VB.NET 2008 using .Net 3.5 that performs an HTTP request we then want to call the DLL From SQL Server 2005 (in a trigger) and pass the DLL some variables and get a return value.Where im at in the process.I have created the DLL 'HTTPDLL.dll'
Source:
Imports System Imports System.Configuration Imports System.Collections.Generic Imports System.Text
[code].....
Perhaps i am calling it incorrectly but i havent been able to get it to work (always return 'invalid class string')
Just trying to run a basic program where the user is prompted to enter five names, one at a time. I'm prompted one time. After entering one name I get the following error "Unhandled exception: System.NullReferenceException:Object reference not set to an instance of an object"
Here's the
Module Module1 Sub Main() Dim SortedList For SortedList = 1 To 5
im working in a windows app that execute another apps.. writing the name of the app in a text box (i.e firefox.exe) and click enter to run it im using >> (System.Diagnostics.Process.Start(app_name.Text)) to run apps it works fine with me .. but it didnt with some apps like when I write for example ares.exe it says:Win32Exciption was unhandled :The system cannot find the file specified
I'm trying to execute a SQL command, but I just can't find out why this is not working.This is how I defined the "execute" function in my class named "clsSQL":
Code: Imports System.Data.SqlClient Imports System.Data Public Class Main[code]...
and the sub Exceptionquery is not working. I can verify this because it is supposed to create a new table called scratchpad3. what I may be missing in that sub routine that isn't allowing it to work?
I have two if statements and my project sees one and not the other. Here is the code: If (IsPostBack) Then HandleUploadedFile() End If Dim savePath As String = "Images " If (fileUpload.HasFile) Then [Code] ..... When I trace my code I find it goes to the second if and then go to end if without running the code inside the conditional.
I am compiling and running code at runtime. Can I stop this code midway through if I wish? Like the 'stop' feature in Visual Studio that stops the code if desired?
I'm trying to eliminate a VB.NET button on my aspx page. Trying to use javascript and ajax to execute the same code my vb had.I put in a script manager, set EnablePageMethods to true, added a static subroutine, and referred to it in my javascript function (BTW -- this seems a lot of work just to execute an existing subroutine). The javascript calls my code-behind and it almost works.Problem is, now I'm getting a NullReferenceException when SimulatePrintBatchClick tries to do anything with the controls.
Error is 'Object reference not set to an instance of an object', line is 'pnlVars.Controls.Clear'
Here's the code from UW.aspx:
<WebMethod()> _ Public Shared Sub PrintBatchFromJSWM() Dim UWI As New UW
[code]....
when I run the above code in PrintBatch_Click it all executes just fine. I really don't understand why it bombs out as a subroutine.
Perhaps this is not the way to do this, but I'm at a loss for finding a different way. Originally this code was handled by an ASP/VB button, but the specs have called for it to be deleted.