One of the buttons in my application maps a network drive.The code for it works fine when I run the application normally, but when I do a RunAs with other credentials, it does nothing. [code]
I found on msdn samples and modified (add Thread.GetDomaind.UnhandledException)
<SecurityPermission(SecurityAction.Demand, Flags:=SecurityPermissionFlag.ControlAppDomain)> _ Public Sub Main() ' Add the event handler for handling UI thread exceptions to the event.[code].....
I have made an application in VB.NET.The Button click codes are working fine. I have made a small modification in the code. I have commented the line 'Me.Close'But still my form gets closed. I think the application is executing from elsewhere.
When i run this code to get results from yahoo or google it does not work and it says that that ids not there but it always is."Object reference not set to an instance of an object."
Public Class Form2 Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles
I have written a short piece of code to validate a UK NI number. The format is 2 upper case letters, followed by 6 digits followed by A,B, C or D. This code does not work, it never matches even when the string NI_Num is OK: [code]
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) If WebBrowser1.DocumentText.IndexOf("FAILED LOGIN") > -1 Then
[code]....
Now the number 40 shows up in the web broswer so why isnt the ELSE showing the message box saying Login OK and the others?
I got the following code from net,its working sometimes but sometimes not working, why?Its not showing the video by every click of the button Preview.I want some better code which will work smoothly and will show the video by every click. [code]
i am trying to make it so that when you are typing a url into the url box on my web browser, you can click enter to search like on comercial browsers instead of having to click the actual search button, im trying to do the same with the web search(google, bing, yahoo!). it worked before, but i've added a tab system to the browser and now it's not letting me click enter to search.
my code:
Private Sub urlgo_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles urlgo.KeyDown If e.KeyData = Keys.Return Then CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate(urlsearch.Text)
[code]OK here is the problem, it does not send the email on any of my 2 computers. No firewall, No Anti Virus. I don't know if there is an error in this or what? All the other code works fine, except for this emailing part.
I have two DDBBs, one table (basic table) with basic data and another one (city table) with a list of cities and a code for each city. I want to add the city code into the basic table. The problem is that I am showing on the webpage the name of the city, no the code... but I am not able to get the code that I want to save into the basic table.
I want to convert the code at Webcam using DirectShow.NET to C#. It works perfectly in vb.net. I tried converting using an online converter, however I got about 30 errors
I have a database in sql server 2005 named as Addressbook and table Persons with PersonID as PK.I have created 4 textbox on form for FirstName, LastName, Address, CityID and an ADD button. When I input data to text boxes and press F5 then it show some error message. I hv tried eerything but failed.My code is as following and error messae is (The SqlParameterCollection only accepts non-null SqlParameter type objects, not Boolean objects.)[code]
I have this code to get images width and height from header file without full loading the image..I convert it automatically from C# to VB.NET by [url]....The source C# code here:http:[url]....
Now I need this code to work with .net framework 2.The code doesn't work after converting even with .NET 3.5
I wrote a custom installer that installs my software as well as sql server express 2005 on a pc. Now the client needs it to install on 64 bit pc's as well. It worked well on 32-bit but I had hard coded the install path of sql server as:
[code]...
this works on a 32 bit pc. But on a 64 bit I want it to detect the Program Files(x86) folder.How can I do this reliably?
I am using VB 06 code for MS winsock and no im not supprised its not working properly but I cant find any tutorials anyware for VB 08 and its starting to anoy me. I have managed to reorginise some of the code so it works but im at a loss to know what to do to correct these errors. .
my Hangman Codes aren't working and i'm stuck at the part where it searches the word to see if the letter/word is in the word to guess and then i would like some pointers on how to go about making this D**n thing work.Here's the code i got so far.'I Know that i have some things in here twice and in different ways but that's because one didn't work so i tried another and that didn't work either i had them annotated out for debugging'
Public Class Form1 Dim strLetterGuessed As String = "" Dim strWordGuessed As String = ""
[code]....
View the attachment to see what the form looks like. 'The red stuff was added after the screen shot using Paint'
Basically, what I'm doing is navigating to a website with a backgroundworker.In the WebBrowser1_DocumentCompleted event, I put code to fill in a form and I set the value of a boolean called "formFinished" to true once the form has been finished and submitted. The problem I'm having is that it only posts data to the second website, no matter the order of the websites. I'm wondering how this is possible since I have a boolean in state which only gets set to true once the first form has been submitted. So I have no clue as to why it only submits the second one, but not the first one.
I am working on serial key. but i have set everything but i dont know the code for combo box like i have list of stuff example John admin jonny goodmnan
So when people select this name then the phone number should appear on the textbox
like this John adam 1234567890 should appear on the txtbox
I dont know any code to show thats why i dont have any idea what to add the phone numbers
I'm currently starting work on my first windows service and I've encountered what I find to be a strange error. For some reason the compiler is telling me that a whole bunch of typical classes (such as Image, Bitmap, Graphics, etc) do not exist. For example, these simple lines of code, which work perfectly in a normal project, return a bunch of errors:
Bitmap b = new Bitmap(destWidth, destHeight); //Error 13 The type or namespace name 'Bitmap' could not be found (are you missing a using directive or an assembly reference?) Graphics g = Graphics.FromImage((Image)b); //Error 17 The type or namespace name 'Image' could not be found (are you missing a using directive or an assembly reference?)
Does automatic software update causes some of the module property not to work? They are basically the same function that reads image logo from the currently executing assembly. Function named "Get2LogoImageStream" is different from "Get1LogoImageStream" by just Current.ManifestModule.Name vs Current.ManifestModule.ScopeName.
This "Current.ManifestModule.Name " version of the code worked on both Web From app and Windows form app, however right now it only works for Windows App form. But when I changed this code "Current.ManifestModule.Name" with "Current.ManifestModule.ScopeName" and it worked on WEB without any problem. So my questions to fellow C# or VB.NET developers is that does automatic software update causes this kind of issues?
I am working on an OpenGL Visual Basic 2010 Express project using Tao.dlls.My computer has crashed a few times while I was last working on my code.Since then There has been some side effects such as intelisense and autocomplete not working when I load the project, even after checking the options and settings for them.When I start a new project on the other hand the features work again.Also when this OpenGL code is run:
Code: glutMotionFunc(AddressOf MouseMotionGUI)
I get:
BadImageFormatException unhandeld An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
This code was working fine before my computer crashed and probably corrupted some files.
I have a Excel - VBA problem that I can't seeem to get around. I have written some code to search through excel sheets and return the values it finds. The code is written in a module, and when I run it by clicking the play button at the top of the VB editor it works perfectly.
However I have noticed that I need to link it to a button (on_Click) in sheet1, I have tried copying the code into the button sub, it throws up an error: "Method 'Range' of Object '_Worksheet' Failed" When it gets to the 'UpCount' line. This piece of code steps across a worksheet and when a "y" is found it copies the values form a cell at the top of the worksheet (which uses the upcount formula as the cell to be copied changes), and then it also copies some values to the right of the cell containing the "y" value.This code all worked fine when it was ran from the module2 window using the play button a tthe top of the VB editor page, it is just now it is attached to the commandbutton I am experiancing problems!
Sorry I use ActiveCell as I don't really know how to use anything else! And being new at the coding game it helps me to 'see' what is going on..
I have the following code in my application and the code works fine in Windows 2000, XP but for some reason does not work in Windows Vista, is someone able to help me with this?[code...]
I have the following code in my application and the code works fine in Windows 2000, XP but for some reason does not work in Windows Vista, is someone able to help me with this?
dim myReg as string = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINESoftwareMyCompanyMySoftware", "Path", Nothing)