|
Create a DLL or COM DLL in VC++ and use it from VB
|
|
|
|
|
Try :
http://www.banasoft.com/MakeEx.htm
|
|
|
|
|
How can I write a component that imports / export images (bmp/gif) from a local system to a database.
|
|
|
|
|
It is possible to run a script from the command line by typing script.vbs. Is it possible to pass parameters to that script? If so could somebody give me a short example of how to do it.
Thanks for any help you can give.
Steve
|
|
|
|
|
Hi
Try this first: "Wscript //?" (without the ")
Type it and you will get more information.
You can type it in the Start->run...
or from the command line .
Yoav
"Children today are tyrants. They contradict their parents, gobble their food and tyrannize their teachers." - Socrates
|
|
|
|
|
I finally finished my application which compiles and runs perfectly on my computer, but zero luck with the Packaging and Deployment Wizard. Problem is I don't know where to begin to find out what is wrong. Here is what I know:
1. The "Wizard" says the build is good, generating a single CAB file.
2. When I try an install, "Setup" reports a "Runtime Error 216 @ 2F78"
3. Setup says the installation is successfull.
4. I try to run the newly installed software and get a "DAX Error - Library not Registered"
5. Next, "Runtime error 50003" is reported.
6. Program closes.
A few other strange things... It keeps trying to add Graph9.exe from the Microsoft Office Library to the build, even though I dont' use anything like that (seems to have something to do with the "Chart" component). I can elect not to include it, but it adds it to the cab file any way. The first time I ran the Wizard it said it could not determine if there are dependent files for Graph9.exe and comdlg32.dll. It no long comes up with that error. Also, the first time I tried it said that, if I wanted to run my application under Win 95/98, I would have to include DCOM98, but no instructions on doing so. It no longer does this either.
Bottom line, I am completely stuck. Is there some other tool for doing this (hopefully something more helpful). Lastly, I notice that when it does attempt the install, there is listing in the "Add / Remove Programs" utility in the Control Panel of the target machine. How is this done?
|
|
|
|
|
hi all,
i wrote a vb application link to excel spreadsheet.
i would like to know how i can deploy this application. i found that the app. reference to excel9.olb. i have included it in my deploy setup file. however, the app. still failed to run. the runtime error is "ActiveX can't create server".
however, it work perfect after i installed office.
could anyone help me?
regards,
Jim
|
|
|
|
|
With a Cmd Button, I want to copy files (always the same (*.DAT)from C:\ to A:\.
But, the instruction 'CopyFiles "Source", "Destination" ' doesn't work.
How must I do ?
Thanks a lot !
MARNEFFE Ph.
|
|
|
|
|
*.Dat is not a valid entry for copyfile... You must add a fileview control to your form. change its pattern to *.dat. Set it invisible. When you project runs set its path to "C:\" and use this code:
for i = 0 to file1.count-1
copyfile "c:\" & file1.list(i), "a:\" & file1.list(1)
next
have good programing,
Cem
|
|
|
|
|
check out this article from ms. You can use any wildcard with this procedure.
http://support.microsoft.com/support/kb/articles/Q151/7/99.asp
|
|
|
|
|
Hi,
I would want to do the following from Visual Basic for Applications, in e.g. Word 2000/XP:
A macro that copies the current selection from the application (i.e. words), assigns the string to string variable, inserts another string in front of the previous and copies the whole thing to the clipboard.
How do I proceed? Thanks for any help.
--
/Daniel
|
|
|
|
|
Hi ppls,
I am now try to design a program that can be inputed with multi language. I use a normal textbox and set it's font to Arial Unicode MS for input. I turn the script of this font to Arabic then I can type arabic there but when I try to type another language like Japanese then it doesnt accept it! has some one a idea how can I use one textbox that support all language?
Thanks
|
|
|
|
|
I am using visual basic to develop an application using a VB ActiveX dll I have created a multithreading tech. using window API function CreateThread(...) like this :-
------------------------This laid in XClass in the ActiveX dll-------------
lRet = CreateThread(0, _
0, _
AddressOf TheThread, _
0, _
0, _
lThreadID)
----------------------------This thread Function is laid in some module-------
Public Function TheThread(ByRef p As PARAMETER) As Long
On Error GoTo TheThread_Error
XClass.SpecialFunction Exit Function
TheThread_Error:
MsgBox ("TheThread had an error : " + Err.Description)
End Function
But there is a run time error message comes up say "CoInitialize has not been called"
Can some body help me.
Thanks.
|
|
|
|
|
What version of VB are you using? I have heard that using threads within VB6 is highly unstable and causes a lot of problems.
Here's a snippet from Dan Appleman, and the Desaware site:
Sigh... It seems that many readers missed my original point. The ideas was not to encourage VB programmers to use CreateThread with Visual Basic. It was to explain clearly and accurately why you shouldn't use CreateThread with Visual Basic.
So, when Visual Basic 6 turned out to be considerably less thread-safe than VB5, breaking the sample programs referenced by this article, what could I do? I suppose I could go back and revise the samples and try to make them work with VB6. But then the same problem might arise with later versions of Visual Basic as well.
Visual Basic offers good support of multithreading including multithreaded clients in ActiveX servers (this is described quite thoroughly in the latest edition of my Developing COM/ActiveX components book). I strongly encourage you to stay within the rules defined by the Visual Basic documentation and not use the CreateThread API with Visual Basic.
For those who insist on pursuing CreateThread further, to start with you should eliminate all Declare statements and use a type library instead. I don't promise that this will fix the problem, but my initial testing indicates that it is a necessary first step.
If you want the entire article goto http://www.desaware.com/articles/threadingL3.htm, his articles are knowledgable, and he is also the guy who write Win32API for Visual Basic programemrs. Have a copy of that on my desk, err...wait, no, yeah, I'm a pure VC++ programmer =)
Sam C
----
Systems Manager
Hospitality Marketing Associates
|
|
|
|
|
Ok screwed up with the last article, I can't even see the modify button weird. But here's some advice don't use the >PRE< tags for website articles<g>Sorry, Chris. Well, here's the article again about threads in VB6 from our guy Dan:
Sigh... It seems that many readers missed my original point. The ideas was not to encourage VB programmers to use CreateThread with Visual Basic. It was to explain clearly and accurately why you shouldn't use CreateThread with Visual Basic.
So, when Visual Basic 6 turned out to be considerably less thread-safe than VB5, breaking the sample programs referenced by this article, what could I do? I suppose I could go back and revise the samples and try to make them work with VB6. But then the same problem might arise with later versions of Visual Basic as well.
Visual Basic offers good support of multithreading including multithreaded clients in ActiveX servers (this is described quite thoroughly in the latest edition of my Developing COM/ActiveX components book). I strongly encourage you to stay within the rules defined by the Visual Basic documentation and not use the CreateThread API with Visual Basic.
For those who insist on pursuing CreateThread further, to start with you should eliminate all Declare statements and use a type library instead. I don't promise that this will fix the problem, but my initial testing indicates that it is a necessary first step.
-------------------------------------------
And here's his website pretty much a VB guru: http://www.desaware.com/articles/threadingL3.htm. Good luck with threading and if you come across this Chris you may want to delete the above post because I can't get to the modify or delete link =)
Sam C
----
Systems Manager
Hospitality Marketing Associates
|
|
|
|
|
I used API createThread before in VB6 without any problem but I think my problem come from using an another many AvtiveX objects under the thread function and these objects need to initialize,but how these objects initialize in VB.
best regards.
|
|
|
|
|
I used API createThread before in VB6 without any problem but I think my problem come from using an another many AvtiveX objects under the thread function and these objects need to initialize,but how these objects initialize in VB. best regards.
It doesn't matter -- if it worked before it's just because you were lucky. If you want to learn how to do threads correctly in VB go out and buy Matt Curland's new book
___________
Klaus
[www.vbbox.com]
|
|
|
|
|
Hi everyone, i am newbie to Visual Basic. I have visual basic 6. My questions is that when a string is added to a listbox, how does the user see that information the next time the program is loaded.
I know that the info has to be saved into a text file which i know how to do but i don't know how to read the info from the file and display it into the listbox.
Thanks in advance !
Warm regards,
Sarah
|
|
|
|
|
Check out the SaveSetting and GetSetting functions.
___________
Klaus
[www.vbbox.com]
|
|
|
|
|
During the form's Load() procedure you would Open the file for Input, Clear() the list box, then simply call Input # on the file to get a line and AddItem() to get it into the list, for each line.
If you're wondering how to know how many items there are, you should write out the number of strings (using the list box's ListCount property) to the file as the first line. Then, when you read it back in, the first thing you read is the number of lines remaining in the file to add to the list box...
Does that answer your question?
|
|
|
|
|
hi,
try this
when you type a new string and submit write the new string into a file
dim F as long
f=Freefile 'to get a valid file pointer
'open and add string to existing file
open "c:\tmp.txt" for append as f
print #f,combo1.text
close f
on form load,
dim F as long
dim mStr as string
f=Freefile
open "c:\tmp.txt" for input as f
do while not eof(f)
line input #f, mStr
combo1.additem mstr
loop
close f
|
|
|
|
|
I have developed a very simple d3dim object creating and picking routine working quite well. On the other hand, rotation and translation do not work together.On either of them the object starts from different locations.
if u can help me please contact and i'll send my little code to you as well.
Thanks
|
|
|
|
|
I am searching for insight on the relative benefits / downsides to using the "As Any" data type in VB.
My assumption is that CPU cycles are taken in order to resolve the data types at runtime vs.
the use of a stronger type declaration, but I have no numbers telling me that is the case.
Any insight appreciated
Mike
|
|
|
|
|
API calls probably don't go much faster when stronly typed.... but,
API calls ALWAYS crash if you do it wrong, so strong typing is much better but not because of speed.
|
|
|
|
|
I am searching for insight on the relative benefits / downsides to using the "As Any" data type in VB. My assumption is that CPU cycles are taken in order to resolve the data types at runtime vs. the use of a stronger type declaration, but I have no numbers telling me that is the case. Any insight appreciated
Au contraire. VB will do no type checking on an "As Any" variable (although it still needs to figure out what it's passing in order to know how to pass it). I don't think you need to worry about CPU cycles here. It's better to worry about how "As Any" will impact your code readability. If you have an API that takes one or more "As Any" arguments, is it always clear what, how and why you are passing what you're passing?
As Any is mainly useful for APIs with arguments like lParam in SendMessage that can be basically anything. Always strong type if you can, but avoid the "multiple overloads" mess for an API (like so many people do with SendMessage).
___________
Klaus
[www.vbbox.com]
|
|
|
|