|
use the function TypeName
|
|
|
|
|
I am having a problem where I am importing/exporting rows from one database into another and there are approximately 500 rows with data. The user clicks on a button to import and the form sticks up until such time as the processing completes (import/export all rows) which takes like a minute. The processing goes through a couple tables to get data for the processing and takes too long (like 1 - 2 minutes) and all the forms stick up while processing. Any suggestions for improving having some sort of progress bar/ preventing the forms from sticking on this would be greatly appreciated! I am using recordset queries to get data to do all the comparisons etc. for import/export..
|
|
|
|
|
Hi,,
as you are using recordsets to transfer data you can use Doevents function before each call to MoveNext ..
this gives the form the ability to process messages (Events)
using a progress bar is a good idea..
|
|
|
|
|
Thanks!! That has definitely helped!!
|
|
|
|
|
I've been looking for how to get my hands on the command line arguments (argv, argc, in C/C++) in a VB app. I've searched MSDN and all my VB books and just can't find anything. I'm sure it's something very simple , but I'm not having any luck on my own. Help please?
Thanks, Dave
QRZ? de WAØTTN
|
|
|
|
|
Hi
use Command() Function
it returns the command line arguments as a variant containing array of args.
|
|
|
|
|
Thank you! Just what I was hoping for.
QRZ? de WAØTTN
|
|
|
|
|
two things:
1) im making an app in which there is a form which is also a mdicontainer ....now...i need another control box kind of thing inside this form.this control box is basically an outcome of the data wizard..so its connected to oracle. also in the control box there is a button which when clicked opens up several other forms...now the prob is all these forms that get opened after clicking the button should be children of the main MDI form. how should i do that? in the button code..what i did was
dim newform as new form2() ....[this is one of the many forms to be opened up after button down]
newform.mdiparent = form1() ....[form1 is the main form]
newform.show()
now the error is that form is supposedly of type ??!?? so the code doesnt compile
2) how do i build this application and make it run on a system which doesnt have .NET installed?
|
|
|
|
|
What!?
#1.) There should not be a problem as long as your MDI Form's "MDIContainer" Property = True.
#2.) You can't
|
|
|
|
|
I create a class using the System.Timers and the FileWatcher. The on the main form I have a global variable to that class. Called m_FileMon. In a command button I instance a new copy of that class. Every time I click the command button I get a new instance even though I only have one variable for that class. Does anyone have any idead why this is happening. Is this because the system timers or the Filesystemwatch are multithreaded?
Any help would be greatly appriciated.
Forever Developing
|
|
|
|
|
Because you asked for one?
What is it that you are trying to accomplish?
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Unknown wrote:
"I love long walks, especialy taken by those that annoy me."
Paraphrased from TMNT:
"Cricket? You have to know what a crumpet is to understand Cricket."
|
|
|
|
|
Here hope this helps clarify things a bit more.
(Psudo code to follow)
Public Class frmMain
'This the standard windows form code
Private m_FileMon as clsMyFileMon
Private sub_cmdStart_Click
m_FileMon = new clsMyFileMon
End Sub
End Class
Public Class clsMyFileMon
Imports System.IO
Imports System.Timers
Imports System.Diagnostics
Public Sub New
'Starting new timers and a new instance of
'the filesystem watcher. Using AddHandler
'to add event handlers for the timer_tick event and
'the filesystemwatcher created event.
End sub
End Class
'I am watching for the creation of files in a specific folder
'then after a given amount of time I delete those files
End Class
So here is the problem. Every time I click cmdStart it is
starting another instance of my class. I know this because for every click of cmdStart I am getting another set of timers. The old instance is not being cleaned up. I have tried to kill the old instance by m_FileMon = Nothing, but the Finalize event does not fire.
Is this because the timers and the filesystemwatch are executing on different threads?
Do I need to implement IDispose to unhook the timers from my object and force the
garbage collector to kill my class?
Any help would be greatly appriciated.
Forever Developing
|
|
|
|
|
ElseIf txtVAT.Text <> " & IE#######% & " Then
MsgBox "Please enter a valid VAT Number starting with IE ", vbExclamation, "Invalid Data"
Exit Sub
the above is the code i use to ensure a VAT number is entered in correctly (ie an example of a correct VAT number is IE5314569A), however, it throws the message box regardless. What would be the correct syntax? Any help would be greatly appreciated!
|
|
|
|
|
Hi..
Why don't use MaskEdit control ?
anyway .. to compare strings use strComp function.
|
|
|
|
|
First, VB doesn't use wild cards comparing strings. It also doesn't do regular expressions natively. You could use a third party regular expression control like the Regular Expression Library (http://download.com.com/3000-2070-5588590.html?tag=lst-4-10) to validate the input.
The other option would be to build another string by scanning the input string and replacing each number with a # character and each letter with a % character. Then your code snippet would work.
|
|
|
|
|
Anybody created a class that inherits from the [b]LicenseProvider[/b] class?
What goes in the [b]GetLicense[/b] function to create the License to return?
'--8<------------------------
Ex. Datis:
Duncan Jones
http://www.merrioncomputing.com
|
|
|
|
|
Dear friends I am working on internet client application at moment have two
parts.
1- To download HTML pages from web side
2- Extract required information from the download pages
I have completed first part of the application successfully through internet SDK
(wininet) from VB but facing problem in remaining part
Please suggest me the solution. I would prefer to use already developed
component, if any
Ur cooperation in this regard would be highly appreciated
Thanks
Zulqarnain
zulphi_h@hotmail.com
|
|
|
|
|
hi..
what do u mean with (Extract required information ) ??
anyway you can use IE control and use its dhtml object model to retrieve the document elements (all anchors for example if you're making a web spider)
|
|
|
|
|
hey guys, I am trying to get an idea of how I can write functions in C++ which can be used by visual basic 6 programmers.. anyone have any suggestions on where to get started? i have seen how dlls work looking at the introduction to com article, but that dll doesnt seem to work in vb, keeps giving me 'can't fint dll entry point' errors..
im also considering switching to c#, is it easier to write dlls in c# that to learn how to in c++?
if i could just have one example that would work in vb that would help so much.. anyone got any links?
thanks a bunch!
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
use ATL library to create a com component and register it..
from VB instanciate an object of this component..ATL has minimum dependencies...
if you want to call the function using (Declare) as you do with API functions..you need to export the C++ functions using a *.def file
LIBRARY LibName
EXPORTS <br />
MakeFile @1
or See this : http://www.codeguru.com/forum/showthread.php?s=&threadid=225783
|
|
|
|
|
dazinith wrote:
anyone have any suggestions on where to get started?
The best article that I found if you are strictly going from C++ to VB 6.0 is Calling a C++ DLL from Visual Basic - Introduction[^]
dazinith wrote:
im also considering switching to c#, is it easier to write dlls in c# that to learn how to in c++?
There are many options if you choose to work with .NET. Keep in mind that the .dll's that are created under .NET are assemblies, different than what what VC++ 6.0 would produce as a .dll even though they share the same file extension.
-Nick Parker
|
|
|
|
|
dazinith wrote:
still a newb.. cut me some slack
I'll take this is consideration when answering your questions:
dazinith wrote:
hey guys, I am trying to get an idea of how I can write functions in C++ which can be used by visual basic 6 programmers..
There are several ways: the simplest form is creating a COM DLL. Not too easy for a newbie, though.
dazinith wrote:
im also considering switching to c#, is it easier to write dlls in c# that to learn how to in c++?
Yes, much simpler: You only need to create a library project, create a class, and in project properties, you set "Register for COM interop" as true. Your DLL is now ready to go in VB 6. There are step-by-step tutorials about this on CP which show how to do this in greater detail, but this is the general procedure.
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|
|
Hello:
I am dying here I cannot get my application in design mode all I get is a white page with this error in what did I do Please help cause I am new to vb
thanks
|
|
|
|
|
Are you inheriting your forms from anything (visual inheritance)?
I think this error can be caused in some cases by that.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Unknown wrote:
"I love long walks, especialy taken by those that annoy me."
Paraphrased from TMNT:
"Cricket? You have to know what a crumpet is to understand Cricket."
|
|
|
|
|
Are you using any ActiveX controls? I've had similar problems when I load up my projects on machines that don't have all the required ActiveX controls for my program. The consequence is that Visual Studio won't know how to display the control in design mode, and therefore you get a nice blank page with some useless message on it.
If you are using ActiveX controls, you can check under References in the Solution Explorer to see if you are missing any references on the machine. If this is the case, try reinstalling the ActiveX control and that might fix it for you.
If this is not the case, then perhaps you should post the error message you've been getting to give us all an idea of what's going on.
Hope this helps.
Daniel E. Blanchard
|
|
|
|