|
Hi Every body...VANAKKAM..( good morning or afternoon or evening in Tamil Langauge)..I want to learn the basiclogic to create my own user control.
Please Guide me..
Selvaraj.G
|
|
|
|
|
In the IDE create a new User Control. Add controls to it and make sure all settings you require are persisted. Apart from that it's the same as creating a form.
You'd be better off learning how to create a controls in a language that hasn't been deprecated and is still supported. Move to .net; C# or VB.net.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
In the name of all that is holy, do not learn VB6.
Nobody uses it.
Switch to VB.Net.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Hello every1
i want to make a program with vb2010 that can compare a wav file with a realtime recorded voice from microphone and triger something (lets say that a msgbox appear)if the microphone msg is closed to the recorded from a wav.
thnx in advance
speedydc
|
|
|
|
|
You'd have to do something along the lines of a sliding window Fast Fourier Transform or Discreet Fourier Transform on both sets of data. There are a couple of problems with this as you'll have to account for differing sample rates of your WAV file and the samples coming from the mic.
You might also want to look into Hidden Markov Models as they tend to be a bit more forgiving in the sample rate differences.
Good Luck!
|
|
|
|
|
Is it possible to copy a file to a destination that includes a shortcut link in the path? For example, below the \Staged\ is actually Staged.LNK that points to a diff. server. I normally would use the UNC path but am being asked to do this specifically. User has full rights on the directory as well.
<br />
'Statement fails.<br />
System.IO.File.Copy("\\Server\Data Dumps\86355 - Shipment Notice Detail 07.18.2011 11.15.15.108.xml", "C:\Documents and Settings\John Doe\Desktop\Staged\86355 - Shipment Notice Detail 07.18.2011 11.15.15.108.xml")<br />
<br />
'If I add-in Staged.LNK, the statement fails, without .LNK, VB creates an actual folder called Staged and copies the file into that folder vs. using the shortcut path (to a diff. server).<br />
My.Computer.FileSystem.CopyFile("\\Server\Data Dumps\86355 - Shipment Notice Detail 07.18.2011 11.15.15.108.xml", "C:\Documents and Settings\John Doe\Desktop\Staged\86355 - Shipment Notice Detail 07.18.2011 11.15.15.108.xml")<br />
Thanks for any help or comments.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Jon_Boy wrote: Is it possible to copy a file to a destination that includes a shortcut link in the path?
No, since the .lnk is a file, not a virtual path. The file-system treats it as a file, not as a NTFS Junction Point[^].
As an alternative, you can use VB.NET to read what the .lnk file is pointing to, and concatenate that to your path. You'd need to import a COM-library called "Windows Script Host Object Model", then you could run code similar to this;
Imports IWshRuntimeLibrary
Module ShortcutExample
Sub Main
Dim MyWshShell = new WshShell()
Dim MyShortcut = MyWshShell.CreateShortcut("C:\Users\Eddy\Desktop\SomeFolder.lnk")
Console.WriteLine(MyShortcut.TargetPath)
Console.ReadKey()
End Sub
End Module
Happy Programming
Bastard Programmer from Hell
|
|
|
|
|
Sounds like a plan. Thanks!
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
You're welcome
|
|
|
|
|
Hello.
I am using VB 2010 under Windows XP to create a MDI Windows Form
application. Question : is it possible to change the color or the title bar
and of the border of the children forms, form by form ?
modified on Monday, July 18, 2011 7:27 AM
|
|
|
|
|
Only if you draw the ENTIRE form yourself. What you're doing is drawing whats called the "non-client" area. This means you'll have to override the WndProc method and handle, at a minimum, the WM_NCPAINT message. This tells your code to paint its non-client area. The form properties won't do you much good here are they only specify the client area dimensions and settings.
Docs on the WM_NCPAINT message[^].
|
|
|
|
|
|
Sure. Most will allow you to change the form borders. How you do that depends on the library you chose.
|
|
|
|
|
I posted this in quick questions but didn't get any satisfactory response. I'm new here and don't know if it's possible to move my question here so I guess I'm guilty of cross posting. Admin - If you delete, could you delete my other post rather than this one please? Anyway - to my question.
Attempting to read from serail port, XP, admin accnt.
if there are chars in the buffer, then the following throws error: Permission denied, code: 800A0046 on the check of AtEndOfStream.
forRead=1
Set fso = CreateObject("Scripting.FileSystemObject")
Set comObj = fso.OpenTextFile("COM3:9600,N,8,1", for Read)
if not comObj.AtEndOfStream then
msgbox comObj.ReadLine
end if
com.Close
Writing on the other hand works just fine with the following:
forWrite=2
Set fso = CreateObject("Scripting.FileSystemObject")
Set com = fso.OpenTextFile("COM4:9600,N,8,1", forWrite)
com.Write "Hello World"
com.Close
Not sure its relevant but I'm using com0com to connect the two ports (3 & 4)
I should perhaps also add that using the MSCOMM obj in VB6 I can read and write no problem.
Any ideas why the permission denied for the read.
Thanks
modified on Saturday, July 16, 2011 5:42 AM
|
|
|
|
|
Don't cross post. You didn't wait long enough before posting this question yet again.
|
|
|
|
|
Hi Dave - A thousand apologies. I did try to explain that I felt I'd probably posted in the wrong place first. If I could live my life over I'd have posted it here first. I'll hopefully live and learn and try to become a better person (but being the wrong side of 50 I fear it may be too late for me). Please feel free to delete my first post or my second post or both whichever you feel is for the best.
|
|
|
|
|
Can't figure out how to code web browser with advanced tabs. And suggestion?
|
|
|
|
|
What have you tried so far? Where are you stuck?
|
|
|
|
|
I have tried using ToolStrip, but can't seem to get the coding right.
|
|
|
|
|
Well, no one can help you if you are not specific about your problem.
|
|
|
|
|
Nevermind. I found my problem. (: sorry for bothering you.
|
|
|
|
|
That's okay. Care to share your problem and your solution? It might be helpful to others.
|
|
|
|
|
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' ACD CHEMBASIC DEMO PROGRAM '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' '
' Molecular 3D Editor//MIRROR.BAS '
' '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' '
' The utility flips the molecule at a plane '
' '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
CONST TITLE="ChemBasic Molecular Editor // Mirror"
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function Main As String
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' MIRROR.BAS '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim page,diag,asm,struc As Object, s As String, OK As Boolean
MAIN="Failed or nothing to do!"
' Get 1st structure from the curent page
page=ActiveDocument.ActivePage
If page.Diagrams.Count<1 Then Exit Function
diag=page.Diagrams.Item(1)
asm=Assemblies.AddFromCS(diag)
If asm=NULL Then Exit Function
struc=Asm.Structures.Item(1)
If struc=NULL Then Exit Function
' Do the job
s=UserIOBox("Flip X, Y, or Z coordinate ?" ,TITLE , "Y")
s=UCase(Left(s,1))
If s="X" OR s="Y" OR s="Z" Then
' Flip !
Call Flip(struc,s)
' Show the results
RefreshDiagram(diag,struc)
Main="Completed."
End If
End Function
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub Flip(struc As Object,s As String)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim x,y,z As Double, asm,at As Object
With struc
asm=.Assembly
For Each at In asm
.GetAtomXYZ(at,x,y,z)
Select Case s
Case "X"
x=-x
Case "Y"
y=-y
Case "Z"
z=-z
End Select
.SetAtomXYZ(at,x,y,z)
Next at
End With
End Sub
'***LIBRARY PROCEDURES BEGIN
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub RefreshDiagram(diag As Object,strmol As Object)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' LIB0.BAS PROCEDURE '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Redraws the diagram with a molecule or structure object '
' '
' ENTER '
' diag object of type CS_DIAGRAM '
' strmol object of type CB_MOLECULE or CB_STRUCTURE '
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim l,t,w,h,w1,h1 As Integer
diag.GetBound(l,t,w,h)
diag.Depict(strmol)
diag.GetBound(w,h,w1,h1)
diag.SetBound(l,t,w1,h1)
End Sub
'***LIBRARY PROCEDURES END
'@@@@@@
someone can help me with this code?!?!?
|
|
|
|
|
OK,
So you've found some code on the internet and posted it here but you haven't asked a specific question describing what it is that you want.
Alan.
|
|
|
|
|
What problem are you having with the code? Can you describe an error message? A few hints would be nice.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|