|
Hi, I have to create a mutli user application in VB6 with MS Access as the backend. How do make sure that a record, if opened by one user, cannot opened by another user?
Sreejit
|
|
|
|
|
Hello everyone..
I have this task where I have to develop a customized media player that can play the following;
1. All types of movie files (wmv,asf,avi,mpeg,mov, etc.)
2. All types of audio files
3. Flash files (swf)
3. PowerPoint files
The player will read a playlist, which is an xml file, and then retrieve the contents from a server, and play the files accordingly.
Another issue is how to go about streaming the contents. I'm thinking of while playing the first file from the list, the second file will be downloaded at the same time. The idea is when the first file is done, the second one will take place, and so forth. The contents will be published on a plasma tv.
Can anyone help me on how to code this in vb.net? Any suggestion on the application design? Any sample codes that I can get from the internet for my guidance?
Thanks in advance for helping..
Alkazam.
|
|
|
|
|
VB.NET is utterly incapable of writing a movie player. However, it's also true that it's a waste of time to do so anyhow, when several exist already.
You want to embed the Windows Media Player control in your app. Do NOT use managed DX, as it's utter crap ( see my article ). You will have to embed something else for swf files, probably IE, and I have no idea if you can embed PowerPoint or not.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
In VB 6.0 , how to set a node to the top of the treeview?
There is many node in a treeview,we could scroll the bar and select the node.
However, I want to select the node by code, and show it to the user, not hiden in the scrollbar.
Thanks!
|
|
|
|
|
This is my message.
I clear the cookie and do not login just a moment ago.
|
|
|
|
|
If you are trying to make a node move to the top of the TreeView:
Dim tmpText As String
Dim tmpChecked As Boolean
TreeView1.Nodes.Remove 10
TreeView1.Nodes.Add 1, , , tmpText
TreeView1.Nodes(1).Checked = tmpChecked
Or if you want to make sure the user can see the node:
TreeView1.Nodes(9).EnsureVisible
There is probably an easier way of moving nodes. Hope this code helps you.
|
|
|
|
|
Is it possible to make a form unmovable? If so, please give some hints on how .
|
|
|
|
|
Catch the move event and move the form back to where you want it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Use the following API:
SetWindowPos Me.hwnd, 0, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
|
|
|
|
|
hey, i'm trying to get the address from an IE window starting with "Hello There", but i ran into some problems. i'm using VB6. here's the code :
[code]
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Sub Form_Load()
Dim hMain, hNext, winhandle As Long
Dim wintitle, address, tmp1 As String
Const GW_CHILD = 5
Const GW_HWNDNEXT = 2
hMain = GetDesktopWindow()
hNext = GetWindow(hMain, GW_CHILD)
While hNext <> 0
hNext = GetWindow(hNext, GW_HWNDNEXT)
If IsWindowVisible(hNext) <> 0 Then
If Len(wintitle) > 0 Then
If wintitle <> "Program Manager" Then
If Left(wintitle, 11) = "Hello There" Then
winhandle = FindWindow("IEFrame", wintitle)
winhandle = FindWindowEx(winhandle, 0, "WorkerW", 0)
winhandle = FindWindowEx(winhandle, 0, "ReBarWindow32", 0)
winhandle = FindWindowEx(winhandle, 0, "ComboBoxEx32", 0)
tmp1 = SendMessage(winhandle, WM_GETTEXT, 24, address)
End If
End If
End If
End If
Wend
End Sub
[/code]
the first hNext returns a handle, but the first line after while doesn't.
can anyone correct the above code?
|
|
|
|
|
You can do this much easier by using the Shell.Application object. Here's a little VBScript sample:
Dim objIE, i, count
Set objShell = CreateObject("Shell.Application")
Set objShellWindows = objShell.Windows
count = objShellWindows.Count
WScript.Echo "Shell Windows: " & nCount
count = count - 1
for i = 0 to nCount
set objIE = objShellWindows.Item(i)
if (not objIE is nothing) then
WScript.Echo " #" & i + 1 & " Location Name: " & objIE.LocationName
WScript.Echo " #" & i + 1 & " Location URL : " & objIE.LocationURL
end if
next
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i put the script in VB6 in Private Sub Form_Load() but when i try to run it it says Object Required on this line : WScript.Echo "Shell Windows: " & nCount
|
|
|
|
|
That was NOT copy and paste code! I said that was VBScript, not VB6! It has to be converted to VB6 with a little effort.
WSCript is the scripting host that runs the code. WScript doesn't exist in VB6, but you can still use the Shell.Application object. Set a reference to "Microsoft Shell Controls and Automation", then you can create a Shell object and use it's Application property, just like in the sample code.
Dim shell As New Shell32.shell
Set objShell = shell.Application
count = objShell.Windows.Count
For i = 0 To count - 1
Set objIE = objShell.Windows.Item(i)
...
Next
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello people
Urgently need some help please please.
I am currenlty creating a programme, and i need code for the following if possible.
I am trying to make a label turn yellow when it generates random numbers 1-9.
I have 6 labels which all generate random numbers between 1-50 in all of the 6 boxes in any order any 1 number will not be generated twice.
I hope this makes sense
SARAH
|
|
|
|
|
Does a label have a Brush property ? It's my recollection that it doesn't, I had to write my own Label control in order to be able to specify the brush used to draw the text.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
SARAH,
Dim intRandom As Integer
Dim originalColour As System.Drawing.Color = Me.Label1.BackColor
intRandom = cint((rnd() * 49) + 1)
If intRandom > 0 And intRandom < 10 Then
Me.Label1.BackColor = Drawing.Color.Yellow
Me.Label1.Refresh()
Else
Me.Label1.BackColor = originalColour
Me.Label1.Refresh()
End If
Regards
Richard
|
|
|
|
|
I know this is a silly question. But how do I define the columns in a dataset.
So after I have created a new dataset,
Dim DS as DataSet
How do I add columns. I know how to do it to a dataset that has already been filled from a database, but this does not appear to work for newly created DataSets.
|
|
|
|
|
You don't add columns to a DataSet, you add a DataTable to a DataSet, then add columns to the DataTable.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
' Create a DataSet:
myDataSet = New DataSet("myDataSet")
Dim tCust As DataTable
tCust = New DataTable("Customers")
' Create three columns and add them to the first table:
Dim cCustID As DataColumn
cCustID = New DataColumn("custID")
Dim cCustName As DataColumn
cCustName = New DataColumn("custName")
Dim cCurrent As DataColumn
cCurrent = New DataColumn("custCity")
tCust.Columns.Add(cCustID)
tCust.Columns.Add(cCustName)
tCust.Columns.Add(cCurrent)
' Add the table to the DataSet:
myDataSet.Tables.Add(tCust)
' Populate the table:
Dim newRow1 As DataRow
' Create three customers in the Customers table:
Dim i As Integer = 1
Do While (i < 4)
newRow1 = tCust.NewRow
newRow1("custID") = i.ToString()
tCust.Rows.Add(newRow1)
i += 1
Loop
' Give each customer a distinct name:
tCust.Rows(0)("custName") = "John Summers"
tCust.Rows(1)("custName") = "Phil Seagram"
tCust.Rows(2)("custName") = "Sam Robinson"
' And address:
tCust.Rows(0)("custCity") = "Chicago"
tCust.Rows(1)("custCity") = "Los Angeles"
tCust.Rows(2)("custCity") = "Washington"
|
|
|
|
|
Hello, I'm a beginner in VB.NET
I would like to use the NetShareEnum API to list share of a remote computer.
I have found a lot of topics about it but no one is working for VB.NET
I would like to display shares in a listbox.
Use a textbox to enter the target computer.
And one textbox to enter the password for the remote computer.
If someone can help me. I'm going mad !!!!
|
|
|
|
|
So you want to use the API and not a call to the Net.exe executable? Easy with a call to the shell app. I don't know how to access the API for that if there is one.
Thanks,
Taen Karth
|
|
|
|
|
Hello,
I don't want to use external "exe" file with a shell.
The NetShareEnum API is create specially for list share on remote computer.
For all these reasons I would like to use this API.
But If nobody show me the way, I think I will use your solution.
Thanks for your help
|
|
|
|
|
There are a couple of samples on the web, even one here on CodeProject. Have a look at this[^]. It in C#, but the code can be converted to VB.NET with reasonable effort.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to make a property for my custom control with name "RelatedLabel" that sets or gets a Windows Forms Label Control.
How do I list all the Label Controls (names) in the Form in a Property window in the design time.
Such as AcceptButton or CancelButton property of Windows Form.
I hope u understand my question
Thank You
-- modified at 12:30 Thursday 1st September, 2005
|
|
|
|
|
When you expose a public property that is of type Button, Label, Text, ScrollBar, etc, Visual Studio automatically lists all the controls of your property type available in the form at design time.
|
|
|
|