vb

Key repeat delay and key repeat rate

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. ...

Access iPhone from Windows

I've seen a couple programs running in Windows that could access the iPhone and iTouch with access to the photo library and music. What APIs are used for this kind of development? ...

Create a Auto-sized RichTextBox in Custom WPF control (VB.NET)

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...

What's the difference between dim on the member level and static on the procedure level?

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...

Can array bounds checking be disabled in Visual Basic 2008

I know that this was an advanced compiler option in previous versions of Visual Studio, is there a way to disable array bounds checking in Visual Studio 2008? There's no option for it that I can see. ...

Listview - menu for switching item

I'd like to add an option to my ListView, so that I can change it's view (tile, list, details,...) - just like in Windows Explorer. How can I build such a menu? With PictureBox and MenuStrip? PS: winforms, not WPF Thanks! ...

How to create a dynamic number of threads?

Currently I create a thread the following way (the normal way) Public loginThread As Thread Public loginThreadStart As New ThreadStart(AddressOf LogIntoWhatever) Public callLoggedIn As New MethodInvoker(AddressOf loggedIn) However, what I want to be able to do is something along the lines of (this obviously does not work, and is entir...

how to handle browser based security issues on invoking Activex components..??

Hi, Update 1: Further investigation reveals that VB Activex component failed to initialize the user32 dll and failed to invoke the ShowWindow method when the browser security trust level is medium. Update 2: I have fixed the issue by just enabling the allow scripting of the webbrowser control option in medium level security. I dont ...

Unhandled Exception and Mysql.data connection VB

Hi My app connects my server with Mysql.data adapter. most of time it works great but sometimes i get unhandled exception. i am really tired of getting this. here is a screenshot, how can i handle these exceptions ? thx ...

Visual Basic 6.0: Compile Error When You Reopen a Project That Uses Implements

I have a VB6.0 project that contains the line Implements IObjectSafety I tried reopening this prject and compile it (.dll) it throws an error like --------------------------- Microsoft Visual Basic --------------------------- Compile error: User-defined type not defined --------------------------- tried to fix it using this url...

How can I use VBA's SUMIFS properly?

Hello, I'm trying to write in Visual Basic (in Excel 2007) the following sumifs code (the I column and the F column are contained in a Table): Range("AA5").Value = "=SUMIFS(I5:I420,K5:K420," & "B1" & ",F5:F420," & "6009" & ")" "B1" and "6009" is what I want it to look for and the I column is the column I want added. Can you plea...

How do you get a dimension of an Array as an Array from a 2D array?

I have this 2D array: Private _Chars As String(,) = {{"`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "="}, {"¬", "!", """", "£", "$", "%", "^", "&", "*", "(", ")", "_", "+"}} I want to Pass a Dimension (ie. the First Line) into a Function, or the Second Line into a function to switch be...

aspx td question

i have this code - <td id="td_h1" runat="server" style="background-image:url(images/img_new.jpg);vertical-align:top"> <div id="title_1" runat="server" class="caption" >This is New</div> </td> here's the problem - this is the code from the .master.aspx page. Some file access this master page from different folders, and some files from ...

What's the fastest way to randomly generate numbers in Visual Basic 2008?

What's the fastest way to randomly generate numbers, either randomly or simulating random? I don't really need a true random number generator, it would be acceptable to simulate random. I tried other random simulation methods but none were faster than this. Here's the fastest way I have now: Private myRandom As New System.Random(CType(...

Prepared Statements For ODBC in VB.net

Hi guys, my question is a pretty simple one, however I simply cannot see where i have gone wrong. I just want to know how to create a prepared statement in VB. I know in java one would use ? and these would get replaced. I am aware that in VB you use @ParameterName. Basically my code gets down to where i use the prepare method and the e...

What is the equivalence of End (vb6) when we wanna to end using c# for windows applications?

Hi What is the equivalence of End (vb6) when we wanna to end an application using c#? ...

visual basic List.box question

Hello All, i have 1 text box and 1 listbox in my VB form. i want to check duplicate item,compare with textbox.text1 and listbox.list item. and if textbox.text1 value is '3333' and listbox.list multiple value is '1111' '2222' '3333' '4444' so how to implement such like duplicate check routine? so if duplicate detect compare with cur...

Convert VB's Format() into PHP

In PHP, I'm trying to read an Excel file using COM(): $rrc_app = new COM("Excel.application"); $rrc_workbook = $rrc_app->Workbooks->Open($filename); $rrc_worksheet = $rrc_workbook->Worksheets('Top sheet'); $rrc_worksheet->activate; I tried to extract the value of a cell containing a "Time" value: $review_time = $rrc_worksheet->Range(...

Help me convert the following VB/C++ code to C#

I have been trying to get the following VB code running in C# for hours now. I keep getting a Value does not fall within the expected range. exception on the CreateStroke() call. Also, here is the Microsoft documentation with a C++ version as well. Option Explicit Dim theInkCollector As InkCollector Private Sub Form_Load() Set theI...

read a specific line from a txt file in VB .net

Hi, In VB.net I'm trying to read in a specific line from a file. An example of the line in the txt file is: [PATH] = "/this/directory/run.exe" Now I understand how to open the file for reading and writing in VB, but I need to parse out the path in the "" (quotation marks). Any help would be greatly appreciated!! --Adam ...