Dim myDelims As String() = New String() {"<beginning of record>"}
Dim split1 As String() = temp_string.Split(myDelims, StringSplitOptions.None)
For Each s As String In split1
If InStr(s, lot__no) Then
for some reason, the first s in split1 is giving a value of "". there's nothing in it.why is it starting ONE before the first element?
I have a number of rewrite rules for a lot of things that I did in IIS7, like removing trailing slashes, canonnical URLs, lowercase lettering, and such. IIS altered my web.config, and everything works fine on the website, like it should. But in the Visual Studio web.config, the opening < rewrite > statement is underlined in blue, and at the bottom of VS, it says that the element 'system.webServer' has invalid child element 'rewrite'. But this is how IIS made it. I didn't do this manually. Should I be concerned with this VS error, or should I just leave as be, since it's working how it should work? Here's an example of my web.config:
Is there a way to control the way a browser behaves such as if I click on this link it doesn't navigate to that link but instead show me the source code behind that button?
I need to randomly pick an element from an array and I can only use that element three times,I can randomly pick the element but how do I go about only using it three times.
I have been doing well and also I am a noob I know it and you know it a lot has started making sense and I am evening figuring new things out without using Google but of course I have hit another snag in my program so here goes
I am waiting for an email to arrive (the page automatically refreshes) and then I want to click the link (I do not need to click to open the email or anything like that) I also have the code to click and navigate to the address reason being it was the only way I could figure out how to stop it opening in a new window on IE
So my only problem is I need a way to check every x seconds for the element and then if its there proceed with my code and if its not wait and then check again or however this is done in VB.If this is not the way its done please point me in the right direction the code I am using to find and then navigate to the link is
Dim emailpageelements As HtmlElementCollection = WebBrowser2.Document.GetElementsByTagName("a") For Each emailver As HtmlElement In emailpageelements If InStr(emailver.InnerHtml, "https://twitter.com/account/confirm_email/") Then WebBrowser1.Navigate(emailver.InnerText)
I want to be able to reference an element in an array of structures by the name of the element in a visual basic 2010 function. For example
Public Structure myStruct Public element1 as string Public element2 as integer Public element3 as boolean
[code]...
Is it possible to reference a structures element by the element's name in a similar way to that shown above. The code shown above does not work, as the expression obj(i).[elementName] does not work as hoped.
I would like the following function to return Nothing if the element with the specified key is not in the collection. Instead, it returns an error - something to the effect of "no element found"
Public Class MyCollection Inherits System.Collections.ObjectModel.Collection(Of MyType) Public Function FindByActivityKey(ByVal searchValue As Integer) As MyType
I would like to associate a web page element, a textbox for example, with a textbox in my form. When a user types something in the textbox, I would like it to be like he types it on the webpage.
it possible by coding to add a row starting from 0:00 to 23:00 within a datagridview and colums with names or do i first have to build it within access and then import it in a datagridview.
I have a page, a session starts on page load (using global.asax) the user may not move from (or interact with) that page for a long while and I dont want to increase the session timeout. When the session times out after say.. 20 minutes, I want to start a new one, without moving from the page. I also don't want constant keep-alives i want to do it via another method (timer, button press...)
I am using Microsoft.Web.Administration to create NEW websites programatically. How do i change all ID's starting from zero? Currently i have about 100 websites and they are ordered like following:
1, 2, 4, 18, 200, 1234, 232324, 2455344 etc. etc. And i want them ordered like this: 1, 2, 3, 4, 5, 6, 7, ... etc. up to 100.This question doesn't have to refer IIS and the Administration class directly. I just need to change the id like you change the values into database or array/arraylist or generic list.
Means the value with 1234 should be 6 if six is not already taken or 18 should be 3 etc.
I'm trying to execute a 3rd party application, called from a .cmd batch file, called from a self-hosted WCF service. Like this:
WCF --> .cmd --> 3rd party app
For whatever reason, using the Shell command doesn't work fully. It will call the .cmd file, but the 3rd party app won't kick off (I know the .cmd is firing because I have before/after ECHO statements populating a log file). If I double-click the .cmd file from explorer, the 3rd party app will start just fine. So, I figured, maybe try something besides the Shell command from my WCF service.
So I tried the following code, but it won't kick off the .cmd file at all (echo statements not firing). What am I missing here?
Dim psi As New ProcessStartInfo("cmd.exe", "/C " & System.Configuration.ConfigurationManager.AppSettings("ExStream_CMD_File_Path")) Dim proc As New Process() proc.StartInfo = psi proc.Start() proc.WaitForExit()
The path in the app.config file is valid (just double-checked). Is there anything wrong with the above code?
I have a .net dll and when I add it in the references, it goes without any issue. The problem is that its namespaces start with an integer e.g. 3gppsa5.org.AlarmIRPSystem and when I try to use or import it, the intelliSense doesn't allow and says identifier expected.I don't have the source of this library so I can't change it. I know it is compiled and the Object Browser is correctly showing all of its classes and functions. However, I am unable to use it in my code. Is there any way to use it in VB .NET
see below program. I start a new thread x with function abc, then I do some longer task. Why does x only start after end sub? Shouldn't it start right-away, before sleep ?
Basically I've written two Apps (A and B) and all I want to do is put a link on the menu of App A which when clicked will fire-up App B.
Normally what I'd do is something along the lines of...
Shell("C:PathAppName.exe")
However, both of my apps are installed on the target machines via a Setup-Kit generated by the Publish Wizard in VB.NET. As far as I know, after you've run the Setup you don't get an EXE file for the actual application - you just get an 'Application Reference' on the Start Menu and/or Desktop.
My problem is that I don't really understand what the Application Reference is and how my application is actually deployed onto the target machine after setup has finished...
Given that I don't seem to have an EXE file after running Setup, I need another way of telling App A to fire App B, because I'm guessing I can't use my Shell command anymore?
Unhandled exception has occured in you application. if you click continue, the application will ignore this error attempt to continue. if you click Quit, the application will close immediately Access to path "C:Program FilesRipplEsoftwareMy Product[code]...
I am trying to create a windows service that sits in the background waiting for programs to be started. When the programs start I want to be able to check a unique bit of information for each program (I believe GUIDs may provide this) to see what the program is. If the program is not allowed, I aim to provide a warning to the user and possibly close the program. The aim of the application is to identify when users are attempting to install additional software on to the computer so simply monitoring for a certain executable wouldn't work as msiexec is called for all MSI's and as I only want to stop blacklisted programs...this wouldnt work
We have service developed in Visul Basic .NET. This service utilizes some COM objects provided by SAP to access SAP database. This has been working fine till yesterday. On this Sunday, we upgraded the SAP system, and subsequently all other programs were also re-builded using the new DLL files (for the COM object). We tried doing the same for the service also. But it is not starting now. When started, it shows a message saying service terminated unexpectedly. This is probably due to the fact that it is not able to load the requisite DLL file.
I have a WCF service, which I can open and close by doing:[code]The problem with this is I have "downtime" of the service in between myService. Close() and newService.Open(). if anyone tries to connect while this is happening it fails. how can I make the "downtime" as small as possibel?
I have written a simple folder backup program which, if started with a /s switch (argument), will run "silently" and perform an unattended backup. The obvious way to start the program with the /s switch is from a batch file, which then runs as a Windows Scheduled Task. I would like to create the batch file from the program itself, when it first runs, as it can then write the value of "Application.ExecutablePath" into the batch file follwed by the /s switch.
So, the question is, where best to save the batch file without running into Vista/Windows 7 permission problems? Is the local application data folder suitable?
Bear in mind there are three parts to this: my vb.net app needs first to create a batch file somewhere without permission issues, that batch file needs to be accessible to Windows Task Scheduler and then, when the batch file is run, it needs to start an .exe which is most likely in the "program files" folder.
I decided to explore deeper into how blank forms and controls are created.I don't know where to start. I'm not expert by any means I believe I just now the basics.I tried and start new project but instead of windows form template I used Blank Project. Added a module and creating sub main.I created a new class and copied few lines from a previous project and it gave me several errors.Brushes, Color, Font, Graphics are not defined. I am not sure if it's correct but when I added System.Drawing Reference and System.Drawing Namespace the errors was removed.Moreover, 'My' is not declared.
I would like to know what basic references and namespaces I need to add.(Note: I tried to add all the referenced and namespaces found when I create a windows form project but the errors was not removed)Moreover, how to create my own form and controls.
I'm a bit confused when it comes to setting the start location of a form, relative to another form.I know how to set the start location for a form, however, I have a "main" form, which is behind this form. The main form will be displaying different images, labels, ect. I need the second form to display at the bottom of the main form. The main form's resolution is 800x600, and the bottom form is 800x65. I tried to set the bottom form's location to 0,535, which WOULD make it right at the bottom of the main form, but it seems that it puts it at that location relative to the user's display resolution.So basically, I just need help with getting this form to appear at the bottom of the main form. I read a bit about "containers", but am not sure exactly if they would work for this, and if they did, how exactly I would incorporate them into my situation.
I have a user interface with pushbuttons, each starting a different process. Can I manage these pushbuttons via usb numpad? i.e. if 1 is pressed at numpad, pushbutton 1 will be clicked (so process 1 will start); if 2 is pressed at numpad pushbutton is 2 will be clicked and so on.