vb.net

VB.net Hexadecimal to 8-bit unsigned array

I have a hexadecimal value 07A5953EE7592CE8871EE287F9C0A5FBC2BB43695589D95E76A4A9D37019C8 which I want to convert to a byte array. Is there a built in function in .NET 3.5 that will get the job done or will I need to write a function to loop through each pair in the string and convert it to its 8-bit integer equivalent? ...

convert amp; to & and ?F to Degree F in Vb.net

Hello, The XML String I am getting from other application is converting & to & and 0F to ?F etc. I am loading the XML string into XDocument and inserting into db using linq. Is there any easy way to replace those characters with actual ones. thanks ...

changing default file location for vb.net

i would like to be able to set the change the default file location. for example if i do a filestream on a "file.txt", i want it to look by default in the desktop. is there somewhere in the settings of vb.net express 2008 where i can change this default location of working with files? ...

How to write my own Global Snippets program with .NET?

I want to write my own global snippets tool for Windows XP and higher. This would be an always running in the background tool that would pop-up on a globally-defined hotkey, allow me to select a snippet with substitution arguments, and then paste the expanded snippet into the text input of whatever control I had been in when activated i...

c# create thead and tbody

Can anyone tell me how to dynamically create thead tbody tags in my c# code? private void MakeTable() { Table tb = new Table(); TableRow tr = new TableRow(); TableCell td = new TableCell(); td.Text="hello world"; tr.Cells.Add(td); tb.Rows.Add(tr); } Thanks ...

setting differnet areas of form to be clickable

i have a form that looks like this: i need different areas to execute different code, just as if there were buttons. how do i set areas of the form to be clickable in vb.net? ...

setting form to look like this image?

is it advisable to play with the controls to make my form look like this or should i just use this graphic and place it in the background. if the former, then please suggest which controls on the form i can tweak to make the form look like this? ...

checking if a mouse was clicked in a specific area

how do i check if a mouse was clicked in a specific coordinate plane on the form"? ...

Converting C# knowledge to VB.NET any potential problems?

I have a team with people that are quite comfortable in C# but we got a requirement to write a project in VB.net. How hard would it be to think in C# and on the fly convert to VB? Is that doable? Could you list the issues that we can come across? I heard that VB.net doesn't have closures. Is that still true for .net 3.5? ...

how can i see output of Console.Error.WriteLine?

in vb.net i have some code that looks like this: Imports System Imports System.IO Imports iTextSharp.text Imports iTextSharp.text.pdf Public Class Form1 Public Sub New1() Directory.SetCurrentDirectory("C:\Users\alexluvsdanielle\Desktop\") '" Console.WriteLine("Chapter 10 example 10: nested PdfPTables") Dim...

Porting VBA to VB.NET: function parameter is possibly multidimensional array

I am porting Excel VBA to VB.NET. I have a function that takes a selection of data, and it may be one dimensional or two. VBA code is quite fluid about using a variable as either a 1-D or 2-D array, but VB.NET marks it as an error. Here is the reduced code: Public Function Stat(ByVal Data As Range) As Object Dim Y() As Object D...

How to use Where clause to match DateTime condition

Below query works fine for me until I apply Where condition for Hour with attribute Id = '06/02/2009 12:00CDT'. I need to get the max temp for today's date only, and I am not able to use the Where condition in the date field. Any ideas on what I am doing wrong? Dim document = XDocument.Load("c:\meridian.xml") Dim wind_gusts = From cou...

Exception not caught

This code used to work but doesnt any more. i used a breakpoint, and after this line: Dim jpeg As Image = Image.GetInstance("test.jpg") it just does not execute anymore code. Imports System Imports System.IO Imports iTextSharp.text Imports iTextSharp.text.pdf Public Class Form1 Public Sub New1() Directory.SetCurrentDirect...

Using ELMAH with ASP.NET MVC in VB: Compiling: Elmah does not have a strong name

I've read through the posts and code for passing ASP.NET MVC HandleError errors to ELMAH and converted the code to VB: Imports System Imports System.Web Imports System.Web.Mvc Imports Elmah Public Class HandleErrorAttribute Inherits System.Web.Mvc.HandleErrorAttribute Public Overrides Sub OnException(ByVal context As ExceptionC...

Paging not working in asp.net gridview inside AJAX updatepanel

Hi, I have an asp.net gridview that is originally bound to a sqldatasource control, but when the user presses an external button, it instead gets the contents of a datatable rather than a SQLdatasource control. I therefore had to write code in the PageIndexChanging event of the gridview to allow for paging. My code is as follows: Pro...

VB.net Windows Service not installing

Hello, I have created a Windows Service in VB.net for building xML from a database. I need to install it in my machine. I have followed all the steps as shown in http://support.microsoft.com/default.aspx/kb/816169 When I right click on setup project and click install it opens the installation wizard and after hitting the next buttons it...

List All Folders in Directory

Can't seem to find a way to do this, google is failing me! Please help, thank you! ...

Trim last 4 characters from string?

How can I trim MyString to be MyStr? Thanks, google failed again :( ...

How to write a Date Code In vb.net?

VB CODE. dteFrom = Format(CDate(Year(Date) & "-" & Month(Date) & "-" & "01"), "yyyy-mm-dd") dteTo = Format(CDate(Year(Date) & "-" & Month(Date) & "-" & DaysInMonth(dteFrom)), "yyyy-mm-dd") I copy this code in VB.NET, It showing error (of Date) dteFrom = Format(CDate(Year(Of Date)() & "-" & Month(Of Date)() & "-" & "01"), "yyyy-mm-dd...

autocad in vb.net

Hi, I am trying to create a software in vb.net that can read autocad files and get the dimensions out of it. How can i do that. If anyone can help me it will be very helpful and will really appreciate them. Thank you ...