Hi,
I'm trying to write a function that returns an Array that I can pass into a String.Format:
Public Function ToArray() As Array
Dim vals As New ArrayList()
vals.Add(Me("district"))
vals.Add(Me("county"))
vals.Add(Me("route"))
vals.Add(Me("section"))
vals.Add(Me("beg_logmile"))
vals.Add(Me("end_logmile"))
...
I'm trying to publish my program so that it can get updates and am told I have to publish my changes to a web server or file share server, but I have no idea about how I can go about getting one...are there free ones that will perform what I need to accomplish?
...
When I am concatenating object values together to form a string in VB.NET, is there a difference in performance or a recommended best practice between using the & concat or the + concat with calls to .ToString() on each object?
Example (which is faster or best practice):
Dim result1 As String = 10 & "em"
Dim result2 As String = 10.ToSt...
Hi-- I'm usually a PHP guy but got stuck doing a project in vb.net.
I have a query (sqldatasource) that returns a single value (the last update date).
I want to use a label to say something like "Last updated: " < Label = (returned value) >
In PHP this would be simple. In vb.net, all I can find are endless badly written code behinds s...
winforms .net 3.5 Ultrawingrid 9.2
In my subclass of Ultrawingrid.Ultragrid :
Protected Overrides Sub OnKeyDown(ByVal e As System.Windows.Forms.KeyEventArgs)
If e.KeyCode = Windows.Forms.Keys.Tab andalso e.control = True then
SetFocusToNextControl(True)
End if
Mybase.OnKeyDown(e)
End Sub
This works fine. But w...
As the title suggests, I'm tyring to pass a variable data type to a template class. Something like this:
frmExample = New LookupForm(Of Models.MyClass) 'Works fine
Dim SelectedType As Type = InstanceOfMyClass.GetType() 'Works fine
frmExample = New LookupForm(Of SelectedType) 'Ba-bow!
frmExample = New LookupForm(Of InstanceOfMyClass.Get...
Hi
My printer name is \\abc\First Floor A-Block its taking name \abc\First Floor A-Block on NE04:. How should i print it
Private oWord As Word.Application
Dim lobjDoc As Word.Document
Dim strFolder as String
Dim pd As New PrintDocument
Dim strPrintername as String
oWord = CreateObject("Word.Application")
oWord.DisplayAlerts = Word.Wd...
Well basically I've got a vb.net script connecting to IRC, and I'm working on making it a basic chat system, but I've run into a problem.
Say I receive this:
:[email protected] PRIVMSG #channel :message
I want to grab specific information to output to the user.
I want to grab nickname and message
How can ...
I have a custom Web/Server Control that utilizes templates (ITemplate). Some of these templates repeat based on the provided data.
In order to allow for DataBinding/etc I need to "pre-generate" all of the defined templates via code very much like the following (this has been simplified, so keep the laughter to a minimum =):
public clas...
Hello.
This is the code that i have to export data to Excel.
Dim oExcel As Object
Dim oBook As Object
Dim oSheet As Object
oExcel = CreateObject("Excel.Application")
oBook = oExcel.Workbooks.Add
oSheet = oBook.Worksheets(1)
oSheet.Range("A1").Value = "ID"
oSheet.Range("B1").Value = " Nome"
oSheet.Range("A1:B1").Font.Bold = True
oShee...
Hi,
I have a feeling the answer to this is no, but using .Net 4.0's Parallelism, can you set the amount of cores on which to run i.e. if your running a Quad Core, can you set your Application to only use 2 of them?
Thanks
...
Hi,
i have a list(of triplet) and want to bind this to a dropdownlist.
Is this possible without using codebehind?
I already tried to
DataValueField="First" DataTextField="First"
added an extention to the triplet with a function
but none worked.
any ideas?
...
I am handling errors via my global.asax in this method:
Dim CurrentException As Exception
CurrentException = Server.GetLastError()
Dim LogFilePath As String = Server.MapPath("~/Error/" & DateTime.Now.ToString("dd-MM-yy.HH.mm") & ".txt")
Dim sw As System.IO.StreamWriter = New System.IO.StreamWriter(LogFilePath)
sw.WriteLine(DateTime.Now....
Dim Con As OleDb.OleDbConnection
Dim Sql As String = Nothing
Dim Reader As OleDb.OleDbDataReader
Dim ComboRow As Integer = -1
Dim Columns As Integer = 0
Dim Category As String = Nothing
Dim oDatumMin As Date
Dim column As String
column = Replace(TxtDateMax.Text, "'", "''")
'oDatumMin = Convert.ToD...
Question: I want to call a generic function, defined as:
Public Shared Function DeserializeFromXML(Of T)(Optional ByRef strFileNameAndPath As String = Nothing) As T
Now when I call it, I wanted to do it with any of the variants below:
Dim x As New XMLserialization.cConfiguration
x = XMLserialization.XMLserializeLDAPconfig.Dese...
First of all, here comes the load part.
Structure MainStruct
Dim Ans1 As String
Dim Ans2 As String
End Structure
Dim Build As New List(Of MainStruct)
...
...
...
Session("MyData") = Build
The question is how can i read back the contents of the list, stored in the Session?
I mean something like...
Build = Session("...
Hi..
I just wanted to confirm couple of things.
I) Code snippet:
cmb1.Datasource= dt;
cmb1.Valuemember = "value";
Does the control rendering happens 2 time for the control, 1 more time extra because of the value member getting changed after data source assigned. Is this so?
II) How can I trace these re-populations in C#? I just wan...
Hello,
I am trying to set the proxy username and password. I saw this posting (http://geckofx.org/viewtopic.php?id=832) and I thought it might be a similar setting for the username/password, such as :
Skybound.Gecko.GeckoPreferences.User["network.proxy.user"] = (user);
Skybound.Gecko.GeckoPreferences.User["network.proxy.password"] = (...
I don't know really how to word the question so please bear with me...
I have 3 classes: Server, Database, and Table. Each class has a "Name" property. How I want it to work is that each server can have multiple databases and each database can have multiple tables. So in the Server class I have this property.
Private _databases As List...
I am developing a windows service, in vb .et, that launches a legacy application that performs some work. The service acts as a wrapper around the legacy app allowing users to automate an otherwise manual operation.
Everything is working great, except occasionally the legacy app displays a messagebox. When it does this the process hal...