|
Seriously ? You typed 'play video VB.NET' into google and couldn't find one reference ?
Drag the windows media player control onto your form ( you may need to add it to the available options, which you do via the right click menu ), point it to your video and you're done.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
I'm having a problem when creating an ms access database using the following code:
Imports System.Data.OleDb
Public Class Database
Public Function CreateDatabase(ByVal FileName As String) As Boolean
Dim ADOXCatalog As ADOX.Catalog = New ADOX.Catalog
Dim ADOXTable As ADOX.Table = New ADOX.Table
Dim ADOXindex As ADOX.Index = New ADOX.Index
Dim oConnect As String
oConnect = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & FileName
Try
ADOXCatalog.Create(oConnect)
ADOXTable.Name = "tblContacts"
ADOXTable.Columns.Append("ID", ADOX.DataTypeEnum.adInteger)
ADOXTable.Columns.Append("Nick", ADOX.DataTypeEnum.adVarChar, 64)
ADOXTable.Columns.Append("RealName", ADOX.DataTypeEnum.adVarChar, 64)
ADOXTable.Columns.Append("Age", ADOX.DataTypeEnum.adInteger)
ADOXTable.Columns.Append("BirthDate", ADOX.DataTypeEnum.adDate)
ADOXTable.Columns.Append("Address", ADOX.DataTypeEnum.adVarChar, 256)
ADOXTable.Columns.Append("PhoneNum", ADOX.DataTypeEnum.adVarChar, 32)
ADOXTable.Columns.Append("email1", ADOX.DataTypeEnum.adVarChar, 64)
ADOXTable.Columns.Append("email2", ADOX.DataTypeEnum.adVarChar, 64)
ADOXTable.Columns.Append("email3", ADOX.DataTypeEnum.adVarChar, 64)
ADOXTable.Columns.Append("Notes", ADOX.DataTypeEnum.adVarChar, 4096)
ADOXCatalog.Tables.Append(ADOXTable)
ADOXindex.Name = "IDindex"
ADOXindex.Columns.Append("ID")
ADOXTable.Indexes.Append(ADOXindex)
Catch ex As System.Runtime.InteropServices.COMException
Catch ex As Exception
MsgBox(ex.Message & vbCrLf & ex.StackTrace)
Return False
Finally
ADOXCatalog = Nothing
End Try
Return True
End Function
End Class
the database gets created but when i open it using MS access 2007 it's empty.. no tables
|
|
|
|
|
I am having a problem dragging and dropping into a datagrid. I have the code, and it works for certain cells in the datagrid, but items that are dates or integers (as opposed to strings) the hittest does not work. Here's the code:
Private Sub DataGrid1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles DataGrid1.DragDrop
Dim lbl As String = DirectCast(e.Data.GetData(GetType(String)), String)
Dim Index As Integer
TextBox1.Text = lbl
DataGrid1.BorderStyle = BorderStyle.Fixed3D
Dim pt As Point = DataGrid1.PointToClient(New Point(e.X, e.Y))
Dim hti As DataGrid.HitTestInfo = DataGrid1.HitTest(pt.X, pt.Y)
hitRow = hti.Row
hitCol = hti.Column
If hti.Type = DataGrid.HitTestType.Cell Then
DataGrid1(hti.Row, hti.Column) = lbl
End If
Label6.Text = hitRow
Label7.Text = hitCol
Label9.Text = Me.DataGrid1(hti.Row, 8).ToString()
End Sub
Any ideas?
|
|
|
|
|
heeelloo to all plz help me out, i want to add records to recordset executing stored procedure , hw cn i do dt plzzzz its urgent
Thanks in Advance plzzzz
Parag
|
|
|
|
|
Why is there a sudden influx of people using VB6 ? It always sucked, it's long dead, why are you using it ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi all
I am trying to take an XML response from a web server and putting it into a Dataset
I am using a streamreader to pass the xml stream to the readxml method of the dataset, however I am finding that I am not getting all the data..
this might explain myself better.. if i do this:
HttpWebResponse oResp = (HttpWebResponse)myReq.GetResponse();
StreamReader oResultSR = new StreamReader(oResp.GetResponseStream(), encoding);
sMessage = oResultSR.ReadToEnd();
TextWriter tw = new StreamWriter(@"c:\hmmm.txt");
tw.WriteLine(sMessage);
tw.Close();
that works fine and my text file has all the xml data I need
however if i do this (which i want):
HttpWebResponse oResp = (HttpWebResponse)myReq.GetResponse();
StreamReader oResultSR = new StreamReader(oResp.GetResponseStream(), encoding);
DatasetXML[a].ReadXml(oResultSR);
DatasetXML[a].WriteXml(@"c:\hmmm.xml");
it only gives me the 1st node of the xml and not the rest
anyone know why?
|
|
|
|
|
sorry wrong forum meant to post in c# !
|
|
|
|
|
Is it possible to unload a loaded assembly in vb.net? Any help appreciated.
ty
|
|
|
|
|
Not unless you loaded it into a separate AppDomain than your main executable.
|
|
|
|
|
Hello
Yes, I understand I have to load a separate appdomain. But I have not been able to write any code that actually works. Would anyone have code that successfully loads and unloads an app that they would share?
ty
|
|
|
|
|
Anyone ever successfully loaded an app from an appdomain? Could really use your help if you have. Thanks
|
|
|
|
|
Why do would two displays of the same form, on different machines, but both with the same monitor display settings, look different? You can see them at:
www.cstrader.com/displays.png
Thank you
|
|
|
|
|
cstrader232 wrote: but both with the same monitor display settings
Because other display settings are different. The user of one has chosen a different colour scheme, larger fonts and larger title bar.
|
|
|
|
|
Yes, but that's not the issue. Changing these details doesn't matter. Particuarly I'm wondering about the arrangements of the controls in the left groupbox. Why the heck are they spread out properly in one but not in the other. Anyone ever had this issue?
Thanks
|
|
|
|
|
cstrader232 wrote: Particuarly I'm wondering about the arrangements of the controls in the left groupbox. Why the heck are they spread out properly in one but not in the other.
The controls in both screenshots ARE arranged the same way as far as I can see. However, in one screenshot they are spread out (which not the same concept as arrangement).
The reason they are spread out, as I've already said, is that the font sizes on each computer is set differently. The larger the font size the more spread out things will be.
If I'm missing something then please detail exactly which portion of each screenshot I should be looking at.
cstrader232 wrote: Anyone ever had this issue?
It isn't an issue, it is a user preference setting that your application is adjusting for.
|
|
|
|
|
Not to mention, one appears to be using the classic theme and the other using the update XP theme. That'll make a difference in control appearance.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Wait, this doesn't seem right. I tried changing the font size -- display properties, appearance, fontsize, large fonts (rather than normal), and it made no difference in the size of my controls.
|
|
|
|
|
Goto display settings - appearance - advanced. Changing settings there are global are they not?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Maybe, but I can't determine which of the advanced settings controls the size of a button.
|
|
|
|
|
Just a guess, but did is the DPI setting the same on both machines? (Display Properties -> Settings -> Advanced -> General tab)
|
|
|
|
|
Nice guess Dave!! That was spot on....problem solved (whew!)
Care to reply to my topic "unloading assembly?"
|
|
|
|
|
..although how to solve the problem is not obvious. Anyone else figure out how to repond when the user changes the DPI setting?
|
|
|
|
|
Setting the form property autoscalemode to inherit seems to have helped this problem.
|
|
|
|
|
Hi..I'm working with VB6 & I need to know how to create a login window with including unique username & password.here is a code which is in a OK button in VB6 form.
Private Sub cmdOK_Click()
'check for correct password
If txtPassword = "123" Then
'place code to here to pass the
'success to the calling sub
'setting a global var is the easiest
LoginSucceeded = True
Me.Hide
frmMain.Show
Else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub
There was only unique password in here & it can use any username. But i think if the username also unique,it'll be great.
And I also need to know how to create a seperate window to change those login details(username,password),with including 'current username','current password','new username','new password','confirm password' details.
Thanks a lot..
|
|
|
|
|
Hi......
To do so, you need to store your unique username and password to a file and each time user logs in, your code should check that file for correct username and password.
The code you are using will not change your username and password permanently.
So there is a better way to store username and password in a file or Database.
Gagan
|
|
|
|