vb.net

Filtering SQL by correct time spans in vb.net

I have a table that has two time columns. One is a login time one is a logout time. I would like to be able to filter between the two, basically greater than the minimum selected and less than the maximum selected. I am using a monthly calendar to get me the spans of time but it is not working correctly. From there I would like to add th...

How do I resolve an error that says FredCK Editor undefined for proj visual web dev 2010?

Hello, I am trying set up the FCKEditorV2 to use in a visual web dev 2010 vb.net proj. and receiving an error stating : Element FCKEditor is not a known element. enter code here<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Edit.aspx.vb" Inherits="WebApplication5.WebForm2" %> <%@Impo...

Choose the full namespace/class/function in VB.NET

-edit- nevermind i was lucky and didnt need to change much and have this test working. I am doing a quick test and i need to choose the full path to a function. in C# i can write namespace ABC { class DEF { static string Test() { return "A test"; } } } and can access it with ABC.DEF.Test() i tried Namespace ABC Partial Public ...

Dropthings souce code in .vb

Hi All, Does anyone know of source code in .vb for Dropthings or equivalent like myMSN. I'm desperately looking to design a web portal using the same idea as Omar used for DropThings. All examples I found on the net are in C#. Thanks in advance. ...

Update the code according to Standard

Using VB.Net, C#.Net and SQL Server. Windows Application I want to separate a code for 3 Tier Architecture(Presentation Layer, Data Access Layer, Business Logic Layer). Code. Form_Load Dim cmd As New SqlCommand Dim ada As New SqlDataAdapter Dim ds As New DataSet Con = New SqlConnection("Data Source='" & servername....

Context menu items

Hi! I made context menu for UltrawinGrid, when i click right mouse button then the context menu open. This is the code that I use for my menu: Private Sub ShowContextMenu(ByVal mousePoint As Point) Dim cMenu As ContextMenu = New ContextMenu cMenu.MenuItems.Add("Delete") cMenu.MenuItems.Add("Copy") cMen...

System.AccessViolationException in wmp.dll module

I'm at a total loss of what to do. I am using an AxWindowsMediaPlayer object that is created programatically and added to the form's controls: Private Sub PlayNext(ByVal path As String) Dim wA As Rectangle = Screen.PrimaryScreen.Bounds Dim vidPlayer As New AxWMPLib.AxWindowsMediaPlayer Controls.Add(vidPlayer) With vidPl...

login form using ms access in vb.net

I'm creating a login form for vb.net using ms access 2003 as database. But it only checks for the username and bypasses the password. Meaning that if the username is correct and the password doesn't jive with the username, the user can still enter the system. Here is my code: Try Dim NoAcc As String Dim NoAccmod...

Object-Oriented Black Jack in VB.net

Alright, so I want to improve my programming and object orientation skills. I want to program a fully object oriented blackjack game in VB.net under Visual Studio 2008. The first thing I did was learn all the rules of BlackJack. I've been brainstorming about it. What (I think) I need is a Card class that has a number value and its repr...

Truncate the beginning of a log file in .NET

I have an VB.NET app that writes the status to a log file in text format. Over time, the file is getting large and I wanted to know if there is an efficient way to truncate the beginning of the file. To make things easier, I am looking to specify a file size (say 2-3 mb) and I am writing the log using a StreamWriter: Using strm As N...

Assigning Standard Names for Controls and datatypes

Using VB.Net and C#.Net. For Example Am Using More than one form If am assigning a variables like this. Dim a, b as integer Dim c, d as string This variables cannot be easily understand for everyone(other programmers). How to assign a Standard Datatype variables, Standard Variable Means (Everyone can understandable) And also Ho...

Last but one Char in vb.net String

How do I find last but one character in a vbstring for e.g. In the string V1245-12V0 I want to return V ...

Nothing, WithEvents Fields and Memory Leaks

Is it necessary to set to Nothing(in Dispose()) all WithEvents fields? Apparently Handles keyword adds handlers to such fields, but does not remove it until this field is not Nothing, and this can generate memory leaks?!. This should be specially actual on cases like class Foo { Private WithEvents _bar as Bar Public Sub New(B...

VB.NET typecasting a listview tag object

In C# i would do something like: mytype val = (mytype)mylistview.SelectedItems(0).Tag; how can I do the same thing in VB.NET? ...

Using monthcalendar control, when i select a day and use that as a filter for my SQL it does not work as expected

I am trying to use the selectionstart and selectionend attributes from monthcalendar to filter between two login dates in a table. When I chose one single day, this does not work correctly. If i chose the day before and the day after the day in question then it will. The time values in my DB are like this: 2/23/2010 11:17:01 AM Both ...

Testing string value of Nothing is equivalent to String.Empty

I have a nullable database field of type varchar. I am writing a unit test for a service method that retrieves the value of this field. The service method uses a custom DAL that returns a value of String.Empty if the database field is Null (this is desired behaviour). In my unit test, I am using a Linq To SQL autogenerated class in or...

TableLayoutPanel automatically changes my order at design time

I've created a tableLayoutPanel with 5 columns and 19 rows. I'm trying to populate it with labels. When I try to move labels from one cell to another, VB2008 changes the order of many of the other labels. In some cases, it prevents me from moving the label at all. ...

Using ELMAH and URLRewritingNet Together

I have ELMAH setup on my production server and it has done a fantastic job of letting me know about any niggles - as well as any creative SQL injection! I've decided to introduce URl Rewriting and went for http://www.urlrewriting.net/ in the end. It was nice and easy to setup and it's doing exactly what I want with the customer-facing ...

P/Invoke on x64 null reference exceptions

P/Invoke on x64 null reference exceptions I get null reference exceptions when I try to compile for x64 in .NET code that makes use of platform invocation services to call unmanaged code in dlls. Am I missing something obvious here? e.g. call to Private Declare Function waveOutOpen Lib "winmm.dll" (ByRef lphWaveOut As Int32, ByVal uDe...

Circular buffer in VB.NET

How can I create a circular buffer on the heap in VB.NET ? This would be used for audio playback via P/Invoke to winmm.dll waveoutopen and waveoutwrite to support development of a software synth. I currently use the marshall class to build a regular array of bytes in the heap. ...