vb.net

Calling C# code from VB.net code

Hi all This is my c# code in some Dll using System; using System.Collections.Generic; using System.Text; using Microsoft.Win32; namespace LP_Misc { public class LP_Registery { LP_Registery() { ReadMyTestRegKey(); } public void ReadMyTestRegKey() { RegistryKey r...

Can Objects in Objects be persistent? (vb .net)

Hi*, Dim BigCollection As New Collection Dim SmallCollection As New Collection SmallCollection.Add("Hello World") BigCollection.Add(SmallCollection) MsgBox(BigCollection(1)(1)) 'shows "Hello World SmallCollection.Clear() MsgBox(BigCollection(1)(1)) 'ERROR (Collection is empty) I want that once I put something in the BigCollection it ...

Current Directory of a VB.net Windows Service

Hello, For some reason the Current Directory of my windows service is C:\Windows\System32 and when I schedule my service I get this error Access is Denied. In one of the blogs I saw this peice to change the current directory. But I am not sure where to place this code. Thanks System.IO.Directory.SetCurrentDirectory(System.AppDomain....

COM DLL problem

Hi I have VB6 Dll which I am referencing in vb.net ,I am calling the following function in it. It working fine in developemnt environment but not in deployement environment. Error : Method not found: 'Boolean MyUtils._MyUtils.LoadMyObjectRecords(ADODB.Stream ByRef, System.Array ByRef)'. waiting for your valuable thoughts Thank you...

How to get URL of file on a different drive from the ASP.NET application?

I have a server with a C: drive and a D: drive. My ASP.NET application is on D: drive as follows: D:\inetpub\vhosts\mywebsite.com I want my application to read and download files located on C:\sessionVideos\ My problem is how do I create an URL pointing to the "C:\sessionVideos\" folder? Thanks, James ...

DotNet DateTime.ToString strange results...

Why does: DateTime.Now.ToString("M") not return the month number? Instead it returns the full month name with the day on it. Apparently, this is because "M" is also a standard code for the MonthDayPattern. I don't want this...I want to get the month number using "M". Is there a way to turn this off? ...

Closing a modal popup from vb.net?

Hi, I want to wait for and close a modal form (a popup) from another application, as soon as it appears. I want to do this from VB.NET, but suggestions in C# should be easily translateable. I can hard-code the modal popup's caption in my app, since it's long and unique. What I want to do is simulate either the user clicking on the close...

Why does this program *NEED* MsgBox?

Long story short: I'm trying to write an app that'll dump IE's history to a text file. Because I am lazy, I went searching for a preexisting library and found this beautiful project to build from: http://www.freevbcode.com/ShowCode.asp?ID=6702. Only, I'm stuck... I finally got the program to dump the history, but it ONLY WORKS if I pu...

VB.NET to C# - my.computer.getfiles()

What is the equivalent C# code for this VB.NET code? My.Computer.FileSystem.GetFiles(....) ...

vb.net: is it possible to comment out more than 1 line of code at a time?

i know in java and other nice languages it's possible to comment out a bunch of lines at the same time. is it possible to do this in vb.net? ...

Does having a theme for a GridView prevent changes to a row's backcolor property on RowDataBound

I'm trying to change the backcolor of a .Net GridView when a certain condition is met. This should be fairly straight forward, but the color change isn't happening. Checking the rendered HTML shows absolutely nothing different in the effected rows even though the text change on the link is happening as expected. There is a default theme...

vb.net: rounding to next whole number

if i have an integer a_variable = 1.1 how do i round it up to 2? ...

Multidimensional Associative Arrays in VB.NET?

Hi, is there in VB.NET something like this in php?: $var["a1"]['name']="Mike"; $var["a1"]['nick']="MMM"; I tried hashtables, dictionary, lists and arrays in .net, all I could get is a simple key=>value array Is there a simple solution if not, is there a class or something for this? Thanks. ...

Setting a date/time to a date time picker in .net 1.1

Hey Everyone, I have a datetime picker in one of our apps. When loading up the win form I need the date time picker to default to the Wednesday following todays date. Any idea how to do this? We are using .Net 1.1 for this app. Thanks, Mike ...

itextsharp: what is the height of a regular PDF page in pixels?

what is the height of a regular PDF page in pixels? i heard it was something like this: Dim pgSize As New iTextSharp.text.Rectangle(595, 792) but i am adding an image that takes up maybe half the height, and even though pgSize looks like a full page and the image takes up only half of it, i am getting a height of like 619 for the imag...

In VB how can I use a website url to create an HtmlDocument object that contains all the html from that webpage?

I was trying to use HtmlDocument and a given url to pull in the html contents of a website to use. However there is no constructor for HtmlDocument and it's Url property is readonly. Is there any way to create an object that contains the entire DOM for a given url? Thanks, Matt ...

itextsharp: getting coordinates of image

in vb.net is it possible to get the coordinates of an image like if i do a document.add (jpeg_image) x_coordinate = jpeg_image.xcoordinate??????? ...

itextsharp: getting height of image

i need to add a data table right after an image on a PDF in vb.net last_pos=jpg2.height datatable.WriteSelectedRows(0, -1, xpos, last_pos, writer.DirectContent) unfortunately this is the output: i highlighted broccoli, buckwheat, butter, cabbage. these are all part of a data table that is supposed to go after the bottom SEVERE word bec...

itextsharp: how to move the datatable?

as you can see my data table is a little too much on the right, how do i move it more to the left? please include answer in vb.net ...

Monitoring data in/out of the computer via vb.net

I want to create a bandwidth meter for Windows using vb.net, but I cannot seem to find anything in the .net framework for monitoring the amount of data in or out. I want to create this because I cannot find a good one for free, and I think it is something that people might want. If there is nothing in the .net framework for monitoring t...