vb.net

How do you save and retrieve a Key/IV pair securely?

I'm using VB.Net's RijndaelManaged (RM) to encrypt files, using the RM.GenerateKey and RM.GenerateIV methods to generate the Key and IV and encrypting the file using the CryptoStream class. I'm planning on saving this Key and IV to a file and want to make sure I'm doing it the right way. I am combining the IV+Key, and encrypting that w...

Automating Visual Studio 2010 from a console app

I am trying to run the following code (which I got from here). The code just creates a new "Output" pane in Visual Studio and writes a few lines to it. Public Sub WriteToMyNewPane() Dim win As Window = _ dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput) Dim ow As OutputWindow = win.Object Dim owPane As OutputWind...

How to pass data from VB.NET to ActiveX.exe?

I've created a MAPI Wrapper in VB6 and compiled it as an ActiveX.exe so I can use it in my VB.NET project. The project is a windows service that takes data from a webservice passes data to activex.exe and it creates public folder records in exchange 2003. I was wondering if anyone know how I could pass a collection to my activex.exe? ...

curly brackets in url will not pass through validation vb.net

i have this url, http://www.poer.com/oneup.htm?zip={zip}. I need the {zip}, because in my code, when this page opens, I replace the {zip} with a zipcode say 10001. But in aspx, when i put validation for that txtbox, it wont let the {} pass through. This is the validation - ValidationExpression="http://([\w-]+.)+[\w-]+(/[\w- ./?%&=]*)?" ...

Adding a Way To preserve A Comma In A CSV To DataTable Function

I have a function that converts a .csv file to a datatable. One of the columns I am converting is is a field of names that have a comma in them i.e. "Doe, John" when converting the function treats this as 2 seperate fields because of the comma. I need the datatable to hold this as one field Doe, John in the datatable. Function CSV2Data...

Single Sign On with 3 applications

I'm building three web applications in .NET that will all share a users database and login information. Lets pretend that application 1 is the "parent" application and applications "A" and "B" are the "child" applications. All users have to be logged into application 1 to have access to applications A and B. Authorization, Authenticatio...

VB .Net - Reflection: Reflected Method from a loaded Assembly executes before calling method. Why?

When I am loading an Assembly dynamically, then calling a method from it, I appear to be getting the method from Assembly executing before the code in the method that is calling it. It does not appear to be executing in a Serial manner as I would expect. Can anyone shine some light on why this might be happening. Below is some code to...

get data from a querystring

i have this querystring that shall open up my page. http://www.a1-one.com/[email protected]&stuid=123456 Now when this page loads, on page_load, I want to pick up email and stuid in two different variables. So I can use them to insert into my database (sql server) how can this be done in vb.net ...

XML Import how would you do it?

XML is used as one of our main integration points. it comes over by many clients at a time but too many clients importing at the same time can slow down our database to a crawl. Someone has to have solved a problem like this. I am basically using VB to parse through the data and import what i want and don't want. Is there a better w...

How to Loop through LINQ results (VB.NET)

I've got some code to try and loop through LINQ results, but it doesn't seem to be working. HERE'S THE CODE Public Sub ProcessRequest(ByVal context As System.Web.HttpContext) Implements System.Web.IHttpHandler.ProcessRequest ''# the page contenttype is plain text' HttpContext.Current.Response.ContentType = "text/pla...

How to export image from Air app directly into a powerpoint slide programmatically

Apologies if this has been answered before or if it's too obvious - pointers are greatly appreciated if this is the case. What I'm trying to do: 1) have a way to save / copy screenshot from an Air app 2) automatically paste such screenshot into a new powerpoint slide in the current presentation I have part 1 down but have no idea on ho...

How to create Web services and link it to Smart device Application?

I am a fresh graduate and hired to develop Smart Device Application.They use Data logic Memoir with windows CE 5.0. Even though i have novice skills in programming in vb.net,I just finish my project and applications for Data logic memoir wherein the data has been save to text file or SQL compact server database in the Handheld Device a...

How to implement the Facebook "Like" button for my website

I am trying to implement facebook like button on my website. The first four lines in the code is already there on my site after the end of the "" tag. To implement the "Like button" i have added the second script (Line five to the end) and ran the application. Its giving me an error as "Microsoft Jscript runtime error:'_onLoad' is nul...

Events executes in current thread or in a new one

When an event is raised does the handler executes in the same thread as the main program or in another thread?. Thanks !! ...

VB.NET 2008, Windows 7 and saving files

Hello, We have to learn VB.NET for the semester, my experience lies mainly with C# - not that this should make a difference to this particular problem. I've used just about the most simple way to save a file using the .NET framework, but Windows 7 won't let me save the file anywhere (or anywhere that I have found yet). Here is the code...

Generate code from SPs using codesmith or MyGeneration?

I have CodeSmith and MyGeneration tools. I have SPs in SQL server. I want generate VB.Net code for SPs (not for Tables). Which templates will support for this? Please share if you know any templates that generates VB.net code from SP?. ...

Holding value in collection

I have a application which is on timesheet. I have total of 54 columns out of which 10 columns are visible rest invisible. First 3 columns are Project, MileStone and Classes. Rest are Sun- Sat work hrs, TaskId, TaskDesc and so on for each day. On my grid only first 3 columns and Sun - Sat work hrs are visible, rest are invisible. Thes...

Maximized MDI form behavior

My program shows some browser. From a browser user can open maximized MDI form with some report. When user is closing the report, first MDI form with browser is became maximized. 2 forms have same MDI parent. Can I change this behavior to leave my first browser form without maximizing after second report closed? ...

How can we expose a .NET public const to COM interop

For historical reasons, we need to expose string constants in .NET through COM interface. We managed to expose ENUM but we can't find a way to expose string const. We try the following code : <ComClass(ComClass1.ClassId, ComClass1.InterfaceId, ComClass1.EventsId)> _ Public Class ComClass1 #Region "COM GUIDs" ' These GUIDs provid...

How can I save a bitmap as a .CUR cursor file using VB2008 ?

Hi Stackers In my VB.NET program, I need to save a bitmap as a .CUR cursor file. BitMap.Save provides facilities to save as .BMP, .ICO etc e.g.: (*) MyBitMap.Save(MyFileName, ImageFormat.Bmp) (*) MyBitMap.Save(MyFileName, ImageFormat.Icon) but not as a .CUR cursor file. How can I do this please ? TIA Patrick ...