Open File in listBox on click? I have been trying to figure out how to do this, and have found some interesting articles, but have had no luck whatsoever, so I figured I would post. I have a listBox, which is populated with all of the files in a specified folder. I would like to, when I click on one of the files for it to open with the appropriate application so that I can view it. I haven't been able to get anything to happen though, so I hope someone can help me. Thank you very much. Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Where to get Dataform wizard for the VB 2005 express? I was learning the VB studio 2003 in school and there is this Dataform wizard. But tried the VB 2005 Express Edition, cannot find this wizard. Can someone enlighten me where or how I can get this Dataform wizard
Thank you very much. Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Convert code using gdi32 from VB to VB.NET Hello, I would like to convert a existing code which rotates an image. The code uses some gdi32 calls. I converted the parameters from Long to Integer, from Any to Integer. Now I'm having trouble with the first API call which is CreateDIBSection call it fails with AccessViolation Exception. As far as I understand it trys to access a parameter which might not be initalised. Debugging I see there is only the Structure BITMAPINFO field Bits with "NOTHING" inside - thougt this will be filled from the called CreateDIBSection function. Or do I need to initialize it How Public Structure BITMAPINFO Public Header As BITMAPINFOHEADER Public Bits() As Integer '(Colors) End Structure Or did I convert the API call wrong From: Private Declare Function CreateDIBSection Lib "gdi32" (ByVal hdc As Long, pBitmapInfo As BITMAPINFO, ByVal un As Long, ByVal lplpVoid As Long, ByVal handle As Long, ByVal dw As Long) As Long To: Private Declare Function CreateDIBSection Lib "gdi32" (ByVal hdc As Integer, ByVal pBitmapInfo As BITMAPINFO, ByVal un As Integer, ByVal lplpVoid As Integer, ByVal handle As Integer, ByVal dw As Integer) As Integer Thank you in advance for your help Best regards udk Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

TableAdapter custom Delete and Insert queries I have built my own Delete and Insert queries for a tableadapter (used the query builder for one and stored procedures for the other.) When I run my program (F5), I get no errors but the data does not delete or get inserted. I have checked the BIn\release database and I have also set the property in the Sloution Explorer window to "Copy if newer". Here is my code:
ServAwdEmpsTableAdapter.DeleteQuerybyAwardDtRange(FromDate, ToDate)
The DeleteQuerybyAwardDtRange looks like:
DELETE FROM [dbo].[ServAwdEmps] WHERE AwardDt between @FromDate and @ToDate
I have done something similar with the Insert Query. I have tested the queries and they are correct but neither changes my data.Is there something else I need to do to get it to actually delete or insert these records Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Read/Write directly to floppy sector Hey!! can anyone help me with this I need to acces directly to a sector of a floppy drive by indicating it's cylinder/track, head, and sector. I've tryied some examples but none will work con VISUAL C++ EXPRESS EDITION 2005 so i'm kind of lost... can anyone help, give me a hint, tip, or guide me to where I may find the answer Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Date Format - Globalization I would really appreciate an expert to help walk me through date formatting, I¡¯ve been trying for several weeks but I¡¯m going nowhere! A few weeks ago I posted on this forum about ¡°i s the date format dependant on a computers¡¯ locale ¡± (posted 16 January 2007). I¡¯ve tried very hard to understand and work out the helpful answers given but I¡¯m still confused.
I¡¯d like to learn how to format a date in different ways ¨C so that the date will always be processed in the format I¡¯ve given a programme.
This is code by DMan:
Dim dti As New Globalization.DateTimeInfo()
¡®This sets the short date pattern only¡­you should be thorough and set all patterns when using custom formats.
Dti.ShortDatePattern = ¡°yy/dd/MM¡±
¡®This sets your custom date time format to the current culture of the PC
Globalization.CultureInfo.CurrentCulture.DateTimeFormat = dti
And this is code by Renee:
Thread.CurrentThread.CurrentCulture = new CultureInfo(" Your
Culture designation here ")
1. The way I interpret this code ¨C globalization means all the programme I¡¯ve written can ¡°see¡± the new format - is this correct
2. I don¡¯t understand culture, what is this Does this mean the current computer settings Or does it mean new settings I have made and applying to a programme
2. With this code, I¡¯m not sure where to put it ¨C do I declare it publicly or do I declare it in a private sub
3. What happens after I¡¯ve put it in the programme ie will entered data be automatically set in this new custom date format Or do I need to do anything else to it
Basically, I just don¡¯t know what to do and have been getting nowhere, and I¡¯d appreciate your help.
What I ultimately plan on doing is to write a database-type programme and save the entered data but for now I would just like to learn about custom date formats.
Sorry for the long complicated post!! Basically, I¡¯d like to learn about custom formats and how to do them, and where to put any code. The format I¡¯d like to do for this project is yy/dd/MM
Thanks for your help and advice. Steve Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

how to i delete words after a sertion word in a textbox? hi i would like to know hot to delete all text in a textbox befor a serton letter
for example
dellsrock=cool
i want the dellsrock and the = gone.
thanks for the help. Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Using a DB to define the URLs in a linklabel Hi all, I'm wanting to use a database to hold the links for my link labels so they're easily updated should the link go bad. However, I'm not quite sure how to assign the URL in the database to the linklabel. I've created the bindingsource and tableadapter, and currently have this set up in the code: Me.SpGetLinksTableAdapter.Fill(Me._TEST_DataSet.spGetLinks) I expanded the stored procedure spGetLinks and dragged the Link column onto the first linklabel. When I look at the properties for that linklabel and expand DataBindings it says spGetLinksBindingSource - Link. However, I'm not sure what to do from here (or even if what I've done up to this point is correct). Any ideas Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Where is Dapi.h and Dapi.lib in VS2005 I am doing the migration of a project from vc6 to vs2005, and it include dapi.h which could not be found in vs2005's installation folder. I have installed Exchange Server 2007 SDK, but it could not be fould too.
So i just use the files under vc6 folder, but there is another error:
error C2628: 'BOOL' followed by 'bool' is illegal (did you forget a ';' )
It is caused by the following line:
BOOL bool;
What should I do Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

SerialPort_DataReceived to RichTextBox control in VB2005 Hi
I have been having a difficult time finding the proper way to pass string data that arrived thru the serial port by way of the DataReceived event , to a RichTextBox control on the main form. Moving from VB6 to VB2005 without using the automatic conversion helpers, has been more difficult that i hoped.
I have examined lots of newsgroup posts, looked at posted example code and still I am having trouble.
Some examples work, but appear to be automatically converted VB6 apps with Definstance properties and other items. I would rather understand the proper way to implement this starting from scratch ,using the form designer and the SerialPort control dragged to a form.
I have tried BeginInvoke and Delegate's and used various combinations suggested in other posts but still problems exist.
The serial port functions work fine and the receivied data is properly contained in the string variable in the DataReceived handler. Getting this data to the textbox is the issue.
I have tried using InvokeRequired to determine if BeginInvoke should be used.
Obviously i just do not understand, the concepts even after reading all i can find in MSDN articles.
Currently all builds just fine, but debugger error when data arrivies at DataReceived handler states that BeginInvoke cannot be called on a control until window handle has been created ( im not sure how that can be, as initial text has already been placed in the richtextbox control on the main form window before the SerialPort is created,opened or data has arrived)
So in the display SUB i placed .IsHandleCreated and if i call this Sub from the main form, to display something in the richtextbox, it shows handle created ok, but if i call this same sub from the DataReceived handler it indicates that the handle is not created, and that is why the InvokeRequired always ends up False an i never get serial data to display.
Does anyone have a code snippet of the proper way to use DataReceived and a richtextbox display starting from placing the Serial Port control on the form ,and by way of a thread safe technique ...
I have looked at the C# example but have not been able to properly convert it to VB2005.
thanks
Ken Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Using PrintPreviewDialog(), how can I tell if it was printed or cancelled? Using the PrintPreviewDialog(), I want to execute a command if the document was actually printed. And not execute the command if printing was cancelled. Is this possible
Private Sub btnPreview_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnPreview.Click Dim dlg As New PrintPreviewDialog() dlg.Document = mDoc dlg.WindowState = FormWindowState.Maximized dlg.ShowDialog() End Sub Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Add SQL Database to project Hi, I hope, I'm in the right Group. Everytime I want to add a Empty Database-file (*.mdf) I get the error, that I don't have the SQL Server Express installed. But it is installed and the Server is running. The option "Allow remote connections" is enabled. In VB express I go to "Add -> New" and Database (*.mdf) Please anyone Thank you Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Visual C# WebBrowser with Tabs Is there a way to add tabs to a Tabbed Web Browser I have tried with other codes from threads on this Forum, but to no avail :(,
my web browser is called "webBrowser1" and my Tab Control is called "tabControl1"
thanks,
paoloTheCool Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Flyout application Does anybody knows how i can make my entire application hide when not used
and get visible when i point my mouse over the top end of the screen. (Not in the systray)
Or where i can read about it Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

How to fix this exception: "Access to COM4 is denied" Hi,
I was wondering if someone could help with this. I'm trying to do the activity on this page:
http://www.devx.com/dotnet/Article/32278/0/page/1
I have all of the equipment set up properly and I followed all of the
steps *very* closely. So at the end to test it, I ran the program in
the Basic Stamp2 first, then I ran the Visual basic express
program but I get this exception error:
http://i34.photobucket.com/albums/d136/idrivefreely/exceptionerror.jpg
Next, I tried running the visual studio program first then the Basic
stamp, but when I tried to run the Basic stamp program, it said "No
Basic stamp found."
The Basic stamp program works fine if I just run it alone, it shows the
debug window with the sensors working correctly. I'm the administrator of
this computer so I should be able to have access to all the ports
correct So why does visual studio say that access to COM4 is denied
I'm using visual basic express 2005 edition so do I need another
version of visual basics
Any help is greatly appreciated.
Edit1: Even though the port given in the tutorial shows COM5, mine is
COM4 because I compared his debug window and my debug window. I also
went to Device Manager> Ports(COM & LPT)> usb(COM4) to verify
if I'm using the right port. Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Moving/Flowing from form to form Hello,
Is there a way that I can move from form to form similiar to the way you click on a link on websites What I mean is that each time the user click on a button, it opens a new form because I'm using Show() or ShowDialog(). But what I would like is, for example, if a user hits the Next button, then the next form will show up in the same position as the first form and the first form will be closed. Kind of like going from one webpage to another by clicking a link under the same browser window.
Hm. Relating to this.. what does FlowLayoutPanel do Will it allow me to flow from one sets of Controls to another If so, then I can just put everything on one Form, right
Thanks Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

How to use DllImport and Fix the error ? Dear everyone,
I have written a managed C++, and then used it to C#.
I have written the code like this ======================================= [DllImport("ManagedFour.dll", EntryPoint = "Test")] public static extern void Testing(); =======================================
in order to call the Test in the dll.
However, there is an error like this: ========================================================= Unhandled Exception: System.EntryPointNotFoundException: Unable to find an entry point named Test in DLL ManagedFour.dll. at CSharp.TempObj.Testing() at CSharp.TempObj.func() in c:\vsprojects\managedc++\csharp\class1.cs:line 17 at CSharp.Class1.Main(String[] args) in c:\vsprojects\managedc++\csharp\class 1.cs:line 68 =========================================================== What is the problem How to fix it Thank you. Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Start Menu Shortcut Location / Name Hi
I have just created my first ever very simple vbe program. When i run the setup file all works fine apart from one issue, the shortcut for the program is placed into a folder in my start menu called Toshiba. This folder already exsisted on my machine so at first i thought it was a problem on my laptop, but when i load the program onto other machines it creates a folder called toshiba in the start menu with the program shortcut within it.
Is there a way to change or set the name of the start menu shortcut / folder before deploying the program
I assume the start menu shortcut should be named with the programs name
Thanks in advance for any help......
Nige Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Here is sample code for automation reporting (using databgridview, tables and also spreadsheet gear) This is setup to work with tables that are related by foreign key
This particular setup has 3 tables that have foreign keys in a chain
table 1 (patient table) - patientID
\
foreign key
\
Table 2 (visit table) - PatientID and - visitID
\
Foreign key
\
Table 3 (charges table) - VisitID
The way this works is to use the automatic filtering in the datagridviews when you click on a patient record
If you have all three tables on a form then they will filter automatically for you
Make sure that you are using the tables that are all under the same parent table in your data sources explorer
They have to be those tables otherwise they will not filter properly
To see this you can expand all the tables in the explorer, then you will see the relations that are setup.
The following code automates the datagridview with the movenext() method and gets the values in the current row
Then it add the values to the current selected row in the spreadsheet
The automation of the spreadsheet is with the offset() method which moves the activecell to the next row
It also selects the entire row to create a current row instance (this is necessary to use the "current row")
Not allowinng the adding of rows in the datagridview in the beginning is to handle the process of getting the total row counts.
If you leave the blank row (to add new records) it will throw off your count.
You can normally handle this by subtracting 1 or 2 from the total rows, however when you don't have any records this gets thrown off.
I was first using a datagridview instead of the spreadsheet, however i realized after a few hours of playing, when i added the rows to it they were added at the top of the list instead of at the end.
You can insert rows at a certain index (which would be the last current one) but i decided to go with the spreadsheet.
I also have code at the end to format the sheet as a nice, professional looking report without gridlines, sheet tabs, and without row and column headers.
It is also formatted to split and freeze the header row so that you can scroll through the report still see the header labels.
Anyway, i hope this helps some of you
And i did purposely leave this one as a question because i was told by a moderator that it will not come up in a search if it is a comment.
Private Sub Button8_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Form1.Show()
Form1.WorkbookView1.GetLock()
Me .PatientDataGridView.AllowUserToAddRows = False
Me .VisitDataGridView.AllowUserToAddRows = False
Me .PaymentDataGridView.AllowUserToAddRows = False
Dim patrecordcnt As Integer = Me .PatientDataGridView.Rows.Count '- 2
Dim pattracker As Integer = 0
Dim visrecordcnt As Integer = 0 'Me.VisitDataGridView.Rows.Count '- 1
Dim vistracker As Integer = 0
Dim patcellcnt As Integer = 0
Dim viscellcnt As Integer = 0
Form1.WorkbookView1.ActiveCell.EntireRow.Select()
With Form1.WorkbookView1.RangeSelection
.Cells(0, 0).Value = "Patient ID"
.Cells(0, 1).Value = "Last Name"
.Cells(0, 2).Value = "First Name"
.Cells(0, 3).Value = "Visit ID"
.Cells(0, 4).Value = "Visit Date"
.Cells(0, 5).Value = "Visit Description"
End With
Form1.WorkbookView1.ActiveCell.Offset(1, 0).Select()
Form1.WorkbookView1.ActiveCell.EntireRow.Select()
Do While pattracker <> patrecordcnt
Form1.WorkbookView1.ActiveCell.Offset(1, 0).Select()
Form1.WorkbookView1.ActiveCell.EntireRow.Select()
With Form1.WorkbookView1.RangeSelection
.Cells(0, 0).Value = Me .PatientDataGridView.CurrentRow.Cells(0).Value
.Cells(0, 1).Value = Me .PatientDataGridView.CurrentRow.Cells(1).Value
.Cells(0, 2).Value = Me .PatientDataGridView.CurrentRow.Cells(2).Value
End With
If Me .VisitDataGridView.Rows.Count > 0 Then
visrecordcnt = Me .VisitDataGridView.Rows.Count '- 1
vistracker = 0
Do While visrecordcnt <> vistracker
'outline format #1
'Call this instead of #2 to start the visits on the line after the patient
Form1.WorkbookView1.ActiveCell.Offset(1, 0).Select()
Form1.WorkbookView1.ActiveCell.EntireRow.Select()
With Form1.WorkbookView1.RangeSelection
.Cells(0, 3).Value = Me .VisitDataGridView.CurrentRow.Cells(0).Value
End With
'start here for the payments
Me .VisitBindingSource.MoveNext()
vistracker = vistracker + 1
'outline format #2
'Call this instead of #1 to start the visits on the same line as the patient
'Form1.WorkbookView1.ActiveCell.Offset(1, 0).Select()
'Form1.WorkbookView1.ActiveCell.EntireRow.Select()
Loop
End If
Me .PatientBindingSource.MoveNext()
'visrecordcnt = Me.VisitDataGridView.Rows.Count '- 1
'vistracker = 0
'patcellcnt = viscellcnt
'patcellcnt = patcellcnt + 1
pattracker = pattracker + 1
Loop
With Form1.WorkbookView1.ActiveWorksheet
.UsedRange.Columns.AutoFit()
.UsedRange.Cells.HorizontalAlignment = SpreadsheetGear.HAlign.Center
.UsedRange.Cells(0, 0).Select()
.Workbook.WindowInfo.DisplayWorkbookTabs = False
.WindowInfo.DisplayGridlines = False
.WindowInfo.DisplayHeadings = False
.WindowInfo.SplitRows = 1
.WindowInfo.FreezePanes = True
End With
Form1.WorkbookView1.ReleaseLock()
Me .PatientDataGridView.AllowUserToAddRows = True
Me .VisitDataGridView.AllowUserToAddRows = True
Me .PaymentDataGridView.AllowUserToAddRows = True
Me .PatientBindingSource.MoveFirst()
End Sub Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Tabbed Web Browsing hi everyone at the moment I'm trying to make a web browser which supports tabbed web browsing I've made it so that you can click a button to add new tabs but I'm not sure how to make the address text box control the tab which is currently being viewed, at the moment it's only able to control the first tab.
How do I get it to control the tab which is currently being viewed and also how do I get the web page's name to be shown on the tab
my code so far :
Public Class Browser
'Creating an instance of the Navigate class
Dim NavigateWindow As New Navigate
Private Sub Browser_Click( ByVal sender As Object , ByVal e As System.EventArgs) Handles Me .Click
End Sub
Private Sub Form1_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load
' Disabling both navigation buttons in the Icons tool strip
Me .tsbBack.Enabled = False
Me .tsbForward.Enabled = False
Me .lblApplicationStatus.Text = "Ready"
End Sub
Private Sub HelpToolStripMenuItem_Click( ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub AboutToolStripMenuItem_Click( ByVal sender As Object , ByVal e As System.EventArgs)
AboutBox1.ShowDialog()
End Sub
Private Sub AboutBox_Click( ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub AboutToolStripMenuItem_Click_1( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem1.Click
End Sub
Private Sub AboutToolStripMenuItem1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutToolStripMenuItem1.Click
AboutBox1.ShowDialog()
End Sub
Private Sub tsbBack_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbBack.Click
myBrowser.GoBack()
End Sub
Private Sub tsbForward_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbForward.Click
myBrowser.GoForward()
End Sub
Private Sub tsbStop_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbStop.Click
myBrowser.Stop()
End Sub
Private Sub tsbRefresh_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbRefresh.Click
myBrowser.Refresh()
End Sub
Private Sub tsbHome_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbHome.Click
myBrowser.GoHome()
End Sub
Private Sub tsbSearch_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbSearch.Click
myBrowser.GoSearch()
End Sub
Private Sub myBrowser_DocumentCompleted( ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs)
'Get Application title using the My namespace
If My .Application.Info.Title <> "" Then
Me .Text = My .Application.Info.Title + " - " + e.Url.Host.ToString()
Else
'If the applicaton title is missing,
'use the application name, without the extension
Me .Text = System.IO.Path.GetFileNameWithoutExtension( My .Application.Info.AssemblyName) + " - " + e.Url.Host.ToString()
End If
Me .lblApplicationStatus.Text = "Ready"
End Sub
Private Sub myBrowser_Navigating( ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs)
' Add the code to enable or disable whenever there are URLs
'in the browsing session's history
If myBrowser.CanGoBack Then
tsbBack.Enabled = True
Else
tsbBack.Enabled = False
End If
If myBrowser.CanGoForward Then
tsbForward.Enabled = True
Else
tsbForward.Enabled = False
End If
' Modifying the label in the status strip with the URL entered by the user
Me .lblApplicationStatus.Text = "Opening page: " + e.Url.Host.ToString()
End Sub
Private Sub myBrowser_ProgressChanged( ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserProgressChangedEventArgs)
' The CurrentProgress variable from the raised event
' gives you the current number of bytes already downloaded
' while the MaximumProgress is the total number of bytes
' to be downloaded
If e.CurrentProgress < e.MaximumProgress Then
' Check if the current progress in the progress bar
' is >= to the maximum if yes reset with the min
If pbStatus.Value >= pbStatus.Maximum Then
pbStatus.Value = pbStatus.Minimum
Else
' Just increase the progress bar
pbStatus.PerformStep()
End If
Else
'When the document is fully downloaded
'reset the progress bar to the min (0)
pbStatus.Value = pbStatus.Minimum
End If
End Sub
Private Sub tstbUrl_KeyUp( ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles tstbUrl.KeyUp
'e is of type KeyEventArgs and contains all the
'information that triggered the event. The KeyCode
'is one those information.
If e.KeyCode = Keys.Enter Then
Me .NavigateToUrl(tstbUrl.Text)
End If
End Sub
Private Sub NavigateToUrl( ByVal Url As String )
Me .myBrowser.Navigate(Url)
End Sub
Private Sub tsbGo_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbGo.Click
Me .NavigateToUrl(tstbUrl.Text)
End Sub
Private Sub NavigateToolStripMenuItem_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NavigateToolStripMenuItem.Click
If (NavigateWindow.ShowDialog() = Windows.Forms.DialogResult.OK) Then
Me .NavigateToUrl(NavigateWindow.txtUrl.Text)
End If
NavigateWindow.txtUrl.Text = ""
End Sub
Private Sub SToolStripMenuItem_Click( ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub ToolStripMenuItem1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim x As New TabPage
With x
Dim x1 As New WebBrowser
x1.Dock = DockStyle.Fill
x1.Navigate( New Uri( "http://www.microsoft.com" ))
.Controls.Add(x1)
End With
Me .TabControl1.TabPages.Add(x)
End Sub
Private Sub Button1_Click_1( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x As New TabPage
With x
Dim x1 As New WebBrowser
x1.Dock = DockStyle.Fill
x1.Navigate( New Uri( "http://www.microsoft.com" ))
.Controls.Add(x1)
End With
Me .TabControl1.TabPages.Add(x)
End Sub
End Class
-------------------------------------------------------CODE END------------------------------------------------------------------------
The first ab is called myBrowser if that matters.
Do i have to do the same as i have for myBrowser for each tab or is it easier than that
THX IN ADVANCE :) Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Note to MX Martin,
Many months ago, I posted a tutorial on Debugging. There have been a lot of requests for it to be pinned up permanently. If we can find it, will you make it a Sticky
Since this is a personal not, feel free to delete it if you feel a need to do so. Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Automation to get excel data to your database (getting started) I haven't put the whole thing together yet.
This is just to give you an idea of how it will work incase anyone wants to give it a try.
The basics are here you just have to put it together.
Here is the basic process:
you have a datagridview and a details view (textboxes) on a form
(you don't have to have the gridview but it helps to see it work)
once the file is open you can use navigation code that will loop through the row (one cell at a time)
and put the data from each cell into the corresponding textbox (the boxes are bound to the grid so they will update it)
use code to navigate to the next row in the datagridview
move to the next row of cells in excel.
The key to doing this with the excel rows is to use the offset method
Let's say that you start with cell A1
you will use the select method to activate that cell range("A1").select
you then tell it that textbox1.text = activecell.value
then you call offset to move to the next cell in the row
then textbox2.text = activecell.value
you continue this on untill you reach the end of your row then you can call the offset to jump back to the beginning of the row
and then offset down 1 to the next row.
Now you can add a new record to the datagridview and repeat the process
You can wrap this entire code in a do loop
The do loop will be something simple like do until activecell.value = "" (a blank cell at the end of your rows in excel)
Here is some sample code to get you started
Dim oExcel As Excel.Application
Dim oBook As Excel.Workbook
Dim oSheet As Excel.Worksheet
oExcel = CreateObject( "Excel.Application" )
oBook = oExcel.Workbooks.open( "c:\Book1.xls" , [ReadOnly]:= False )
oExcel.Visible = True
oExcel.DisplayAlerts = False '//So It doesnt prompt
oSheet = oBook.Worksheets(1) '.Worksheets("Sheet1") ¡®.worksheets(¡°sheetname¡±)
oSheet.select()
oSheet.Range( "A1" ).Value = "Test worked"
'oSheet.delete()
oBook.SaveAs( "C:\Book1.xls" )
as you can see the reference that will let you navigate the cells is osheet
offset example: osheet.activecell.offet(1, 0).select
the (1, 0) is the row and column reference ( i always forget which one is row and which is column)
this is not a specific cell reference this is a direction reference (hence the word offset) (move)
you can use postive numbers to move right and down
and negative numbers to move left and up
You can increase the offset by any number
let's say you have 6 columns and you want to offset to the last column you would use (6, 0) or (0, 6)
here is some sample code to add a new row of data
Private Sub Button5_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Me .BindingContext(DataSet1, DataSet1.Customers.TableName).AddNew()
End Sub
"TableName" Do not change this "customers" is the name of your table
I see many people asking about excel so i thought this might interest some of you.
If anyone puts it together then please post for everyone. I will do the same if i get time for it. I need to work on my own project for a little while. Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Windows Media repeat Im building an application that uses Windows Media Player. Im adding my own controls to it but i was a repeat button. can someone help me with the code for this Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

question (sort of hard to explain in subject) Ok, I am making an application that has multiple "things" to it.
I want to make a form that has, say, 3 links to other forms in it. One that links to a form with a webbrowser, one with a form with a notepad, and one that links to a form with a media player. But, i don't want the other 3 forms to be shown at startup...can someone help me with this
Along with that can someone give me a code to use for the media player so they can choose music from their computer to play in it
Please and Thank you Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Help!!! This code is killing my Computer. I am writing to kindly to ask you guys for help. I have been working with the lines of code below which merely locking up and disabling the computer: Private Sub Alert_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Alert_btn.Click Dim conn As New SqlClient.SqlConnection(My.Settings.CSTConnectionString) Try If conn.State <> ConnectionState.Open Then conn.Open() Catch ex As SqlClient.SqlException Debug.Assert(False, ex.ToString) End Try Try Dim Command As New SqlClient.SqlCommand("SELECT * FROM dbo.CUSTOMERS", conn) Dim dataReader As SqlClient.SqlDataReader = Command.ExecuteReader(CommandBehavior.CloseConnection) dataReader.Read() While dataReader.HasRows Dim newAlert As New Alert (dataReader("COMMENTS").ToString(), DateTime.Parse(dataReader("DATE").ToString())) Me. collectionOfAlerts .Add( newAlert ) End While conn.Close() Console.WriteLine(conn.State.ToString) 'Closed Catch ex As Exception Debug.Assert(False, ex.ToString) End Try End Sub ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ The Class, reminder linked to the button, Alert_btn is as follows: 'Class Reminder Public Class Reminder Dim alertDesc As String = String.Empty Dim alertTime As DateTime = DateTime.Now Dim isAlertOn As Boolean = False Dim timer As New System.Timers.Timer(1000) 'every second Public Property AlertDescription() As String Get Return Me.alertDesc End Get Set(ByVal value As String) Me.alertDesc = value End Set End Property Public Property TimeOfAlert() As DateTime Get Return Me.alertTime End Get Set(ByVal value As DateTime) Me.alertTime = value End Set End Property Public Property IsAlertActive() As Boolean Get Return Me.isAlertOn End Get Set(ByVal value As Boolean) Me.isAlertOn = value End Set End Property Public Sub New(ByVal descOfAlert As String, ByVal timeOfAlert As DateTime) Me.alertDesc = descOfAlert Me.alertTime = timeOfAlert Me.isAlertOn = True Me.timer.AutoReset = True Me.timer.Enabled = True AddHandler timer.Elapsed, AddressOf timer_elapsed Me.timer.Start() End Sub Private Sub timer_elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) If Me.isAlertOn Then If Me.alertTime = DateTime.Now Or Me.alertTime <= DateTime.Now.AddMinutes(-2) Then System.Windows.Forms.MessageBox.Show("alert from " & Me.AlertDescription) Me.isAlertOn = False End If End If End Sub End Class Please guys what can I do so that this code works properly - free up and release the memory after each alert Any input is greatly appreciated. Thanks. Tag: Visual Basic Express Edition Listview item double click Visual Studio Express Editions

Abualnassr

Hi.

I have a listview that gets it's data from a database. What i wanna do is i want the user when he doub click an item, a new form will be shown with detailed information about that clicked item.