|
Doesn't a VB command line app get passed the arguments collection ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi everybody
I need some help! I created an AVI animation to display in a form
but i can't understand what color I need to use to have the background
transparent (the mask color). I tried with FUCSIA but it doesn't work.
I designed the bitmaps with Paint and converted to AVI using Virtual Dub.
Any Idea?
Thanks in advance
OS: Win 2K
SDK: Visual Studio 6/Visual Basic
|
|
|
|
|
IIRC, you can't set a transparency in a movie and expect to see the form behind it. The WMP control that's displaying the movie doesn't support a transparent background, if that's what your using.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm using the animation control (part of MS common controls). The strange thing is that with sample movie clips in Visual Studio (for example, the file copy or computer search) the trick works good. The AVI has a fucsia background and the color of the form behind is displayed.
What do you think?
thanks in advance Dave
|
|
|
|
|
I've never used the thing.
But, I've found an abscure reference that says that the pixel in the upper left corner of the first frame becomes the transparency key color. But, this does NOT make the AVI transparent, rather it substitutes the parent containers background color (in your case, the form color) for each pixel that has the transparency key color. This makes the background color (or transparency key) match the host container color.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
That's amazing!!!!
It's what I was looking for!!! In fact I don't need to have my AVI with a transparent color but I only want to use it with a masking color for the background.
Thanks a lot Dave
TheKriminal
|
|
|
|
|
how can i load data from access back onto the treenodes ...
is it correct ...
TreeView1.Nodes.Clear()
objCon.Open()
adapter1 = New Odbc.OdbcDataAdapter("Select * from RemoteHost", objCon)
data = New DataSet
adapter1.Fill(data, "RemoteHost") 'l
Dim I, j, Categoria
For I = 0 To data.Tables("RemoteHost").Rows.Count - 1
Categoria = data.Tables("RemoteHost").Rows(I).Item("General").ToString
TreeView1.Nodes.Add(Categoria)
TreeView1.Nodes(I).ImageIndex = 0
Next
objCon.Close()
|
|
|
|
|
How to add an icon into resources in VB?
And how i can use it from resources?
Give me please a code sample
|
|
|
|
|
Hello, can someone help me, i want to move three sliders at the same time, like the Volume Control on Windows, i've tried a lot of thing but without any success, can someone help me to do it, please?
UltraMAX
|
|
|
|
|
Off the top of my head, handle the Scroll event of each slider. Set the Value of the other two sliders to the Value of the slider being changed.
Don't know if this will work at all considering I haven't touched VB6 in years.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you for replying Dave, i don't want to move all with the same value, a good example of what i want to do is the Windows Speaker Volume, when i check to move the sliders at the same time, it will do, event if they have different values, please, "play" a little with that to see what i'm trying to do and if you can help me!!
Thanks,
UltraMAX
|
|
|
|
|
You'll have to track the values seperately from the control's actual values. When one of the sliders changes, calculate the change from the last saved value and apply the change to the other values and control's actualt values.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i m getting this error (on Execute line) when i m inserting Data in database....
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in tab.exe
Additional information: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 3.
Public strSQL As String
Public objCon As ADODB.Connection
objCon = New ADODB.Connection
Dim Rs As New ADODB.Recordset
objCon.ConnectionString = "MaxBufferSize=2048;FIL=MS Access;DSN=Scan;PageTimeout=5;UID=admin;DBQ=D:\VB.Net\VulnerabilityAssessment.mdb;DriverId=25"
objCon.Open()
strSQL = "Insert Into RemoteHost(HostIP, HostAddress,ScanTime)"
strSQL = strSQL & " Values(strIpAddress,Host.HostName ,Date.Now);"
objCon.Execute(strSQL)
objCon.Close()
objCon = Nothing
|
|
|
|
|
You didn't evaluate any of your variables at all. You should have done this:
strSQL = "Insert Into RemoteHost(HostIP, HostAddress,ScanTime)"
strSQL = strSQL & " Values('" & stdIpAddress.ToString() & "', '" & Host.HostName & "', #" & Date.Now().ToString() & "#);"
objCon.Execute(strSQL)
Even then, concatentating SQL statements together like this is a major security risk and can get your SQL tables wiped out.
I would suggest using parameterized queries as explained in Colin Angus Mackay's article, here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Wow - I told him this yesterday
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi
i want to write an application for the desktop sharing, any body can help me or any link or article will be appreciated
ddd
|
|
|
|
|
Google for "VNC" and you'll find tons of stuff.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I make a small project in Vb.NET, it also have some crystal reports. The reports works well in my computer. But when I run my project on other computer, the reports cannot runs well. Actually it gives a dialog box and ask to Enter "Server name","Database Name", "Login ID", "PAssword"
Why this happens when my project runs on other computer.
Plz give me a possible solution.
EsHbAn BaHaDuR
|
|
|
|
|
Use ODBC in Crystal reports for getting data and build ODBC on the Client side after installing the application. Will solve every thing
|
|
|
|
|
Gosh, I wasted alot of time playing around with this.
An ODBC direct link is fine, as long as your data source doesnt change. eg: your software goes out to a customer, with different servername, database name, login, etc.
You can program vb to change the the datasource information at runtime before the report loads. Thats gives you better customisation.
Or alternately, as I have come to realise, do all your data selection in vb, and pass a dataset to CR instead. When designing the report, run your program quickly, but include a dataset.writeschema (c:\myschema.xsd)
Then when you set the datasource for the report, choose xml.
So much easier, neater programming, better maintainability. The selection criteria in CR becomes redundant (which is a blessing).
Or...
yeh, if its just 1 report in your office, odbc links are fine!
|
|
|
|
|
In my VB program Irunning on WIndows 2000 have a WindowsMediaPlayer1 object and an Image1 control and a Scan button that executes the following command:-
Private Sub Scan_Click()<br />
<br />
Image1.Picture = Clipboard.GetData(vbCFBitmap)<br />
<br />
End Sub
So basically what I want to do is press the Print Scrn button and then press the scan push button on my form to copy the Clipboard onto the Image control.
Now the problem is all I want the clipboard to contain is the image at that instance on the Media Player.
Currently I get the whole desktop.
Are they anyway I can limit the clipboard to just capture the WMP image. Someone said use Device Context (DC), but never used them before so would like some notes in the code.
Many thanks,
|
|
|
|
|
Pressing PrintScrn captures the entire Desktop window. Pressing Alt-PrintScrn captures the current window, which in your case, would be the entire MediaPlayer, content and all.
You'd be better off using the MediaPlayer or MultiMedia API's to grab a single frame.
Check out this[^] article on CP.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for the post, will look at the article, pity its in C#.
Sweep
|
|
|
|
|
But easily convertible to VB.NET.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I have a VB.net project in which I attach to a MSAccess 2000 database. I have a listbox in which I want to populate the most recent records from a table. I have therefore put the following code into the GotFocus event of the listbox
Dim strConString As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;" _
& "User ID=Admin;" _
& "Data Source=C:\MCS\GolfSociety\GolfSociety.mdb"
Dim ocm As New OleDb.OleDbCommand
Dim odr As OleDb.OleDbDataReader
Dim i As Integer
' ocm = New OleDbCommand
With ocm
.Connection = New OleDbConnection(strConString)
.Connection.Open()
.CommandText = "SELECT tblmembers.memID, tblmembers.Name, tblmembers.Club_Hcap, tblmembers.Soc_Hcap FROM tblmembers ORDER BY tblmembers.Name "
odr = .ExecuteReader()
End With
cmbMembers.Items.Clear()
i = 0
While odr.Read
cmbMembers.ListItems.Add(odr("MemID"))
cmbMembers.ListItems(i).ListSubItems.Add(odr("Name"))
cmbMembers.ListItems(i).ListSubItems.Add(odr("Club_Hcap"))
cmbMembers.ListItems(i).ListSubItems.Add(odr("Soc_Hcap"))
i = i + 1
End While
odr.Close()
ocm.Connection.Close()
I would have expected that this would have executed the commandtext each time the listbox got the focus and that if I changed the table in the background that the next time I clicked the listbox I would get the updated records. This does not happen. If I click the listbox and then change the table by opening the database and editing a record, the change does not come through the next time I click the listbox.
Thanks in advance
Brian
|
|
|
|