lock statement in vb.net
Is there analogue of lock statement from c# in vb.net? ...
Is there analogue of lock statement from c# in vb.net? ...
How do I get the position of the XML element in this loop? For Each objNode In objDoc.SelectNodes("//books/book") ??? Next What I want in output would be something like 1 2 3 4 .... ...
I have a form with an OleDbConnection object on it. This form fails to load in the Form Designer with the message: One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. Invalid authorization specification ...
Possible Duplicate: Anonymous class initialization in VB.Net Trying to convert examples like this from C# to VB.Net leaved me scratching my already bald head...: public ActionResult GridData(string sidx, string sord, int page, int rows) { var jsonData = new { total = 1, // we'll implement later page = page, recor...
I have a gridview button that I programmatically created and I want to load an update panel on the client side with the sent data. I have a hidden value field that gets its data on the click of the gridview button and the dropdownlist in my updatepanel depends on that value. ...
I am using file.readalllines to read the file into a string, then using listbox.items.addrange and splitting by vbcrlf to insert the items. Is there a way to reduce the lag it causes for loading huge lists? ...
I am trying to do something similar to this sample code from Phil Haack to VB, and LINQ Orderby is giving me problems - and I can't figure out how to do this. Entire method posted for completenes. This is the C# version: public ActionResult DynamicGridData(string sidx, string sord, int page, int rows) { var context = ne...
Is there a way you can do this ? I would like to have a collection class of T that would be able to do addition, substraction on the T type. I would like to keep T generic instead of having couple collections with the same code, but different types. How would you constrain the generic T ? Example: I would like to define a Collection...
I have the following VB.Net 2.0 in an ASP.Net app: output = Regex.Replace(output, "<p>(?:(?:\<\!\-\-.*?\-\-\>)|&(?:nbsp|\#0*160|x0*A0);|<br\s*/?>|[\s\u00A0]+)*</p>", String.Empty, RegexOptions.Compiled Or RegexOptions.CultureInvariant Or RegexOptions.IgnoreCase Or RegexOptions.Singleline) Example stuff it matches well: <p></p> <p> ...
I am using System.Reflection to load a type that I cannot otherwise load during design time. I need to pull all controls within a collection of this type, however, i the OfType command doesn't seem to like the reflection Syntax. here is "close to" what I got. Dim ControlType As Type = System.Reflection.Assembly.GetAssembly( _ ...
When I try to call System.IO.File.Encrypt() on an existing file, it throws a generic IOException, and the message is "Parameter is incorrect". System.IO.File.Encrypt("C:\Project\StorageDirectory\file.txt") The current user the process is running under has full control to the "StorageDirectory" folder. Is there something I'm missing...
I am trying to figure out how to set the value of the text that is displayed for each item of a list control, such as a checkbox list, but really this applies to most list controls, not just the checklistbox control. I have a checklistbox control: Friend WithEvents clstTasks As System.Windows.Forms.CheckedListBox ...that I usual...
In my ASP.NET(2.0),VB.NET Project,around 40+ Web Forms are there.The website is published to http://xxx.sg1.ihub.com/ Around 150 people are using this site inside the company From these 40 Forms ,Can I to publish one Form (Visitor.aspx) to another site http://yyyy.zzzz.com.sg to make that form to be viewed by Public (internet users) ? ...
I have a .net application that monitors the clipboard every 100ms for an image that is taken from a camera (from a different application) and displays it in a picture box. However, occasionally the program that writes the image to the clipboard gets an error saying "Can't Open Clipboard". This only happens when the .net application i...
Update: I tried to run this on a local instance of sql-server and sadly it worked!!! now I know that the code is right and there is some kind of DBA restriction I need to find (and ask the DBA to remove) Any ideas? using System; using System.Collections.Generic; using System.Text; using System.Data.SqlClient; using System.Data; na...
What I really want is to select these two tables in to an anon type like in Scott Gu's blog: here However, I would settle for this created type "ActiveLots" I am joining two tables together and want to be able to reference columns from each in my result set. I don't seem to be getting the syntax correctly. Dim pi = From p In dc.Inve...
I'm just writing a bit of code to compare an id of integer with an id of integer? for example: Dim id As Integer = 1 Dim nullId As Integer? = Nothing Dim areEqual As Boolean areEqual = nullId = id When I try to compile the code I get a compiler error: Option Strict On disallows implicit conversions from 'Boolean?' to 'Boolean'. Whi...
I know you can do it with an WMI event or overriding WndProc and looking for the right messages, but i was wondering if there wasn't something hidden in the net framework that makes this task easyer. ...
hai sir how to communicate remote system using win sock control through internet. this is possiple give example or any idea in vb.net 2005 ...
Hello, I want to send SMS by windows application. I ran the code but I got an error. This is AT OK AT+CMGF=1 OK AT+CSCA="+9460921985" OK AT+CMGS="+9660775564" this is new message +CMS ERROR: 500 I am using this code. Public Class Form2 Dim number As String = "+9660775564" ''# Dim message As String = TextBox1.Text Dim...