Software Development Network Logo
  • Visual C++
  • Audio and Video
  • Windows Forms
  • SQL Server
  • Visual C#
  • Visual Studio
  • Game Technologies
  • Windows Vista
  • SharePoint Products
  • VS Team System
  • IE Development
  • Visual Basic
  • Visual FoxPro
  • Smart Devicet
  • .NET Development

Software Development Network >> Visual Basic

Visual Basic

New Question

how to add a scroll in a treeview
Data vanishing during run time
why its not possible to directly assign a lower data type to higher data type in VB.NET
Fade in code doesn't worked on mdi child form
DeviceIOControl Does Not Work on Windows 98
IsDBNull problem
Code is used in a different country
How Can we make any drive read only in windows
Adding x number of Groups of Controls to a Form During Runtime
How to compare text between two text boxes

Top Answerers

Buliones
jfberube
limon26
fagster
Pascal Mignot
HD Land
claydevin
Pavel Burianek
wakewakeup
Corey Furman
Mimer Information Technology AB
Only Title

Answer Questions

  • S4turno Adding Leading Zeros to String

    I have written the following function to add leading zero to a string, my question is there a simple way to do this Can you use the string.format Private Function FixLength( ByVal String1 As String , ByVal length As Integer ) As String 'check that string is not already the correct length If String1.Length <> length Then Dim output As String = String1 For bitcounter As Integer = 1 To length - String1.Length output = "0" & output Next Return output Else 'if the string is already the correct length then return it Return String1 End If End Function When you originally convert a number to a string, you can use String.Format to add leading z ...Show All

  • Ivanf1 Please Help me with my ComboBox columns

    Hi I have a DataGrid with ComboBox columns. I want the same thing to happen as when a user clicks and chooses an item in the ComboBox. When a user stands in the last row (new row) and clicks for choosing an item, a new row appears beneath. I want the same thing to happen when a user types in what he wants, as what you can do in Access ComboBoxes, and when he leaves the ComboBox a new row appears. Is there a way to make that happen   I have tried to explain my problem in so many questions; I hope I got it right this time.   Fia If you are using the DataGridView in VB 2005, you can handle the "CellLeave" event on the data grid view which should fire ...Show All

  • Allan Huang Mixing Err.Raise and Exceptions

    Hi, I'm involved in converting a vb6 application to .NET. The application has several business object (activex dll's) and an EXE project which contains the UI. Great I thought at first. So I started converting the business objects to VB.NET, expose them through COM and the UI project can still use them. So far this has been the case. However I have come across a situation (quite a lot of situations actually) where the business object used to use Err.Raise(<some number>) and then the UI project would use On Error ... to catch these errors, looking at the Err.Number to find out just what exactly went wrong. I have found that Err.Raise from VB.NET does not marshal very well through COM and in to the UI code. It seems that Err.R ...Show All

  • Tejas34 How to link buttons and textboxes, to do the same thing?

    I have some tab's, and need to link some buttons and textboxes at different tab's. Is there a way to do it, other then doing it by code The code above will make the text in textbox2 equal to the text in textbox1 every time a key is pressed in textbox1 If you want the reverse to work you either need to add a handles clause for textbox 2 and determine which textbox is sending (cast sender) Or use the keyup event for textbox2: Private Sub TextBox2_KeyUp ( ByVal sender As Object , ByVal e As System . Windows . Forms . KeyEventArgs ) Handles TextBox2 . KeyUp Me . TextBox1 . Text = Me . TextBox2 . Text End Sub I must say it is oddly redundant to give the user two ...Show All

  • Chris Marts The custom tool 'MSDataSetGenerator' failed. Unable to convert input xml file content to a DataSet.

    Hi there, I experience the following problem. I'm using Visual Studio 2005 Team System For Software Developers. When I try to add a new DataSet to any kind of project, I cannot get to the visual DataSet designer. Rather, I get the following error (all the time no matter what the type project actually is - Windows app, Web site, etc.): The custom tool 'MSDataSetGenerator' failed. Unable to convert input xml file content to a DataSet. Data at the root level is invalid. Line 1, position 1. Has anyone experienced the same problem Any solutions Thanks in advance! George Jordanov Ivanov Ran into the same problem, because I had XMLSpy installed. Your fix worked for me and saved me a lot of time. Thanks! ...Show All

  • mscherotter how do I Refresh "My Computer" network drives for vb 2005 data access

    Since windows 2000 came out there has been annoying red "X" on My Computer's network drives. If you click on them, they go away and the files are displayed. In VB 2005, the mycomputer.filesystem.drives.item(n) does not refesh them and directory.getfiles("P:\") returns an error "could not find part of the path P:\" When I double click on P: in my computer, the error goes away and I can read the files again. This is annoying becuase I write a lot of network applications. How can I implement code in my program to refresh drive "P:" I just tried : Using sw As StreamWriter = New StreamWriter( "P:\temp.log" ) That does not work also... ...Show All

  • Brad Hehe ComboBox and Messge

    How do you pass a name from a ComboBox list to a variable and then give a message in a message box via a Select Case Statement i.e Case 1 - meesage 1 Case 2 - message 2 etc etc. Ta Of course in these examples, you can use the contents of the Combobox test property in the message being displayed in the msgbox. Select Case Me.theComboBox.Text Case "Bob", "Jim" MessageBox.Show("Your name is " & Me.theComboBox.Text) Case else MessageBox.Show("Your name is not Jim or Bob") end select Or even if you use the selected index - you can also use the text property in the msgbox Select Case Me.theComboBox.SelectedIndex Case 1, 2 M ...Show All

  • VernonRhoda Try..Catch is OK; BUT: how to Resume?

    In the old VB6 days, when I had an error handler (On Error) in a routine that called another routine that called another routine and so forth, if somewhere down the line in the call stack there was an error, the error handler on top of the call stack would catch it; if that error handler had a Resume statement, it would take me right to the offending line of code (no matter in which module or class). Am I missing something or is this sort of coding not possible with Try..Catch I also find that the error messages in the Immediate window are useless most of the time. With On Error, I could go to the immediate window and type " err.description" and it would give me the cause for the error. (i.e. "error in sql statement: i ...Show All

  • Lars-Inge T&amp;#38;&amp;#35;248&amp;#59;nnessen can't import Excel into Visual Basic

    Hi Hope some body can help with this: - I have just installed Visual Studio 2005 Professional onto my PC and want to write an application that opens an Excel spreadsheet and reads data from a specific range in the sheet. Problem is I cannot seem to import the Excel objects into the program. Looking around on the net I have found some code like this: - Option Strict On Imports System.Windows.Forms Imports Excel = Microsoft.Office.Interop.Excel Imports Office = Microsoft.Office.Core Imports System.Drawing However this just produces an error to the effect that the office and excel lines are not recognised. Can anyone tell me what the correct import would be to enable me to use the excel objects Many th ...Show All

  • ziffy_amit How do you convert Integer to System.ConsoleColor with Option Strict On?

    Posted on:  10/27/2006 17:01:04    I'm trying to do this, assuming the ConsoleColors have a numeric value as well as a descriptive name.  But how do you convert an integer into a ConsoleColor with Option Strict On   It doesn't work if I use x or y instead of sx or sy.  But it does work with Option Strict Off using only x and y without sx or sy.   Option Strict Off Module Module1 Sub Main() Dim x, y As Integer ', sx, sy As System.ConsoleColor For x = 0 To 15 Console.BackgroundColor = x Console.Clear() For y = 0 To 15 Console.ForegroundColor = y Console.WriteLine( "Background: {0}; Foreground: {1}" , x, y) Next y ...Show All

  • keithpsft Vb.net something wrong

    fixed: the last part is the output how i want Look up the SQL SUM function ...Show All

  • Yelnik Count lines in a textbox

    Can someone help me couting lines in a text box In Access i use this code: im strText As String Dim nLines As Long Dim antallinier As Long antallinier = 16 Dim antal As Long Dim tilbage As Long strText = Form_kursus.hovedpunkter.Text & vbNullString ' Trim of trailing CR/LF, if any. If Right(strText, 2) = vbCrLf Then strText = Left(strText, Len(strText) - 2) End If ' Split on the CR/LF combination to see ' how many lines we have. If Len(strText) = 0 Then nLines = 0 Else nLines = 1 + UBound(Split(strText, vbCrLf)) Hope some can help regsrds alvin Hi I don't understand this I'm a beginner in this But i get an error on s.split ( saying S is not declared) ...Show All

  • ShrikantBijapurkar SLOW saving record

    I used this below to update a record Me .Validate() Me .EDFBindingSource.EndEdit() Me .EDFTableAdapter.Update( Me .ST102ADataSet.EDF) Me .Button3.Focus() Me .Button4.Enabled = False If I am on my pc where the sql resides, why would it take roughly 6 seconds for the data to be update I know thats how long because the way I have my code, the button doenst become disabled until 6 seconds have elasped. Would I be better off to populate the controls and get ride of the bindingsource, then save changes using hard coding. Davids Learning Thats probably from me not knowing some of the terminoligy yet. What I meant was for each textbox,combo, there was one bindingsource , then e ...Show All

  • redshock Possible Bug

    Hi, I'm not sure if this is a bug or not: When I encounter a problem/exception case in my .NET Form, I execute My.InteropToolbox.EventMessenger.RaiseApplicationEvent("CRITICAL_ERROR", My.Resources.SampleErrorCode). The error is successfully raised back to my VB6. In the VB6 Sub that handles this application event, I display a messagebox and Unload all the forms. The problem is that no matter what approach I take, my .NET form continues to execute any and all lines AFTER the call to .RaiseApplicationEvent. It does not know that I don't want to execute any code after I call it. Therefore, as my VB6 client may be displaying a message or actually unloading all forms and closing itself up (due to a critical error), code is s ...Show All

  • ron nash Menu checkstate and radiocheck

    Hello, I am adding a menu with 2 language option: English French and want user to be able to check only one. In Visual Basic .NET is was easy and I could see the Menu property and then Select both English and French menu item and then RadioCheck was selected. Where is the RadioCheck in Visual Studio 2005 Thanks To follow up on my previous comment, below you will find a class that inherits from ToolStripMenuItem and should accomplish what you are looking for. private class RadioToolStripMenuItem : ToolStripMenuItem { private bool radioCheck = true ; [ DefaultValue ( true )] public bool RadioCheck { get { return r ...Show All

252627282930313233343536373839404142

©2008 Software Development Network

powered by phorum