Is there a way to highlight an item in a VB.Net listbox without
allowing the user to change selection?
When I set the selection Mode to "NONE" I can´t select an item in the code.
Same when I disable the listbox.
...
Here is the error:
http://screencast.com/t/ZDVhNmJiOTgt
Please help, here is my code:
what can I do to solve this error
Try
If MessageBox.Show("Save and update database?", _
"Confirmation", MessageBoxButtons.YesNo) = _
Windows.Forms.DialogResult.Yes Then
Dim idXs As Integer
Dim dSe...
While answering this question I noticed that I got the following dialog while atempting to move the "cursor" while an exception was being handled:
Unable to set the next statement to this location. The attempt to unwind the callstack failed.
Unwinding is not possible in the following scenarios:
Debugging was started via ...
Here's my problem. I have a middleware web service used by several web clients. The web service is a wrapper service that makes calls to several vendors' web services. The call to the vendor's web service is wrapped in a TryCatch but any exceptions generated aren't getting caught by my web service, they're getting caught in the client...
Hi
I'm launching an Access ADE, using Tony Toews auto FE program. The AutoFE programs will, if newer version available, copy the latest version of the ADE from the server, then launch it.
My code looks like:
Dim stAutoFE As String = "V:\Apps\autofe\startmdb.exe /cmd /inifile: " & """" & "V:\Apps\AutoFE\SSP.ini" & """"
Shell(...
Hey-
I'm using a MySQL connector in VB .Net to execute a batch of SQL inserts. This is typically on the order of 5k statements and takes around 30 minutes to process. Unfortunately, when this process is running and I use a different application on the system, upon returning to the .net app it hangs and shows "not responding". In fact...
Hi,
I want to create a reusable user control which contains a date time picker in asp.net. Need to add this user control in a grid view as column.While clicking the column,date time picker has to be displayed.Which is the suitable method,Creating the component or creating the user control.Also want to know,How to add this component in...
Hi, as a workaround for the Locale bug in Office Interop I wanted to use VSTO but if I call
app.ActiveWorkbook.GetVstoObject()
then it returns nothing. I'm working from a .NET 2.0 Visual Basic Application project. This is not an add in or a special VSTO project. I have added the required Imports and References.
Dim app As New Excel.A...
I set timeout to 0 but the connection close prematuraly, what is wrong with this statement ?
Using odbcconn As New OdbcConnection(DataShared.gstrCNN)
odbcconn.ConnectionTimeout = 0
odbcconn.Open()
Dim OdbcCmd As New OdbcCommand( _
"{ ? = CALL [proc_Cp_GenEstadoCta](" & _
PCOD_EMPR...
Hello everyone!
I'm writing an application for a Windows Mobile phone in VB.Net, and I would like to read SMSs from the phone's memory. According to MSDN, the SMSAccount class is what I need:
'SmsAccount Class
'Provides access to a Outlook Mobile Short Message Service (SMS) account, the account's SMS folders, and the SMS messages they ...
I need to get the bytes from an array of bytes starting at a certain index and for a certain length (4), how can get this?
Note: I don't want to use the Array.copy sub as it is not a function.
I need to put it in something like Sub MySub([arguement as byte()]the_function_I_Need(Array, index, length))
...
I have two arraylists that contains links in one and the root url in the other. Sometimes the lists dont equal in number and I would like to iterate through the links list and if it contains a matching root url add it to a third list but also avoid any duplicates. I tried this but am not getting consistent results.
Any ideas appreciated...
I created a vb.net dll called "WSdll.dll".
I compiled it, created a type library (tlb), and registered it globally(gacutil)..
It includes a file called wsutils.vb, which includes a namespace called "wsutils".
In the namespace, there's an interface (with attribute) called "IWSconnection", and a class called "WSconnection".
The interface ...
How do I (programatically) find out the key repeat delay and key repeat rate for a system?
A solution that works on any/all .Net capable platforms would be ideal, but the key target OSes would be XP, Vista, and 7.
...
The user32.dll provides functions to get the process id from a process executable name, and I can also obtain the active or foreground window that the user is working.
Can I determine what windows the targeted process has opened? Otherwise, can I find out what details about the process that opened the foreground/active window?
My code ...
Hi,
I'm curious to know the spread level of programs coded in VB.net.
I'm asking, because I coded in VB.net during my university years in aerospace engineering , because our informatics professor wanted us to do that and we learned at least a very basic experience in programming.
So I coded a horizon finder as a project-work and asked a...
I have previously used the arguments of a contentsResized event on a Winforms richtextbox to get the new size of my RTB.
I am now developing a WinForms app with a custom WPF RichTextBox. My whole reason for doing this is to use the out-of-the-box spellchecker.
I need my RichTextBox to expand and collapse vertically as the text is chan...
I'm looking at the Interop UserControl mechanism that's part of the "Interop Forms Toolkit" version 2.0. (This you to build a .Net UserControl that can be published as a COM object for use on VB6 forms.)
I've started a new project using the "VB6 Interop UserControl" template, and what I see is a class definition that looks like this:
...
In Visual Basic 2008, there's two different ways that I know of to accomplish the same thing:
The Dim on the member level:
Dim counter1 as integer = 0
Dim counter2 as integer = 180
Public Sub SampleSub1()
Counter1 += 1 : If (Counter1 > 14) Then Counter1 = 0
Counter2 += 1 : If (Counter2 > 240) Then Counter2 = 0
End Sub
Then ther...
Are there any tools available for automatically formatting vb.net code - specifically for adding line breaks at a predefined line length? I'm working with a lot of code with long lines (thousands of lines), and manually reformatting it is quite time consuming. I've seen a number of tools for rearranging code into regions etc., but haven'...