|
i am sorry to hear he was not interested. But i my self am very interested about how to capture images from directshow. with a live video preview. please contact me if you upload the code
|
|
|
|
|
The problem with doing image processing in VB is that VB does not support pointers, so getting at and manipulating image data takes considerably longer than it does in C#, which does support pointers.
Your other option is to do all image manipulation in a library written in another language and wrap that in a VB app.
That's why you don't see any VB apps doing this kind of work...
|
|
|
|
|
Hi all,
I'm new to this forum, I will be very happy if some one can help me with this issue.
I am trying to Encrypt / Decrypt a text as the following
The text is in the format VISA-0 is
041242abcdef6789
The master key is
0123456789abcdef
After encrypting with Triple DES I obtain the following string.
Y9cIS8NUsry7ddNV9cSY7w==
I need to obtain an encrypted string in VISA-0 Format, that is 16 bytes.
I tested this data in a simulator and the outcome should be:
7ea13f5c64c7363b
The same in Base64 is
fqE/XGTHNjs=
The code I am using for encryption is:
private byte[] IV = { 0, 0, 0, 0, 0, 0, 0, 0 };
public override byte[] Encrypt(byte[] plainText, byte[] key)
{
TripleDESCryptoServiceProvider des3 = new TripleDESCryptoServiceProvider();
des3.Mode = CipherMode.CBC;
des3.Padding = PaddingMode.None;
PasswordDeriveBytes passwordDeriveBytes = new PasswordDeriveBytes(Convert.ToBase64String(key), new byte[0]);
des3.Key = passwordDeriveBytes.CryptDeriveKey("TripleDES", "SHA1", 0, this.IV);
des3.IV = this.IV;
MemoryStream memoryStream = new MemoryStream();
CryptoStream cryptoStream = new CryptoStream(memoryStream, des3.CreateEncryptor(), CryptoStreamMode.Write);
cryptoStream.Write(plainText, 0, plainText.Length);
cryptoStream.FlushFinalBlock();
return memoryStream.ToArray();
}
Thanks in advance for your help
Maria
|
|
|
|
|
Hi,
I have a form with one textBox and a label, by default the label is disabled which contain some message.
if textBox is disabled, when mouse move to this textbox area, the message is label is shown, if the mouse move out of the textbox area, the label is hide again.
everything works fine if I put these two control in form.
But if I create a groupbox in the form and put these two control to the groupbox, this doesnot work any more, why? how can I use mousemove to capture the control in a container?
Thanks!
|
|
|
|
|
Solve it.
The MouseMove event must be set on the parent control.
and when get the control from mousemove, should use following syntex:
Private Sub GroupBox1_MouseMove()
Dim parent As Control
parent = sender
Dim ctrl As Control
ctrl = parent.GetChildAtPoint(e.Location)
.........
end sub
Thanks!
|
|
|
|
|
Hi, dear all,
I have a form with some controls, some of controls may by disabled based on some options, I wish to show tooltips for disabled controls, so user knows why this control is disabled, after enabled, the tooltip gone.
How can I achieve this? I search a lot from online, but cannot get answer. Find on to handle this case with class, but when unzip the source code, get error.
Thanks!
|
|
|
|
|
|
I see no problem:
1.
the source download unzips all right with the built-in ZIP handling of Windows 7
2.
the individual files are browsable on the "Browse Code" tab of the CP article.
3.
the article itself holds the essential code snippets.
|
|
|
|
|
I can unzip other files, but cannot for this one. also the source code online are not editable.
I am using window XP, maybe I need to try other computer.
Thanks!
|
|
|
|
|
I ask my friend unzip the file, but when I open it using Visual Studio 2005 and get error message like "the file was created by newer version of this application and cannot be opened"
In this case, what should I do?
|
|
|
|
|
either download and install Visual Studio 2008 Express (or 2010 Express), it would accept VS2008 project files;
or delete the project file, create a new project, and add all necessary source files and references yourself.
In the latter case, there is a possibility the source code relies on features present in .NET 3.5 and not in .NET 2.0; if so VS2005 will not be able to handle them at all.
|
|
|
|
|
|
Hi,
I try to use something else to display message that looks like tooltip.
I create a label with some message to indicate why its attached control (not real attach) is disabled, set visible = false,
I capture the mouse move event, when mouse move to the attached control and also it's disabled, the label with message will be visible, when the mouse move out of the control, the message will be hidden.
When I create the control (like textBox) directly in form, and capture Form_MouseMove() event, it works fine. But if I create a TabControl in the form and then a groupbox on the tabpage, then put the textBox control in the groupbox, now I cannot get the control when mouse move by :
ctrl = Me.GetChildAtPoint(e.Location)
Then ctrl is always Form, or tabControl. Why??
|
|
|
|
|
Is it possible to get friend members thru reflection? I tried :
MyForm.GetType.GetFields()
MyForm.GetType.GetFields(BindingFlags.NonPublic)
MyForm.GetType.GetFields(BindingFlags.NonPublic & BindingFlags.GetField)
MyForm.GetType.GetFields(BindingFlags.NonPublic & BindingFlags.GetField & BindingFlags.Instance)
None succesful.
|
|
|
|
|
I believe, internal is C# equivalent for friend in VB. Since I do not do VB, I tried in C# and following binding flags work fine for me:
BindingFlags.NonPublic | BindingFlags.Instance
|
|
|
|
|
Hi, dear all,
I have a treeView control in MDIcontainer vb project.
In some reason, in specific case, I need to disable some of the tree node (make is gray and unclickable) based on user input. I didn't have checkbox in tree node.
Is it possible to do it?
Thanks!
|
|
|
|
|
Clearing all child nodes makes it unclickable, you could remove the child nodes from the node you want to disable and set the backgroundColor property to gray.
When you enable the node again you can set the childnodes again and remove the gray color.
But this is probably not the best solution....
modified on Friday, August 13, 2010 8:39 AM
|
|
|
|
|
Thanks.
Can I hide a node?
|
|
|
|
|
If you write the hide method yourself. Not with the 2.0 Treeview object...
|
|
|
|
|
|
Today, while acquainting myself with this language I declared a static variable in a function, but I messed up slightly...
I wrote dim static rather than static dim and the compiler (VBC, V3.5) didn't throw an error, but also didn't produce any output.
They appear to have fixed it in V4.0 .
|
|
|
|
|
PIEBALDconsult wrote: dim static
Didn't Notepad show a squiggly?
dim static and static dim work equally well for me in Visual Basic 2008 Express.
|
|
|
|
|
Luc Pattyn wrote: Didn't Notepad show a squiggly?
I'll have to check; I use EDIT, and it didn't.
|
|
|
|
|
I tried edlin and it did not show a squiggly.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
No squiggly on vi either!
ragnaroknrol The Internet is For Porn[^]
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|