vb.net

Read text file into array (Storing only numerical data)

Hi all, I'm trying to read specific values from the text file (below): Current Online Users: 0 Total User Logins: 0 Server Uptime: 0 day, 0 hour, 0 minute Downloaded Amount: 0.000 KB Uploaded Amount: 0.000 MB Downloaded Files: 0 Uploaded Files: 0 Download Bandwidth Utilization: 0.00 KB/s Upload Bandwidth Utilization: 000.00 KB/s ...

How to get SQL Server CE TableAdapter to commit to database?

VS2008 project. Created local database (SSCE). Created dataset with tableadapter. Dragged dataset and tableadapter to the form so I can reference it in code. New records successfully add to the dataset but will not commit back to the database. Gives no error or clue why it won't work. TableAdapter insert statement was created autom...

Hex number (not ascii hex value) to string in vb.net

I've tried searching for this, but most people just want to convert hex values into their ascii equivalents. That's not what I am looking todo. I'm looking to see if vb.net has a simple built in function to do this: Private Function NibbleToString(ByVal Nibble As Byte) As String Dim retval As String = String.Empty Select...

Why must VB.Net line continuation character be the last one on line

Why must the line continuation character (_) be the last one on the line? Is there a technical reason for this or is this a usual Microsoft "feature"? In other basic dialects you can add a comment after it, but not in VB.net, so I'm curious as to why Microsoft decided to not allow comments on these lines. ...

Handle Click- Events of Dynamically generated buttons..?? VB.NET

HI, Am on creation of touch screen UI system.And am generating button for selecting products Under certain category. --> array of button creating dynamically And placing in TABPAGE when user selects Tab for category. The button will be created with the name of products, Under the category selected. { 'the way am creating controls. myb...

How can I disable the start menu in Windows Mobile 6.1

Hi, how can I disable the start menu! Or completely shut down the entire "explorer" in Windows Windows Mobile 6.1, so that users can not go out of my program. I have try http://pastebin.com/yz6WN6xa , but then Windows Mobile 6.1 hang. ...

How do I a embed a variable css style in a VB.NET xml string literal?

I would like to add a variable data to a string literal WITHIN the HTML tag Dim locationOfImage as string = "http://blahblah......" Dim xmlString = _ <div style="background:url(" <%= locationOfImage %> ")"> <h3>Some text</h3> </div> The above does not work, I can't quickly determine how to d...

VB.NET - AddressOf returns Nothing?

Hi, Short question: can VB.NET operator AddressOf return Nothing in any case? ...

Generating Reports in VB.NET

Dear All, I am a beginner in VB.NET. I have made a small project and now i would like to make some reports to complete the project. Can anyone please tell me as to how i can work with reports in VB.NET. I want to retrieve data from SQL Server 2000 using Stored Procedures and generate a report in VB.NET. Thanks, George ...

Switch form to Modal after it is open?

If I have a form open already that is not modal, can I turn it modal by the click of a button on that form. ...

Whats the deal with delegates?

I understand delegates encapsulate method calls. However I'm having a hard time understanding their need. Why use delegates at all, what situations are they designed for? ...

asynchronous threads and anonymous delegates

Ok, now I can use 2 techniques to launch my threads: Dispatcher and BackgroundWorker. Dispatcher: ' I launch the asynchronous process Dim a As New Action(AddressOf operazioneLunga) a.BeginInvoke(Nothing, Nothing) ' I update the GUI passing some parameters Dim a As New Action(Of Integer, String)(AddressOf aggiorna_UI) Me.Dispatcher.Beg...

Report Viewer in VB.NET 2005

Can anyone please help me with the code as to how i can use stored procedures with parameters to retrieve data and display it in a report viewer in VB 2005. Please help me with the connection part as well. Regards, George ...

"Collection was modified; enumeration operation may not execute" error on deployment

I'm getting this error when I deploy a VB.NET application and for the life of me I cannot figure out why. I do not get this error when I run the app from the IDE and the test machine I am deploying it to has a similar configuration to the dev machine...Windows 7 & .NET 3.51 SP1 and 4.0. The app bombs out when the main form is loaded af...

Is a hashset needed for contains with List(of String) Vb.net

Would the following: Dim stringlist As List(Of String) Dim stringlisthas = stringlist.Contains("thing1") be any slower than Dim stringlist As List(Of String) Dim stringlisthash As New HashSet(Of String)(stringlist) Dim stringlisthas = stringlisthash.Contains("thing1") Is a hashset needed for contains? ...

Why does an uninitialised DateTime struct tell me it's monday

I have a DateTime struct I use, and sombody commented out the part where it was created (but not declared) When I was using it, myDate.DayOfWeek == DayOfWeek.Monday returned true. If the part where it is created is commented out, how can it tell me it's monday, instead of throwing some exception? ...

How to change the TrackBar Tick Color in Winforms?

I have a winforms app using a trackbar. The BackColor property is available for change, but doing so makes the color of each "tick" almost invisible. I don't see an explicit property to modify the color of the "tick". Is there something I am missing or a way to change the color of the tick? ...

Error registration of key for auto start application at windows startup

Hi, I took the following method to make a registry key in my setup project. When I run setup, it says Could not write value MyValue to the key MyKey. Verify that you have the sufficient access to that key, or contact your support personnel. " Please advise how to fix this. Thanks Below I have copied the code that I took from the fo...

Replacing the obsolete System.Xml.XmlDataDocument?

I have a System.Web.UI.WebControls.Xml control (Xml1) in a webforms app that I have upgraded from .NET 2.0 to .NET 4.0 I am getting two warnings from the code-behind page that I'd like to do something about. ... Dim ds As DataSet = app.GetObjects Dim xmlDoc As New System.Xml.XmlDataDocument(ds) Xml1.Document = xmlDoc Xml1.TransformSou...

Using WebRequest.Create inside RenderControl() for WebParts

I need to call a web service to receive a JSON object which I'll parse before rendering the content. Here's the code for the same: Dim jResponse As MessageResponseWrapper = New MessageResponseWrapper() 'Custom class to deserialize JSON Dim req As System.Net.HttpWebRequest req = System.Net.WebRequest.Create("http://some-c...