Place Code In .Net Solution That Will Execute Continously?
Jun 29, 2011
I'm new to .NET so please forgive me if my question doesnt make sense.I'm working on a project where the difficult part is already written. I have the classes for comms drivers and can use the properties and methods with expected results.What i need to do is perform a task every 500msec regardless of which form is loaded. Is there some sort of "module??" I can have running continously every 500msec? Off a timer event perhaps?
These variables should have global scope throughtout the application so I can access them from different forms.
View 7 Replies
ADVERTISEMENT
Dec 16, 2009
We have a couple of DLLs that need to be put in the GAC at compile time only in Debug mode as this is what developers use locally. Release mode will be the Continuous Integration server build and we will not want to put any dlls in the GAC. We used to do something similar with post build events on a project, but if a post build event can be conditionally run if debug. What is the best way to achieve this?
View 2 Replies
Mar 11, 2010
Like I imagine everyone, I often have problems navigating my code because the flow can jump from place to place. For example, if my code calls routine1, and I then want to go to routine1's code, I know that I can click in the dropdown menu and it will take me to that sub. But wouldn't it be easier if I could somehow right click on the call to routine way and select something like 'take me there' which would transport me from the function making the call to the code for the function being called? Then it would be easy to hop from place to place.
View 1 Replies
Feb 29, 2012
I am trying to execute a stored procedure and place the data in a datagrid manually (without using the .net wizard). I am using vb.net and asp.net in visual studio.Here is my code but I can't figure out where I'm going wrong.
Imports System.Data.Sql,
Imports System.Data.SqlClient
Imports System.Diagnostics
Imports System
[code].....
View 1 Replies
Dec 8, 2011
I have some code to execute code at runtime...
Here is the main
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
If TextBox1.Text.Trim <> "" Then
If TextBox2.Text.Trim <> "" Then
[code]....
When the button is pressed, it all works and the following files are created: yahoo.dll and yahoo.pdb My question is this: What is the code to load the already compiled yahoo files to execute the code again, without having to recompile the code?
View 1 Replies
Aug 19, 2011
I want to import my data, which I receive over USB (every second), to an Excel sheet. Thing is, I want to open only one Excel file and write everything to this one file, and by pressing a "STOP" button, data reception will be canceled and data in the Excel file should be saved and Excel file should close right after that. Here my code,
Dim excel_cnt as Integer<br/>Dim sv_var as Integer = 0<br/><br/>Sub write_to_excel()
Dim xl As New Excel.Application
[Code]....
View 3 Replies
Jun 6, 2011
Can I get access to the code of an application without having the Project Solution file? We had someone leave the company and we need to get to the code that they created. What we have are the following files:[code]....
I only know how to access code by clicking on the project solution file for an application but I'm not sure if there is another way to do it.
View 3 Replies
Oct 22, 2009
Between testing sessions on my windows service, I'm changing code (little tweaks here and there). For more detailed debugging, I've had the application send messages to a text file everytime it does something (executes a new procedure, catches an exception, etc).
I've been doing this for a while, but ever since yesterday, it appeared that the new code wasn't being used. To test this, I changed the name and location of the log file that the service would use, and re-installed it shortly after a new successful build. As it turns out, the service is writing only 1 message (about a timer being started - which is only supposed to happen after it's logged the start of the service) to the old text file. It looks to me like my service isn't using the new code in my Service1.vb file, Like the old code has been cached or something, and the service is installing from that.
View 2 Replies
May 21, 2009
Is it possible to get access to my VB code if I have the solution files on a USB hub but no access to Visual Studio? Can I open them up in Notepad?
View 1 Replies
Jun 16, 2009
I'm having troubles finding where I can put code-behind for my dnn pages.[code]...
However, I want to be able to add a VB function that is executed on Page_Load, so I made my own code-behind file. But I can't take out the current control (one referencing skin.vb) to put in my own, and you can't have more than one Control.
I also tried embedding the code in a tag, but I need to do some Imports which give me an error saying they must be declared at the beginning of the file etc etc...
Anyone know how to properly add code-behind for DNN pages?
View 2 Replies
Oct 25, 2011
Simple question.I have a picturebox on my form. Picture1 and I want to use code to place in to it an image.
I currently have this:
Imports System.IO
Imports Microsoft.VisualBasic.ControlChars
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
[Code]...
View 4 Replies
Feb 16, 2009
Remember in vb 6.0 we used inet to drag info off the web. What code took its place?
View 3 Replies
Oct 26, 2010
I want to execute a code after every 5 min.I am trying to develop the application in .net and using the C# as a backend language.My basic requirement is a C# code which executes after every 5min which i click a start button on my .net form.
View 6 Replies
Apr 15, 2012
I am not sure if this is possible, in VB is it possible to link to some piece of code in the current document?
View 3 Replies
Jun 25, 2010
for example there is a file named abc.exe in c:
what would be the code for executing this file?
View 8 Replies
Oct 31, 2010
Is it safe to place the code of INSERT Sql command inside my While End While
[code]...
View 1 Replies
Oct 13, 2010
I've created a schedule panel,drawing some lines,and adding some labels,as in image(blue,red and green are labels added by code).Now I've put some code to show the number for each cells,for that I've used Paint event of the panel but this slow the paint event,and after some investigation I found that the paint event was raised for some 20 time on my first form shown.Is there a place to put this code to run only once ?
[code]...
View 6 Replies
May 31, 2012
I know this requirement may seem weired to many of you but it is one of my project requirement.Is it possible to add code in Sp and execute in .Net exe. Like on button click i call one SP that SP returns few line of code and then program execute the code.
View 4 Replies
Apr 11, 2011
Been spending some time on Codility.com recently and it crossed my mind; how do they execute the code you have created (Specifically pertaining to C# and VB.NET) ?
What I am basically wondering is how would I take a textbox on a form type some code in it and then run that code? Is this possible without 3rd party tools?
View 3 Replies
Dec 1, 2010
I need to to make a timer that will execute my code every 30 minutes
View 8 Replies
Mar 23, 2010
Can anyone think of a clever way to execute a piece of code every time a form opens, application wide? I have an app with about 45 screens, and I don't want to drop code in each form load event.
View 7 Replies
May 17, 2010
Can anyone think of a clever way to execute a piece of code every time a form opens, application wide? I have an app with about 45 screens, and I don't want to drop code in each form load event.
View 12 Replies
Jan 26, 2009
how to run code "in the background".As a form is loaded into memory I have the following code filling a listbox from a database table with this sub.I read in one of the documents about making code efficient that I could make this execute in the background.The list box is not needed immediately.
Private Sub getReleaseChoices()
Dim da As New OleDb.OleDbDataAdapter()
Dim cn As New OleDb.OleDbConnection(gCnRefString)
Dim ds As New DataSet()
[code]....
View 1 Replies
Aug 4, 2010
I have an app that allows a user to type in code that can be executed much like vba code in the office world.I currently execute this code with the Proprietary Dexterity code used with MS Dynamics - GP.However, my users need to be able to run outside the Dexterity world.The easy answer is to allow them to type in vb scripting or vb code instead of dex code.However, I can't find an easy way to dynamically execute their code within my methods.CodeCom looked like it could be the answer, but If i'm reading it right, I would have to know what libraries the user is using in their code for vb.Thus, I thought to simply limit them to vb scripting.Unfortunately, I can't find a way to execute vb scripting from within vb, (all the articles are ancient and most links fail - thus I gotta believe there is an easier way).I'm at a deadline where I developed the prototype but trying to use sql statements failed miserably when trying to execute.
View 3 Replies
May 17, 2009
I am totally new to VB2008, so please bear with this likely dumb question.
I have seen numerous "my first program" tutorial that show you how to create your form, put controls on it, etc. I can get through those just fine.
However, I am wondering: If I compile a set of subroutines into a .exe, how do I indicate which code/sub to execute initially? I am an old school programmer (remember COBOL?), and we always had a starting point; a set of code execute, that initiated execution of other subroutines, functions, etc.
I have dabbled in VBA for Excel, and MS Access, and even those, you indicate in the interface, and menus you create, that first bit of code that brings up the menu, or perhaps the program's main interface.
View 8 Replies
Nov 15, 2011
When ever i execute this code it hangs ..how to troubleshoot
Imports System.Net
Imports System.IO
Partial Class vbIPNexample
[CODE]...
View 1 Replies
Nov 26, 2011
I have a user control which is essentially a main menu I can place it into my MasterPage hard-coded, but I don't want that, I want to be able to dynamically place it with the code behind of the MasterPage.
<controls:mainMenu ID='MainMenu1' runat='server' />
So what I am looking to do is something like
if **condition is true ** _ response.write('<controls:mainMenu ID='MainMenu1' runat='server' />')
Of course, I know that won't work, but how would I place the control based on a condition in code behind on the master page?
View 1 Replies
Jun 22, 2012
I'm trying to familiarize myself with network programming, and what better place to start than designing an FTP client code library?So far I'm not doing very good. I'm trying to create a method which downloads a file from a remote server to a local file path. To do so, all the examples that I could find declare a byte array that serves as a data buffer. I completely understand the point of doing that, rather than reading and writing byte per byte, but I just can't get it to work. Whenever I set a buffer greater than 1 byte, the output is somehow corrupted (different checksums, media files won't play etc).[code]Because this code does work when I set the buffer size to 1, I feel like there's something going wrong with the byte order. But all of this code is synchronous, so how is that even possible.[code]
View 1 Replies
May 4, 2012
I'm trying to accomplish something fairly simple in VB that I do everyday in JavaScript.I need to parse text between two strings (HTML tags mainly) that have multiple occurrences.
Sample Data:
<tag>test</tag>
<tag>test2</tag>
<tag>test3</tag>
If I wanted to grab the data in the 2nd <tag> in JavaScript I would simply do this:
var result = string.split('<tag>')[2].split('</tag>')[0];
And the only way I seem to get that to work in VB looks like this...
Dim from = string.IndexOf("<tag>")
Dim [to] = string.IndexOf("</tag>", from)
Dim result = string.Substring(from + "<tag>".Length, [to] - from - "<tag>".Length)
View 1 Replies
Aug 4, 2010
I have some code that access an API out on the web. One of the API's parameters allows me to let them know that I am testing.I would like to only set this parameter in my code when I am testing. Currently, I just comment the code out when I do a release build. Is there an automatic way of doing this based on the build configuration?
View 6 Replies