I am having a little trouble with an 'IndexOutOfRangeException'. I think it is because when the code tries to get the DateModified col from the database it sometimes contains NULLS (the users haven't always updated the page since they created it).
Here is my code;
s = ("select datemodified, maintainedby, email, hitcount from updates wh...
Currently I have the code:
textbox1.text = textbox1.text.insert(textbox1.getfirstcharIndexFromCurrentLine(),";")
But this means it has to reload the entire textbox, which with large files is noticeable slow.
What are the alternatives?
...
Hi
I am using VB.Net and would like to use a LinkedList. Only problem is that it is a multithreaded application. I saw from MSDN that Syncroot is an explicit implementation of the ICollection Interface. I found people wanting to do similar things with List(Of T). It seems that the solution there is to cast the list to the interface.
I ...
I am using a MS Access database as the backend of my VB.NET application. I am entering users details into the database using an INSERT INTO statement:
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & config("DatabasePath") & ";")
cn.Open()
cmd = New OleDbCommand("INSERT INTO blah blah blah...", cn)
dr = cmd.Ex...
Hi,
I am want to apply gradient color on textbox background in active report. For this I use graphics and use following code:
Dim a As New System.Drawing.Drawing2D.LinearGradientBrush(New RectangleF(0, 0, Me.Width, Me.Height), color1, color2, mode)
Dim g As Graphics = Me.CreateGraphics
g.FillRectangle(a, New RectangleF(...
I want to create MySQL like timestamp from vb.net
I am using oracle as my database.
I also want to insert/update/delete data from the oracle database.
Please help me.
...
I'm a C# programmer but am converting some code from C# to VB.NET. In c# I can simply use (int)blah.getValue() where getValue() returns an Integer?
Doing a DirectCast() in VB.NET doesn't work though, saying Integer? cannot be converted to Integer.
Ideas?
...
Hey Guys I would very much appreciate some help with the following. We're using fluent to control the mappings for nhibernate and its all gone well so far. We've basically got a scheduled based CMS system and I'm having problems using the HasMany mapping to exclude the non-live child categories.
So we have the following Data Tables, s...
is it possible inside the gridview events for commands to find a cell by datafield name or headertext name
when using boundcolumns?
...
I have the following Leak situation in a VB.NET (.NET2) application: a form - DetailTache (TaskDetails) - in my MDI application is not garbage collected is not collected ofter open/close.
I did the following profiling root:
any idea how this leak could be fixed? thanks.
EDIT:
Result search from projet of WinComboRowSelected Event....
The problem: A dialog's FormClosing() event is raised if it's a child, ie it's Owner property is set to the parent form, but NOT if it's a child-of-a-child. So closing the main form does not call the closing event on any grandchildren dialogs.
The Details: A dialog prompts to "Save Changes?", with YesNoCancel buttons, in the FormClosing...
Hi,
how should I DLLImport thing in VB.NET?
Example would be:
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function GetWindowText(ByVal hwnd As IntPtr, ByVal lpString As StringBuilder, ByVal cch As Integer) As Integer
End Function
If I put it inside a Class or somewhere else, I get "DLLimport ...
Here is my code,
Dim allFiles As FileInfo() =
tempDir.GetFiles("*.pdf", SearchOption.AllDirectories)
I've googled and found that I need to change the permissions of my app from
Project properties > View UAC Settings > and change level to level="requireAdministrator"
But its also not working. I found somethi...
I am rewriting a C# class in VB. The C# class has a static constructor in it:
static Class()
{
...
}
which, through the Call Stack, I found is called by the main window's InitializeComponent() method. Everywhere I've looked has told me that the corresponding static constructor in VB is just:
Shared Sub New()
...
End Sub
b...
I've created a Delegate that I intend to call Async.
Module Level
Delegate Sub GetPartListDataFromServer(ByVal dvOriginal As DataView, ByVal ProgramID As Integer)
Dim dlgGetPartList As GetPartListDataFromServer
The following code I use in a method
Dim dlgGetPartList As New GetPartListDataFromServer(AddressOf AsyncThreadMethod_G...
I have a delegate for a method. I start it in a new thread that has a parameter in it in which I pass a DataView into. The new thread is obviously not running on the UI thread so I should not be accessing any UI controls. The dataview I am passing into the delegated method however I got the reference from ComboBox.DataSource where Com...
Hi-- I have a asp.net page that has several SqlDataSources defined that feed data into some graphs. The problem is that the graph product does not handle "no data" very well, and throws an error. I'd like this to handle the situation more gracefully-- so I need to check whether the SqlDataSource returned data or now before rendering the ...
I have an asp.net web app that uses forms-based authentication, a SqlMembershipProvider (using an encrypted password format), and a SqlRoleProvider. I need to know if it's possible to administer the users (create new users, assign them to roles, etc.) from a windows application - the powers that be don't want any administrative functiona...
This questions is for VBers, it's irrelevant in C#.
In VB, when you create a module, all it's fucntions and members are available in the scope without need to type the module name, just like all the VB functions (Rnd, Mid, IIf etc.).
I want to create a module but I should have to explicitly write it's name to access it's members, i.e. ...
Hello all,
I am totally a newbie to VB.net, now I am developping a Windows Service, which will start an *.exe when starting. How can I detect and re-start a process of this executable if it got killed by some other program?
My code is as below:
Public Class MyWinService
Dim RetVal
Protected Overrides Sub OnStart(ByVal args() As Stri...