vb

Getting "final" prepared statement from MySqlCommand

I have the following MySqlCommand: Dim cmd As New MySqlCommand cmd.CommandText = "REPLACE INTO `customer` VALUES( ?customerID, ?firstName, ?lastName)" With cmd.Parameters .AddWithValue("?customerID", m_CustomerID) .AddWithValue("?firstName", m_FirstName) .AddWithValue("?lastName", m_LastName) End With I have a class that handles e...

Scroll panel based on mouse position in vb .net

I'm trying to make an autoscroll enabled panel that will scroll if the mouseposition.x > panel.location.y However, I cannot seem to find a panel.scroll() function. Is there a way to programable make the control scroll? Thanks ...

Excel Report Generation using VB

Hi i am trying to generate excel report where the data is coming from access database using VB Can anybody help me Thanks in Advance ...

Converting VB Format() to PHP

I'm trying to convert a encrypt/decrypt function from VB to PHP, but I'm having problems with this part: Format$(Hex$(AscSrc), ″@@″)` Is there a way to convert that to PHP? I couldn't find how to convert the @ symbol. ...

why 1 digit random numbers are also getting generated by the following code?

Private Sub Command1_Click() Dim x As Integer For x = 1 To 100 List1.AddItem (Int(100 * Rnd())) If ((Int(100 * Rnd())) >= 10) Then Print Else End If Next x End Sub ...

Developing Fibonacci series in VB

I am trying to write a code for Fibonacci series in VB, but some of the values in my series are incorrect. Can somebody help me with the code? Below is what I have so far. Private Function FibNumber(number As Integer) As Integer If (number > 2) Then FibNumber = (FibNumber(number - 2) + FibNumber(number - 1)) Else FibNumber = ...

VB6 File Opening

I want to open a file on my VB6 application by pressing a command. The file is a filetype read by another program. I want it to open it and the program that reads the filetype should open as well because when it finds that filetype it opens automatically. Can anyone help me with this I'm kind of a newb at VB6 (just got it yesterday). ...

Capture screen as movie with vb .net

I want to capture a video of my screen with vb .net, and i'd like to avoid using directx. I found a tutorial here http://www.codeproject.com/KB/audio-video/CaptureScreenAsVideo.aspx but it resulted in the program instantly crashing, i think it was designed for .net 1.1; Is there another way to do this? Thanks ...

Taking lot of time in excel report generation using VB

Hi, I am generating report in excel sheet(which is coming from Microsoft Access). For 100 records, it can generate the excel sheet in 2 to 3 seconds. But, it takes 10 minutes for more than 2000 records. Is there a solution or is there any other way to generate report in excel sheet? ...

How can I access hidden class variables in VB6?

I have this line in the declarations section: Private filePath As String And somthing like this below: Public Sub Print(filePath As String) ... End Sub In the ... part, I want to assign the parameter filePath to the module-level filePath. But how can I get access to the latter one? Thanks a lot. ...

Visual Basic 6 Empty Array Index

In VB6 it is possible to prepand array identifiers with an empty array index. For example: Dim x(0 To 20) As Integer x(0) = 1 Debug.Print x(0) Debug.Print x()(0) The debug statements appear to the same thing, even though an empty index is given to the array before the index in the last statement. Does anyone know what this is and why ...

Visual basic 6 default property for built in functions

Visual Basic has default properties that are sometimes implicitly called when evaluating an expression. However, I seem to of come across a discrepancy with this implicit execution of default properties. The project layout looks like: Class1: property test -> class2 (default) Class2: property test -> string "hello world" (default) ...

calling vb dll in python

So I have a function in vb that is converted to a dll that I want to use in python. However trying to use it, I get an error message this is the VB function Function DISPLAYNAME(Name) MsgBox ("Hello " & Name & "!") End Function and this is how I call it in python from ctypes import * test = windll.TestDLL print test print test.DISPL...

What are the differences between VB.NET and previous versions of VB?

I'm reasonably familiar with the various forms of VB that existed prior to .NET (VB6, VBA, VBScript...), but have yet to delve into The Sweet New Flavor that is VB.NET. So I would very much appreciate it if someone would provide a quick summary of the major differences in the language brought about by VB.NET. ...

Scroll tab with the up and down keys (vb .net)

I have a tabcontrol with several tabpages. I would like it so that when I hit the up or dowm key, the selected tab page scrolls. Im just not sure which event that would be. Thanks ...

Instance of WMEncode causes crash (vb .net)

I'm trying to use the windows media encoder sdk to make a function to video capture my screen. I use the WMEncoderlib in VB .Net. When I do dim encoder as wmencode followed by encoder = new wmencode the program crashes immediately, no line numbers, nothing, vshost.exe even crashes when debugging. If I just say dim encoder as wmencod...

Add GET Refresh Parameter in ASPX

How do I add an auto-refresh feature based on the value of a GET parameter? For example, http://localhost/myPage.aspx?refresh=5 would auto-refresh the page every 5 minutes. NOTE: A VB code example is preferred. ...

Visual Studio shortcut to auto-add event delegate methods

In C# adding event handler methods is very easy. You just type "object.event +=" and then press tab twice. Is there anything like this for VB projects? Note: This is for dynamically created controls or controls that are not declared WithEvents. ...

How to draw a graph (visual cirular nodes and lines as connections) in Visual Basic?

The problem is I have 10 nodes(say) and there are some connections between them. Now I want to draw a visual graph depicting the above with circles as nodes and lines as connections between them. My problem is what is the algorithm for placement of nodes on screen, say we have drawn one circle, then the other circle should be drawn as no...

How to display an image in C# or VB when the name is in a database?

How can I display an image in C# or VB when the name is in a database? I am using visual studio 2008 VB or C# I want to display an image on a windows form The image name is in a SQL2005 Database The image is stored in a directory structure. Ideally I would also like to be able to browse a directory select an image and add the image n...