|
Fellow Programmers,
I am in the process of starting a new project on the development of condition based maintenance tool. I need some directions from any one of you out there. Here is what the project is all about.
The program should be able to sample data stream in real time from a running machnery and then compare data held in a database corresponding to different fault condition to the data stream in real time and them output the result in the form of the status of the machine.(i.e, whether the fault data corresponds to any portion of the continuous stream.
I will also appreciate codes on Neural Network (Backpropagation Algorithm or any ANN codes). I will strongly appreciate any response to enable me get started.
I can be reached at v_itulua@hotmail.com
v_itulua@hotmail.com
|
|
|
|
|
Is it ever possible to print a form into a picture box. Any ideas..
|
|
|
|
|
Use windows api to capture form as BMP and display inside picture box control...?
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
When trying to call a dynamically declared .dll function, i pass in a String, but when i debug it inside of VC, it's junk ("????????????????") anyone see that happen before? and know how to fix that in an already made ATL Object in VC?
~Timothy T. Rymer
www.digipen.edu
tim.xpertz.com
|
|
|
|
|
Can you give a small example of code (C++/ATL and VB) that gives this behavior? I remember having this sort of problem, but I don't remember how I solved it
(Though I did solve it, so maybe I'll be able to help )
Volodya Orlenko,
orlenko [at] hotmail [dot] com
|
|
|
|
|
Ok, well first I created an ATL COM AppWizard .dll,
and then created an ATL Object.
Then in CMyObject(not IMyObject) I created a function that had a BSTR for a parameter (just input) and i tried setting the return value to "void _stdcall" and "void __declspec(dllexport)"
and then going into the .def file, i added the appropriate function names and added the "@number" after each, but when i run it in my VB program, and debug the dll from VC++, it will either have "" <-- nothing in the string (and i've debugged from vb and there is stuff passed in) or mumbojumbo that either looks like:
"?????????????????????????"
or
"?[the return character] <-- this repeated a bunch"
and then it'll crash when i close it or whatever.
I'm trying it in a regular dll now, but i would rather just make the small changes to the object's functions. Any help would be grand! I'm glad someone else has at least had this happen before, so any help/advise is awesome thanks
~Timothy T. Rymer
www.digipen.edu
tim.xpertz.com
|
|
|
|
|
If I understand you correctly, you created an ATL Dll, a COM object in it, and now you want to use its methods just as dll functions, without that COM object at all? That will not work.
To create a simple dll to be used from VB or C or whatever, you do not need ATL. Use "New", then select "Win32 Dynamic-Link Library" in your Visual C++.
Volodya Orlenko,
orlenko [at] hotmail [dot] com
|
|
|
|
|
The thing is, is that I can get into the Function though, and debug through it, I tried using a function outside of the ATL object as well, but it still wouldnt work.
Check this article out, do you see anything that he might be forgetting to tell me?
http://www.codeproject.com/dll/superdll.asp#xx77114xx
~Timothy T. Rymer
www.digipen.edu
tim.xpertz.com
|
|
|
|
|
Ok, I see what you ae trying to do. Please download that example and modify it for your needs. It works.
Note that he did not use any COM classes! You could do exactly the same by creating a new dll from scratch.
Volodya Orlenko,
orlenko [at] hotmail [dot] com
|
|
|
|
|
Yeah, that is a totally an awesome thing, but i got my ATL Class to work!
In MSDN, if you're messing with strings, it says to use LPSTR when you're recieving a string, and it worked! and that is a public function inside a ATL Class, so it's something else to remember...
~Timothy T. Rymer
www.digipen.edu
tim.xpertz.com
|
|
|
|
|
ATL objects are COM objects. You've got to create an instance of a class to use its functions.
In general, you cannot use a member function of your C++ class without creating an instance of that class.
It looks like you try to use member functions without creating any variables of that object's type.
Volodya Orlenko,
orlenko [at] hotmail [dot] com
|
|
|
|
|
Are there any good techniques for restricting access to an ActiveX DLL (not control) created with VB?
Thanks!
- Alex
|
|
|
|
|
I've never created a control in VB only VC. Runtime licenses are used in VC, isn't this available in VB...?
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hi, I've embeded IE in my VB app using the WebBrowser control. I have IE 5.5 on my machine.
When I install my app on a test machien with IE4, the app crashes as soon as the ie control fires a trapped event!
ie. the browser control displays the webpage fine, but when the user clicks a link, and I catch the beforenavigate2 event, it crashes, it works fine however on my machien.
anyone seen this before?
any ideas?
Thanks!
- Alex
|
|
|
|
|
Hello all -- i have a problem that is really getting me down . . .
I am selecting a line in MS Word and trying to remove all double spaces " " and replace them with single spaces -- until I only have single spaces. i.e. " hello world" => " hello world"
I created a _very_ short macro that loops until the selection returns a 'false' value.
Do
Loop Until Selection.Find.Execute(Replace:=wdReplaceOne, ReplaceWith:=" ", FindText:=" ")
After debugging for a while I found that what is happening is that the selection is changing each time -- I tried the following to correct this:
Dim blnEnd As Boolean
With Selection
Do
blnEnd = .Find.Execute(FindText:=" ", ReplaceWith:=" ", Replace:=wdReplaceOne)
Loop While blnEnd = True
End With
but my selection keeps changing just like before -- how do I iterate through a selection that does not change? please help -- this is a killin' me
tim
---------------------------------------
Tim Booher
|
|
|
|
|
Here's a script that works:
<br />
Sub Macro8()<br />
<br />
Dim fContinue As Boolean<br />
fContinue = True<br />
<br />
<br />
Dim Sel As Range<br />
<br />
Do While fContinue<br />
<br />
Set Sel = Selection.Range<br />
<br />
Selection.Find.ClearFormatting<br />
Selection.Find.Replacement.ClearFormatting<br />
With Selection.Find<br />
.Text = " "<br />
.Replacement.Text = " "<br />
.Forward = True<br />
.Wrap = wdFindAsk<br />
.Format = False<br />
.MatchCase = False<br />
.MatchWholeWord = False<br />
.MatchWildcards = False<br />
.MatchSoundsLike = False<br />
.MatchAllWordForms = False<br />
End With<br />
fContinue = Selection.Find.Execute(Replace:=wdReplaceOne)<br />
<br />
Selection.Start = Sel.Start<br />
Selection.End = Sel.End<br />
<br />
Loop<br />
End Sub<br />
<br />
Volodya Orlenko,
orlenko [at] hotmail [dot] com
|
|
|
|
|
If I set an object variable equal to another ie
Dim object1 As CThing
Dim object2 As CThing
Set object1 = new CThing
Set object2 = new CThing
object1.init
object2.init
object1 = object2
Then obviously I now just have the one instance of the object, with two references to it (object1 and 2 just point to the same instance). My question: How do I actually copy the properties (variables etc) of one object to another? Do I have to implement a copy constructor type function i.e
Sub Copy(Dest As CThing)
Dest.Prop1 = Prop1
Dest.Prop2 = Prop2
'...etc
End
Also, I am wondering about collection objects in a similar sense.
Dim List1 As Collection
Dim List2 As Collection
'... add objects to list1
List2 = List1
When I set one collection equal to the other, do I just have two sets of references to the collection of objects (ie change objects in list2 and list1 objects are affected) ?
Hope you can help, thanks stacks in advance
|
|
|
|
|
AFAIK you'll have to create your own copy contstructor. If you simply do a Object1 = Object2, VB will use a default property for the object.
To illustrate this point, create a blank form and place two frames on it and two command buttons. For the Command2 set the CausesValidation property to False (default is True). Run the following code...
<br />
Private Sub Form_Load()<br />
<br />
Frame1 = Frame2<br />
Command1 = Command2<br />
<br />
MsgBox Command1<br />
<br />
End Sub<br />
Notice the second frame now has the caption of the first. The first command button now has CausesValidation set to false, as shown by the message box.
Hope this helps.
Jeremy L. Falcon
"The One Who Said, 'The One Who Said...'"
|
|
|
|
|
Jeremy Falcon wrote:
AFAIK you'll have to create your own copy contstructor. If you simply do a Object1 = Object2, VB will use a default property for the object.
Actually VB will not do anything. There's no such thing as a deep copy in COM (which is what VB classes are). It will only do an QueryInterface() (if necessary) call and then AddRef().
___________
Klaus
[www.vbbox.com]
|
|
|
|
|
Borrowing heavily from Nick Hodapp's original C code:
LRESULT CALLBACK FindToolbarProc(int nCode, WPARAM wParam, LPARAM lParam)
{
// watch window creation:
if (nCode == HCBT_CREATEWND)
{
CBT_CREATEWND* pcw = (CBT_CREATEWND*)lParam;
// watch for toolbar creation, set toolbar name
if (pcw->lpcs->lpszName && 0 != strstr(pcw->lpcs->lpszName, "Toolbar"))
{
strcpy((char*)pcw->lpcs->lpszName, "NukeNCB");
}
}
return CallNextHookEx(g_hkCBT, nCode, wParam, lParam);
}
I was hoping to translate this into a VB hook... this is what I have so far...
Public Function FindToolbarProc(ByVal ncode As Integer, ByVal wParam As Long, ByVal lParam As Long) As Long
Dim tCREATESTRUCT As CREATESTRUCT
Dim tCBT_CREATEWND As CBT_CREATEWND
Dim ptr As Long
Dim sStr As String * 8
'If a keystroke is received.
If ncode = HCBT_CREATEWND Then
Debug.Print "1.in!>>>>>"
'ptr.lpcs = lParam
'CreateFromPointer (lParam)
'Call CopyMemoryCBT_CreateWnd(mCBT_CREATEWND, lParam, LenB(mCBT_CREATEWND))
'SetWindowText wParam, "ASDF"
Debug.Print "wParam=" & wParam
Debug.Print "lParam=" & lParam
ptr = VarPtr(tCBT_CREATEWND)
Call MoveMemory(ByVal ptr, ByVal lParam, Len(tCBT_CREATEWND))
Debug.Print "CBT_CREATEWND.lpcs=" & tCBT_CREATEWND.lpcs
Debug.Print "CBT_CREATEWND.hwnd=" & tCBT_CREATEWND.hWndInsertAfter
Call MoveMemory(mCREATESTRUCT, ByVal tCBT_CREATEWND.lpcs, LenB(mCREATESTRUCT))
Debug.Print "mCREATESTRUCT=" & mCREATESTRUCT.lpszClass
Debug.Print "mCREATESTRUCT=" & mCREATESTRUCT.lpszName
Debug.Print "mCREATESTRUCT=" & mCREATESTRUCT.Style
Call MoveMemory(sStr, mCREATESTRUCT.lpszName, 10)
End If
'Pass the keystroke on to the primary program and pick up the next hook for processing.
FindToolbarProc = CallNextHookEx(gLngWindowHook, ncode, wParam, lParam)
End Function
Only problem is that the MoveMemory (AKA RTLMOVEMEMORY) command seems to be returning erronous data. Any suggestions?
|
|
|
|
|
Hello. I have a database of journal entries. In most cases there is more than one debit for a corresponding credit(s)in a given journal entry. Would Visual Basic be useful in determining which debits belong with each corresponding credit via a series of calculations, or am I a total idiot for looking to VB to solve this? Any assistance you can provide is greatly appreciated!
You have a choice between the natural stability of gold and the honesty and intelligence of the members of government. And with all due respect for those gentlemen, I advise you, as long as the capitalist system lasts, vote for gold.
-George Bernard Shaw
|
|
|
|
|
It would depend - if there is a unique identifier to link the debit with the credit then using something like access would allow you to create a view of the table showing the credit and all the debits linked to it.
|
|
|
|
|
It really depends how much time you can spend developing it on VB or any other software. VB is easy and you can easily find solution to your particular problem. 'Anonymous' is right in saying that you can use two tables in MS Acess, one for credit and other for Debit. have these two tables liked via a common key, like customer ID etc. Use SQL querty to retrive records from debit table corresponding to the credits.
|
|
|
|
|
I would like to add animations, which were made in Flash5 to Visual Basic 6.
What component (ActiveX) I need to add to my project??
And what id the code to make the connection between the animation file and VB ?
I heard about "webbrowser". And the code that I have been told is : object.navigate." The Path ".
Where I can find this ActiveX controller??
Thank you !!!!
Ahuva
|
|
|
|
|
IF you have installed flash then you are half way through your problem. When macromedia Flash is installed, an activeX control called swflash.ocx. add this control in your project. you can use various properties and methods supported by this control to play your animation. There is no way through which you can pass any information from flash to vb6 or vice versa.
|
|
|
|