vb.net

DataGridView Cell Editing issue with decimal/hexadecimal formatting

I have a DataGridView bound to a DataTable that has 1+16 columns defined as Integer. The default cell style is hexadecimal 2 digits (.Format="X2"). When entering in cell editing I would like to provide to the user, the possibility to write the value in decimal or hexdacimal. Hexadecimal could be written like, for example, 0x00, 0X01,...

Is there Any Way to Set the Namespace of a Web Service in Configuration instead of Code?

Currently we're using in code <System.Web.Services.WebService(Namespace:="https://ourservice/")&gt; to set the namespace, can this be done in web.config, instead? I've looked but can't find where? VS2008, ASMX web service. ...

ASP.NET Custom Control - Template Allowing Literal Content

I want my User Control to be able to have Literal Content inside of it. For Example: <fc:Text runat="server">Please enter your login information:</fc:Text> Currently the code for my user control is: <ParseChildren(True, "Content")> _ Partial Public Class ctrFormText Inherits UserControl Private _content As ArrayList <P...

Difference between DirectCast() and CType() in VB.Net

I am an experienced C/C++/C# programmer who has just gotten into VB.NET. I generally use CType (and CInt, CBool, CStr) for casts because it is less characters and was the first way of casting which I was exposed to, but I am aware of DirectCast and TryCast as well. Simply, are there any differences (effect of cast, performance, etc.)...

.Net Linq - Doing a operation on the subset

I need to have the following : (name1 + "a") + (name2 + "a") + ... Dim separator() As String = {"|"} myString.Split(separator, StringSplitOptions.None).SomeLinq(...) I don't know what to add at the end to add an "a" to each element... ...

Date.TryParse for decimal converting date

I have string that contains "1.3" and I am checking with Date.TryParse method. It automatically converting into "1/3/2010". How to handle this? ...

Create labels dynamicly on ASP.NET (VB)

Hello, I want to create labels in my page dynamicly, for example the user will choose in a textbox the number of labels, and I will display the number of this label with .text = "XYZ". Thanks. ...

creating a static vb.net "app" that consist of a single picture

I need to create a vb.net program that consists of a unmovable, always on top bitmap, with no menu bar or anything, and does not show up in the task bar as program. It needs to always start in the same place. Essentially I need to mask a part of the screen by using a bitmap that blends into the scenery. I am not sure which properties I...

how to learn web service using vb.net

hi .. im want to learn how to build a web service using vb.net. unfortunately i couldn't find any websites that provides good tutorial.. can any one suggest a web site? thank u in advance .. ...

How to correctly filter a datatable (datatable.select)

Dim dt As New DataTable Dim da As New SqlDataAdapter(s, c) c.Open() If Not IsNothing(da) Then da.Fill(dt) dt.Select("GroupingID = 0") End If GridView1.DataSource = dt GridView1.DataBind() c.Close() When I call da.fill I am inserting all records from my query. I w...

.NET Programmatically invoke screenclick doesn't work?

Edit I've added the following code, however I get an error @ SendInput: File I/O of a structure with field 'dwExtraInfo' of type 'IntPtr' is not valid Public Sub DoDoubleClick(ByVal wait As Integer, ByVal x As Integer, ByVal y As Integer) Dim inputEvents(0) As Input Dim p As MOUSEKEYBDHARDWAREINPUT p.mi.dx = x p.m...

VB.Net code Works on IIS6 DevServer but not on IIS7 Server 2008. Failed to load viewstate.

I have an ascx usercontrol acting like as a standard createUser formular. Code is written in VB.Net 3.5 The control also has some radiobuttons with the property autopostback=true set. The Radiobuttons controls if the member should be a Company or an Individual. If a radiobutton is clicked, the formular will display or hide certain text...

Maintainging default values when importing a sql database into a vb.net application

Hello, I am trying to copy a sql database into a vb.net application however it is not maintaining the default values when I do this. Is it possible to import the default values and have them automatically assigned when creating a new row or do I have to manually assign the default values again in my code? ...

vb.net and ContextMenuStrip ?

How can I get the Y position of the ContextMenuStrip? ...

"Items collection cannot be modified when the DataSource property is set." Anyway around this?

I have a combobobox on my form, and I use the following code to populate the data from SQL Server: cbname.DataSource = DSAssetName.Tables(0) cbname.DisplayMember = "IDWLNAME" cbname.ValueMember = "FIDWID" I need the value specified in the value member for the reporting section of my app to work. This all works great a...

Is there a way to prevent an ASP.Net webapp from clearing out page variables on VB side?

I have a webapp in ASP.Net with a VB codebehind. I need a List variable I have declared to persist as long as the person is on the page, but currently any time a control posts back to the code, everything is cleared out. I am completely new to ASP.net, so I have no idea if this is even possible. Can it be done with a Session variable?...

print textbox from vb.net

I need to print several textboxes from Form on VB.net, but I do not succeeded to have more than one . It should be on different locations on my Form. Can somebody help me with a piece of code or at least a hint ? Many thanks in advance ...

Array basics - Populating with loop

Hi, I'm looping through a zip file trying to add the file name of each file within. Is this the correct method? Dim ZipNameArray(?) Using zip As ZipFile = ZipFile.Read(ZipToUnpack) For Each file In zip ZipNameArray(?) = file .FileName Next End Using I do not know the array size until I start looping through the zip (T...

Conditional OrderBy

So, right now I've got a number of columns the user can sort by (Name, County, Active) and that's easy but messy. Looks something like this... Select Case e.SortExpression Case "Name" If (isDescending) Then resultsList.OrderByDescending(Function(a) a.Name).ToList() ...

Changing SOAP Version in VS2008

Hi, In 2004/5 I built web services to be consumed by a clients partner site in VS2003 ASP.NET 1.1 VB. I have just completed rebuilding the services in VS2008 ASP.NET 3.5 VB. During functional testing from the partner site, it seems none of the services work correctly and some not at all. Yet when tested using SOAPUI or via VS2008 debug...