- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
26 Posted Topics
Hi, I haven't implemented this but it should work: [code] [LIST=1] [*]While Reader.Read[B][COLOR=#808080]()[/COLOR][/B] [*][B][COLOR=#808080] Try[/COLOR][/B]<LI class=li1> [B][COLOR=#800080]For[/COLOR][/B] Columns = [COLOR=#ff0000]0[/COLOR] [B][COLOR=#800080]To[/COLOR][/B] Reader.FieldCount - [COLOR=#ff0000]1[/COLOR] <LI class=li2> MsgBox[B][COLOR=#808080]([/COLOR][/B]Reader.Item[B][COLOR=#808080]([/COLOR][/B]Columns[B][COLOR=#808080])[/COLOR][/B].ToString[B][COLOR=#808080])[/COLOR][/B] <LI class=li1> Category = Reader.Item[B][COLOR=#808080]([/COLOR][/B]Columns[B][COLOR=#808080])[/COLOR][/B] [COLOR=#008000]'READ COLUMN FROM DATABASE[/COLOR] <LI class=li1> [B][COLOR=#800080]Next[/COLOR][/B] <LI class=li1> cmbQuestion.Items.Add[B][COLOR=#808080]([/COLOR][/B]Category[B][COLOR=#808080])[/COLOR][/B] <LI class=li1> ComboRow += [COLOR=#ff0000]1[/COLOR] <LI class=li1>[COLOR=#ff0000] Catch …
Hi, Try this (in your form or a Module): [CODE] Private PlaySound As New System.Media.SoundPlayer Public Sub PlaySoundFile(ByVal SoundPath As String) PlaySound .SoundLocation = SoundPath PlaySound .Load() PlaySound .Play() End Sub [/CODE] Then call it from the Form Load event (or wherever you like): [CODE] PlaySoundFile(<path to mp3 here>) [/CODE] …
Hi, Add a Timer to your form and set the Interval to 1000 (1 second). Place your code (or a Call to it) in the timer Tick event. Call [I]myTimerName[/I].Start() in the form Load event and [I]myTimerName[/I].Stop() in the FormClosing event. HTH, Chris.
[QUOTE=twentytwotwo;1182107]I have a vb.net project which i have inserted pictures and video. I inserted a video clip using the Windows Media Player control and it does work. The issue i have is that i can't move the program to another computer because the pathname for the video will be wrong. …
Given that you're using VB 2008 you could use a TableAdapter, rather than three DataAdapters, then - using the TableAdapter - create a Query that selects all of the necessary info and use a single procedure to filter the Query. This may be possible with DataAdapters too (I honestly don't …
Hi, Personally, I wouldn't refresh the entire listbox. I'd just (programatically) select the relevant listbox item and remove it in the button click event. Chris.
Hi. First of all, let me point out that I'm not familiar with the 'Microsoft.VisualBasic.FileIO.TextFieldParser' so my suggestion may not work for you. Personally, I would read the entire text file into a single String Variable (let's call it myCSVfile) and then use the Split command to populate an array. …
[QUOTE=jackiejoe;1176322]I am looping through a list of DateTime variables and have got the .ToUniversalTime variable. I want to find out from the list which is the closest one approaching Now.ToUniversalTime but am having difficulty trying to work it out I had it looping through like this but this isn't much …
[QUOTE=andy38;1176108]Hi,Using Vb net (2005) in Win Forms, in my app. I have many Win Forms one off them is "SetupOption" this need to be shown at least once at the first time I run the app and never ever after unless I need to change some settings,. then my question: …
Can someone please help me with this - it's driving me mad. I have a very simple app (at the moment) that stores file names/paths and folder names/paths in an SQL database and displays them in a ListView and TreeView respectively. All fine and dandy. I have an option to …
Hi All, I have a very simple DataSet linked to a ListBox. I need the User to be able to add Data and have used the following code (in a ToolStrip command button): [CODE]Dim newFileRow As DataRow = Database1DataSet.Tables("tbl_Files").NewRow() newFileRow("File Name") = fleName newFileRow("File Path") = flePath newFileRow("Times Opened") = …
Hi, I did something like this myself. Use two variables (ie: Dim dblVal1 As Double, dblVal2 As Double). Pass the 1st test entry to dblVal1, clear the text box (when the user presses a function key such as '+'), then pass the 2nd text box entry to dblVal2. HTH, Chris.
Hi All, I'm a complete novice when it comes to ASP, so please bear with me. I have a GridView bound to an Access Table that has no sorting on it (which is as it should be) and a Combo Box bound to the same table that is sorted on …
Hi, Try using dr = Nothing instead of dr.Close() You're getting the error because you have cmd set to the "New" keyword and not dr (so cmd is an Object whereas dr is a Variable). HTH, Chris.
Hi, Try moving the Image location bit to the timer: Private Sub Timer4_Timer() Image1.Left = Image1Left + 200 Image1.Top = Image1.Top - 50 Timer4.Enabled = False End Sub and then use the loop to turn the timer on: For jumps = 1 To 5 Timer4.Enabled = True Next jumps HTH, …
Hi Mr Wobbles (good name!) For VB6 use: App.Path to return the application dir (eg: Open App.Path & "\MyFile.txt" For Input as #1) For VB2005 use My.Application.Info.DirectoryPath HTH, Chris.
Hi All. Does anyone know how to get the ShareName of a Local Drive? Or even if the Local Drive is shared? I know you can get the ShareName using FileSystemObject, but this only works for Network Drives (Local Drives return ""). Any help would be greatly appreciated. Thanks, Chris.
Hi, Adding an image to an Access DB is fairly simple - Add a field to the employee table with a type of 'OLE' (call it picture or something like that). Open the table, right-click on the picture field and add the image (ms paint is the easiest way - …
Hi All, Does anyone know why I'm getting a 'Null Reference' error when I try to use a FolderBrowser? I have the following code (called from a Toolstrip Menu Item): <code> Dim fldBrowser As FolderBrowserDialog = New FolderBrowserDialog fldBrowser.RootFolder = Environment.SpecialFolder.DesktopDirectory fldBrowser.Description = "Which Folder do you want to use …
Hi Webbsta, It depends on how you've linked to the .dlls. I know practically nothing about linking to such files but I do know you can find the installation location of your app (and point to it from code) quite easily. Just create a string variable wherever you want to …
Hi All. Does any one know how to add extra files (in my case .png's) to a VB 2005 installation? This used to be really simple in VB6, you just browsed for the extra stuff you wanted and that was that - not so with 2005. I have found the …
Hi All. I've got a small App (VB.Net) that adds Files and Folders to a List and then uses a Do.. ..While Loop to copy each item in the list to a new Directory (not unlike a backup program). I thought it would be good to add a ProgressBar to …
Hi, So long as you have a Reference to the DAO Object Library you can do the following: Dim dbs as DAO.Database, rstMain as DAO.RecordSet, rstLookUp as DAO.Recordset Dim sql as String Set dbs = CurrentDB sql = "Select * From <Main Table Name Here>" Set rstMain = dbs.OpenRecordset(sql) sql …
Hi All, Does anyone know how to interrupt a Do While Loop? I have a very simple bit of code that Loops though the items in a ListBox so long as a boolean (blnPaused) = False. There is a Button on the Form that sets the boolean to True but …
Hi All, I'm trying to connect to a Web Service from VB 2005 and keep getting the same error: System.IO.FileNotFoundException occurred Message="The download of the specified resource has failed. " Source="msxml3.dll" StackTrace: at MSXML.XMLHTTPRequestClass.send(Object varBody) at WindowsApplication1.frmLogon.cmdOK_Click(Object sender, EventArgs e) in C:\Documents and Settings\Dev\My Documents\Visual Studio 2005\Projects\SOAP_Logon\SOAP_Logon\frmLogon.vb:line 90 Can anyone …
Hi All, I'm completely new to XML & SOAP so please bear with me if I sound stupid. I regularly write code in VBA and VB6 and have been asked to create a function that will link to a webservice (that requires a Username and Password) via SOAP and extract …
The End.
Chris147