vb.net

Sending a string with sockets (not so easy!)

Hello. I am using Nektra's Deviare to hook winsock's send method calls. My ideia is to learn to also send messages through the same socket than the original application. So what I'm doing is when i detect the first call to send message, I save the socket id(the first argument of the send function), so I can use it later. So here is my c...

setting title of msgbox?

is it possible to change the title of the msgbox in vb.net? ...

Vb.net Visual Studio 2008 log4net multiple modules, same app.config different loggers, dont work

I have 2 console apps projects in the same directory but different projects. There is some common code in the App_Code directory and a common app.config which gets build into seperate .exe.config files. One module (VScanDemonStarter) starts up and writes to one logger with its own appender going to a seperate file. It uses an process.s...

I need to round a value up in vb.net

Hallo I,m developing a debt calculation program 'my problem is when i have to calculate the months to pay back the debt it comes to 28.04 and i have to get it to 29 can some one pls help me out. Thank you in advance my code looks like this: Dim b, SubMtP As Integer Dim outsUm, si outsUm = TextBox1.Text SubMtP = Forma...

Different ways to declare VB variables?

I'm new to VB.NET programming. What I'm confused about is the different ways one can declare a variable. Would someone please explain the difference between the two declarations below? Dim sqlcommand As MySqlDataAdapter = New MySqlDataAdapter(sql, db) And: Dim anotherSqlcommand As New MySqlDataAdapter(sql, db) ...

How can I get an specific row or cell value from a DataColumn object with no using a DataGrid?

This is the code I have: Sub Main() Dim dts As New DataSet Dim da As New SqlDataAdapter Dim SolTabla As New DataTable Dim Columna As New DataColumn Cnx As New SqlConnection("Some Connection String") Dim vsql2 = "SELECT * FROM Table1 where code = '" & value & "'" da = New SqlDataAdapter(vsql2, Cnx) da....

is it possible to center text in a msgbox?

is it possible to center text in a msgbox in vb.net? (similar to the < center> in html) this is not centering itself: MsgBox("Thank you for using Eyes At Ease" & Chr(153) & vbCrLf & _ "You can always access this screen by clicking on the icon in your taskbar" & vbCrLf & _ "To adjust the Hue and Saturation ...

What is the best approach to populate a masterpage control which is dependent on the content page?

I have a master page called SampleMaster.master and this page contains a Repeater control The Repeater control will be used to display the relevant tags associated with each content page and the tags will vary between content pages The data extraction method Tags.GetTags() is working but I do not know the best approach to populate the ...

How to perform in-house test performance for .net application ?

Hello my friend is currently development an application using SOA Architecture, He sent me a picture with a lot of layers (10 almost) and he is worried about performance issues, the application is development on VB.Net 2.0 & 3.5 (some libs). He can't understand english, I try to do my best trying to helping him, but I think is time to ge...

Can AllocHGlobal allocate more the 2GB of memory?

I have resorted to using the Win32 API calls VirtualAlloc/VirtualFree to allocate and release memory blocks greater than 2GB in size. I should be able to use the AllocHGlobal function from the System.Runtime.InteropServices.Marshal class to do the same. However, the following code gives an arithmetic overflow exception (note the explic...

Are there any tools to build ASMX proxies from server side assemblies?

We have a set of assemblies which implement web services operations. To build the client proxies, we first build and deploy the web services (assemblies and ASMX files) on the server. Then we use wsdl.exe to point to the ASMX endpoints and generate the classes for the client proxies. I've seen that it is possible to create the proxies...

How to get output parameter of sql in codebehind

hi guys, My stored procedure is like this. ALTER PROCEDURE [dbo].[GetImagesByDesignId] @DesignID bigint, @RegID bigint, @PageIndex INT, @NumRows INT, @ImageCount INT OUTPUT AS BEGIN SELECT @ImageCount=(SELECT COUNT(*) FROM DocManagement where DesignID=@DesignID and RegID=@RegID)...

Is there a way to escape root namespace in VB?

namespace ConsoleApplication1 { class Program { static void Main(string[] args) { System.Text.MyCustom mc = new System.Text.MyCustom(); } } } namespace System.Text { public class MyCustom { } } How do I do this in VB, while having a root namespace in the application, is this possib...

Initializing System.Array?

Why does Visual Basic compiler complain? Dim finalArray As Array = New Array ...

Manipulating the Split Function for two arrays

Hello all, I had a question regarding the split function used in Visual Basic. As of now I have written a function that brings in a string value. The string value returned will probably look like this "List1;List2; Field1,Field2". My goal is to use the split function for this string to put all the lists in one array and to put the field...

How do I change the value of a checkbox in a DataGridView

I have appended a column of checkboxes to a DataGridView using the following: Dim chk As New DataGridViewCheckBoxColumn DataGridView1.Columns.Insert(0, chk) How do I change the checked state of a particular checkbox? I have tried using the following code: Dim val2 As DataGridViewCheckBoxCell = DataGridView1.Item(243, i) val2.Value =...

Copy Merge fIelds From one word document to another in VB.net

Hi, I'm editing a vb.net app for a mate and part of the requirements are to copy merge fields from one word document to another. I can copy them across using document.content.text but they come out as text (should've figured this i guess). I think i've got them selected by: Dim tDocFields As Microsoft.Office.Interop.Word.Fields tDocF...

Build Machine Configuration Recommendations?

We have a new build machine to start using for our programming team. We are still trying to figure out how we want to organize everything to get the best configuration for building EXEs and DLLs. We are using VB6 and VB.Net 2005, and VSS2005. We were thinking of making working folders set for each project, release and support tickets. ...

String.Format Question

MSDN provides a digit placeholder example: 1234.5678 ("#####") -> 1235 I found this confusing (I expected 1234 or something), so I wrote this snippet in C# to test it: Console.WriteLine(String.Format("{0:#}", 1234.5678)); Console.WriteLine(String.Format("{0:#####}", 1234.5678)); Console.WriteLine(String.Format("{0:#}", "1234.5678")); Co...

Is there a way to define an implicit conversion operator in VB.NET?

In C# you can use the implicit keyword to define an implicit user-defined type conversion operator. In VB.NET you can define a CType conversion operator that will explicitly convert a user-defined type into another type. Is there a way to declare an implicit conversion operator in VB.NET? I can't seem to find any information on this.....