A439 Using VB or VBA, is it possible to 'look into' an MDB file to see if there is any code in it? (macros, modules or in forms) Andrew I made a checkbox and I want a command button to run what I have in the Checkbox code. in your command button code, put checkboxname_Click this will run your checkbox click code! I have written a program and will pack the files into a setup.exe file with VB6. After it is installed, I hope the program can be activated after the installation and the computer startup. Is there anyone could tell me how word.selection method. At the moment I am using bookmarks, it works but it's not want I want. string. Can you help me out please? i have one that when it runs gets a run time error 7! it is a windows 95 environment! any suggestions of what an run time error 7 It means Out of Memory. I can remember having this error on win95 systems, but the system wasn't really out of memory. It was an error which occured when no graphic handles are left. When the user started my application twice or more (many Instances) or the user worked with it a long time, then the error occured. In my case it happened in an explorer like application, which had about 50 different icons for its Treeview and Listview. In this case MS told me that each icon needs an own handle for each Listview and Treeview icon on Win95. There was no other fix than take WinNT or to have only one instance of my Application in memory. With Win98 the error occured not so often. Only under WinNT and 2000 the error never occured. I use an adobc to fill a datagrid with a join over two tables. In the join are the info of the first table and the id-pointer and code (C) of the second table. In the datagrid the id-pointer is invisible. With a viewlist let the user change the code (C). So I get a new id-pointer for the record in the first table that i can put in the adobc. My problem is how to show the corresponding code (C) in the datagrid. When I put the changed code in the adobc the code changes also in the second table and thats incorrect. Is there a way to show the changed code in the datagrid without refreshing the whole adobc and so alle the records? Umm.. try this: Put #1, FileLen(SavePath) + 1, sData & ------------- & vbNewLine Max Bolingbroke At the start of all your validation stuff put a flag: Dim bOK As Boolean bOK = True Set it to false when one of the checks fail Now in the if block put: If bOK = True Then My Code End If HTH Max Bolingbroke of postcode, = vbOKOnly, It shows up on the Components list as Microsoft Common Dialog Control 6.0 (SP3) on mine. Lists the file name as C:WINDOWSSYSTEMCOMDLG32.OCX which you can add manually with the Browse button. Terry Austin my program runs beautifully in debug mode, from the IDE, and compiles okay. but when run, the compiled .EXE only appears in the process list for a flash of time, beeps, and terminates. it appears to be returning a clean 0 for a return code. a Sub Main() is my startup object, and a MsgBox followed by an End in the sub does not produce a messagebox when the EXE is run. my code is never reached at all! also, the .EXE does not work as a COM object from a calling program, either. i thought maybe a project file was grunged, but starting a new project and adding my source back to it didn't fix the problem either. advice? AX EXEs are funny things - a bit like a cross between a VB (AX) DLL and a real EXE If you have set the startup object to Sub Main - and you try running the thing - then this behaviour is typical - put a MsgBox in the Sub Main and then wonder where the 'flow of execution' will go after it hits the End Sub of the Sub Main It is probably a good idea to give the AX EXE a Form - and show that in the Sub Main - you can then use it for both keeping the EXE alive and for tracing calls in from its 'exposed classes' If it is not 'accessable' as a COM object from a normal VB App then either the AX EXE is not registered (and just running it registers it) or you have forgotton to give it any 'exposed Classes' On 10 Apr 2002 11:17:03 -0700, isbat1@yahoo.com (Anonymous Coward) The problem that I have is that I need to launch my vb program from a shell command in SQL Server. I can't use a program with form with that command. That's why I'd like a vb program who can do DDE without a form, Is it possible? Someone tell me that maybe I could do it with class? Is it true, If so, How to do it? Mario Denis Create a new project. Remove all forms. Add a module file. Create a procedure Sub Main, put in your codes. Set your porject to start in the sub main procedure BTW, referring to your previous post Program without form ,I don't think it is possible to use controls without forms. Maybe the use of API will help. -- --------------------- Hensley Bass Home Page: http://pages.intnet.mu/jhbpage shell I got a program called Windows commander from which has the function I was looking for. I was looking for files in a dirctory/subdirectories that do not contain a piece of text. -- --------------------- Hensley Bass Home Page: http://pages.intnet.mu/jhbpage Do you mean you want to, say, enter *.doc and have all files *but* the .doc files listed/returned? You came to the right place then ... see (deep breath) Minimal Code for a Single or Multiple File Extension Inclusive/Exclusive Recursive Search for Files (single drive) ... you want the exclusive part ... http://www.mvps.org/vbnet/code/fileapi/recursivefiles_minimal_multipleselect ive.htm -- Randy Birch MVP Visual Basic http://www.mvps.org/vbnet/ Please respond only to the newsgroups so all can benefit. *There are 10 kinds of people...those who understand binary and those who don't.* On Tue, 9 Apr 2002 21:22:06 +0200, R.Wieser Hmmm, Good point, I turned on fixed pitch font and looked at the previous message.... Your right, you did add indenting, and 3 characters per indention.... ;-) Supposedly if you stay on the same POP3/SMTP server you can omit the domain name. Beyond that, AOL is the only others that even try omitting the domain name, and there it becomes @aol.com to the rest of the world.... Its something you have to try, I don't think its a fredsmith, its going to go to fredsmith@yourdomain eg. for me it'd be sent to fredsmith@communicomm.com ....For you it'd be fredsmith@iss.u-net.com .... On Wed, 10 Apr 2002 10:53:24 +0100, rmstar Let's not forget my favorite: johng%communicomm.com@deltech.net to johng@communicomm.com ..... And on my BBS, all Periods get changed to &'s and spaces to _'s, so A. B. C would be A&_B&_C@main-line.net and weather it really is is two totally different things! MET offfice would be a start. Okay, not very funny but I had to point it out. N@ Sorry, I'm confused. I've been away from my desk most of the day and have suddenly developed hayfeaver, a condition I have never suffered from in my life! Until now ;o( same computer. user, FredSmith In practice, you would probably never need to do this in VB because it's, as far as I'm aware, a linux only command. However, I wholey accept your point Maybe, finding data in an HTML page would be a better example? Gosh, that sounded posh for me. ;o) Yes I know about those - and what I described was not that. The person who found this was quite capable of distinguishing between Perhaps we leave this for a few weeks and I'll come back with an an affirmation and demonstration - or a grovelling apology for misleading information. Personally I think the latter unlikely - while I know a fair bit about exchange server within an organistion can take this (lack of) form - but I assume that's not it. Could you try and find out the circumstances - I'll try to figure it out (but more as a puzzle than anything else). I don't see how it could ever resolve though. Chris I made an encryption program quite a while ago andit was my first ever VB project. It included a few algorithms in the program and now I want to edit this one so that it only uses one: Twofish. I have the program and it is working fine, but I cannot seem to get rid of my Combo Box without causing errors in my program. This is due to the fact that in my old program (which this one is from) I had to select what algorithm to use form this Combo Box. It's been a good year or two since I have used VB and I am in serious the message (Remove ' -remove- ' obviously!) Hey guys. I've been coding Visual Basic for just over a year now and to be honest, its never been my favourate language, which means that I havn't put much effort into learning it. The way I usually solve such problems is by setting myself small projects so... I've been working on a few and I've cam up with and idea that has me slightly stumped and no amount of Yahoo-ing or Google-ing I helping so I was wondering if you could help. What I'm trying to do is create a basic HTML editor with a couple of features. The problem is that I would like to add color coding to the Rich Text Box thats holding my text. (i.e. Tags are made green and properties made red). I dont know how to go about this, I'm thinking that its best to seperate the box into lines and check for keywords in a database then highlight them and change their color, basically, I have no idea how to do this. So, the quesiton is... How do I find, highlight and change the color of every occurance of a word in a Rich Text Box K1ng I've done it in VBA before. basically you need to disect the header of the 8-bit file. I'm used to .bmp files. I'll try to find a URL for you, but I got mine had an Chris hi is there a way to load an icon in a statusbar.panels as response to an event without using API ? if yes how ? if not what's the API call ? If you're using VB6, just assign it ... StatusBar1.Panels(1).Picture = ImageList1.ListImages(1).Picture or .. StatusBar1.Panels(1).Picture = LoadPicture(D:somegraphic.gif) 'or ico or bmp or jpg -- Randy Birch MVP Visual Basic http://www.mvps.org/vbnet/ Please respond only to the newsgroups so all can benefit. *There are 10 kinds of people...those who understand binary and those who don't.* I've managed to confuse my on this one! How do I get an array back from a class property? Here are some snippets 'in Class CSimpleSub Private m_aInText() as Byte Public Property Get aInText() As Byte aInText() = m_aInText() End Property 'in form Private cipher as as CSimpleSub Set cipher = new CSimpleCipher Dim textArray() testArry() = Cipher.aInText One of the class methods set the length of aInText() internally? Trying different things I keep getting Can't assign to array Try the following: 'in Class CSimpleSub Private m_aInText() as Byte() Public Property Get aInText() As Byte() aInText = m_aInText End Property 'in form Private cipher as as CSimpleSub Set cipher = new CSimpleCipher Dim textArray() As Byte testArry = Cipher.aInText is it possible to write a program where you open different images, put them together and save this composition as a new file???? quiet urgent... Eric I want to print a transparent gif (back color visible) Have no problem on screen, but loose transparency when sent to printer. TIA. That is by far the stupidest comment I've ever read. Maybe you should try printing on transperency paper. heh. I wouldn't run PHP on a windows box, it's fine for development but in a live situation I wouldn't touch it. It all depends how mission-critical your site is. Need reliability? Then You have to ask yourself the question, Why use XP at all? XP server is very expensive, linux is free and far more stable. ? if At the start of all your validation stuff put a flag: Dim bOK As Boolean bOK = True Set it to false when one of the checks fail Now in the if block put: If bOK = True Then My Code End If HTH Max Bolingbroke of postcode, = vbOKOnly, It shows up on the Components list as Microsoft Common Dialog Control 6.0 (SP3) on mine. Lists the file name as C:WINDOWSSYSTEMCOMDLG32.OCX which you can add manually with the Browse button. Terry Austin my program runs beautifully in debug mode, from the IDE, and compiles okay. but when run, the compiled .EXE only appears in the process list for a flash of time, beeps, and terminates. it appears to be returning a clean 0 for a return code. a Sub Main() is my startup object, and a MsgBox followed by an End in the sub does not produce a messagebox when the EXE is run. my code is never reached at all! also, the .EXE does not work as a COM object from a calling program, either. i thought maybe a project file was grunged, but starting a new project and adding my source back to it didn't fix the problem either. advice? AX EXEs are funny things - a bit like a cross between a VB (AX) DLL and a real EXE If you have set the startup object to Sub Main - and you try running the thing - then this behaviour is typical - put a MsgBox in the Sub Main and then wonder where the 'flow of execution' will go after it hits the End Sub of the Sub Main It is probably a good idea to give the AX EXE a Form - and show that in the Sub Main - you can then use it for both keeping the EXE alive and for tracing calls in from its 'exposed classes' If it is not 'accessable' as a COM object from a normal VB App then either the AX EXE is not registered (and just running it registers it) or you have forgotton to give it any 'exposed Classes' On 10 Apr 2002 11:17:03 -0700, isbat1@yahoo.com (Anonymous Coward) The problem that I have is that I need to launch my vb program from a shell command in SQL Server. I can't use a program with form with that command. That's why I'd like a vb program who can do DDE without a form, Is it possible? Someone tell me that maybe I could do it with class? Is it true, If so, How to do it? Mario Denis Create a new project. Remove all forms. Add a module file. Create a procedure Sub Main, put in your codes. Set your porject to start in the sub main procedure BTW, referring to your previous post Program without form ,I don't think it is possible to use controls without forms. Maybe the use of API will help. -- --------------------- Hensley Bass Home Page: http://pages.intnet.mu/jhbpage shell I got a program called Windows commander from which has the function I was looking for. I was looking for files in a dirctory/subdirectories that do not contain a piece of text. -- --------------------- Hensley Bass Home Page: http://pages.intnet.mu/jhbpage Do you mean you want to, say, enter *.doc and have all files *but* the .doc files listed/returned? You came to the right place then ... see (deep breath) Minimal Code for a Single or Multiple File Extension Inclusive/Exclusive Recursive Search for Files (single drive) ... you want the exclusive part ... http://www.mvps.org/vbnet/code/fileapi/recursivefiles_minimal_multipleselect ive.htm -- Randy Birch MVP Visual Basic http://www.mvps.org/vbnet/ Please respond only to the newsgroups so all can benefit. *There are 10 kinds of people...those who understand binary and those who don't.* On Tue, 9 Apr 2002 21:22:06 +0200, R.Wieser Hmmm, Good point, I turned on fixed pitch font and looked at the previous message.... Your right, you did add indenting, and 3 characters per indention.... ;-) Supposedly if you stay on the same POP3/SMTP server you can omit the domain name. Beyond that, AOL is the only others that even try omitting the domain name, and there it becomes @aol.com to the rest of the world.... Its something you have to try, I don't think its a fredsmith, its going to go to fredsmith@yourdomain eg. for me it'd be sent to fredsmith@communicomm.com ....For you it'd be fredsmith@iss.u-net.com .... On Wed, 10 Apr 2002 10:53:24 +0100, rmstar Let's not forget my favorite: johng%communicomm.com@deltech.net to johng@communicomm.com ..... And on my BBS, all Periods get changed to &'s and spaces to _'s, so A. B. C would be A&_B&_C@main-line.net and weather it really is is two totally different things! MET offfice would be a start. Okay, not very funny but I had to point it out. N@ Sorry, I'm confused. I've been away from my desk most of the day and have suddenly developed hayfeaver, a condition I have never suffered from in my life! Until now ;o( same computer. user, FredSmith In practice, you would probably never need to do this in VB because it's, as far as I'm aware, a linux only command. However, I wholey accept your point Maybe, finding data in an HTML page would be a better example? Gosh, that sounded posh for me. ;o) Yes I know about those - and what I described was not that. The person who found this was quite capable of distinguishing between Perhaps we leave this for a few weeks and I'll come back with an an affirmation and demonstration - or a grovelling apology for misleading information. Personally I think the latter unlikely - while I know a fair bit about exchange server within an organistion can take this (lack of) form - but I assume that's not it. Could you try and find out the circumstances - I'll try to figure it out (but more as a puzzle than anything else). I don't see how it could ever resolve though. Chris I made an encryption program quite a while ago andit was my first ever VB project. It included a few algorithms in the program and now I want to edit this one so that it only uses one: Twofish. I have the program and it is working fine, but I cannot seem to get rid of my Combo Box without causing errors in my program. This is due to the fact that in my old program (which this one is from) I had to select what algorithm to use form this Combo Box. It's been a good year or two since I have used VB and I am in serious the message (Remove ' -remove- ' obviously!) Hey guys. I've been coding Visual Basic for just over a year now and to be honest, its never been my favourate language, which means that I havn't put much effort into learning it. The way I usually solve such problems is by setting myself small projects so... I've been working on a few and I've cam up with and idea that has me slightly stumped and no amount of Yahoo-ing or Google-ing I helping so I was wondering if you could help. What I'm trying to do is create a basic HTML editor with a couple of features. The problem is that I would like to add color coding to the Rich Text Box thats holding my text. (i.e. Tags are made green and properties made red). I dont know how to go about this, I'm thinking that its best to seperate the box into lines and check for keywords in a database then highlight them and change their color, basically, I have no idea how to do this. So, the quesiton is... How do I find, highlight and change the color of every occurance of a word in a Rich Text Box K1ng I've done it in VBA before. basically you need to disect the header of the 8-bit file. I'm used to .bmp files. I'll try to find a URL for you, but I got mine had an Chris hi is there a way to load an icon in a statusbar.panels as response to an event without using API ? if yes how ? if not what's the API call ? If you're using VB6, just assign it ... StatusBar1.Panels(1).Picture = ImageList1.ListImages(1).Picture or .. StatusBar1.Panels(1).Picture = LoadPicture(D:somegraphic.gif) 'or ico or bmp or jpg -- Randy Birch MVP Visual Basic http://www.mvps.org/vbnet/ Please respond only to the newsgroups so all can benefit. *There are 10 kinds of people...those who understand binary and those who don't.* I've managed to confuse my on this one! How do I get an array back from a class property? Here are some snippets 'in Class CSimpleSub Private m_aInText() as Byte Public Property Get aInText() As Byte aInText() = m_aInText() End Property 'in form Private cipher as as CSimpleSub Set cipher = new CSimpleCipher Dim textArray() testArry() = Cipher.aInText One of the class methods set the length of aInText() internally? Trying different things I keep getting Can't assign to array Try the following: 'in Class CSimpleSub Private m_aInText() as Byte() Public Property Get aInText() As Byte() aInText = m_aInText End Property 'in form Private cipher as as CSimpleSub Set cipher = new CSimpleCipher Dim textArray() As Byte testArry = Cipher.aInText is it possible to write a program where you open different images, put them together and save this composition as a new file???? quiet urgent... Eric I want to print a transparent gif (back color visible) Have no problem on screen, but loose transparency when sent to printer. TIA. That is by far the stupidest comment I've ever read. Maybe you should try printing on transperency paper. heh. I wouldn't run PHP on a windows box, it's fine for development but in a live situation I wouldn't touch it. It all depends how mission-critical your site is. Need reliability? Then You have to ask yourself the question, Why use XP at all? XP server is very expensive, linux is free and far more stable. ? if I can not see tables using VB6 Data View. I can establish a connection to the Northwind database on the SQL 2k server machine, but under Datalink1, if I click the plus sign in front of tables, I get nothing. The plus sign disappears. This is true for 'Database Diagrams', 'Views', etc... Test Connection reveals connection succeeded, and connection1 = (connected) is displayed on the bottom bar of the dataview window. [ MDAC 2.6 sp1; SQL 2000 sp2; VB 6 sp5; Office SR-1a; SQL Client Tools installed on workstation.; MS OLE DB Provider for SQL Server (version unknown, but assuming same as server since SQL 2000 Client Tools are installed on workstation) All real-time virus scanning software disabled on workstation and server. ] I don't care about loosing SQL 2000 features, I just need this to work again. Am I SOL for upgrading to SQL 2k? Can I get the DataEnvironment in VB6 to show me the SQL server tables again? (also) I cannot get this to function correctly in Access 2000 either. Performing the following: 1) Launch Access 2000 2) Choose Create a New Database Using Access Database Wizards, Pages and Projects from the opening dialog box. 3) Choose the General tab in New dialog box 4) Choose the icon for Project (Existing Database) and click OK 5) Assign a name to your project and click Create [I save to mydocuments on local drive] 6) Enter you SQL Server name, authentication information, and database name in the Data Link Properties dialog box, and click ok. [I log in as 'sa' and use northwind for the database] Again, I can see no tables. Only the new table wizard. Anyone knows how can I retrive the Primary Keys and Foreign Keys from a table using ADODB? The database is Oracle 8. Use OpenSchema method of ADO connection or you could use system tables from database server . You could check list of system tables for Oracle in documentation for it -- Val Mazur Microsoft MVP Anyone knows how can I retrive the Primary Keys and You could use the OpenSchema method of the Ado connection object: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/ mdmthopenschema.asp There are Enums for PrimaryKeys and ForeignKeys. You might find further information in TableConstraints. You can experiment with the OpenSchema calls that your OLEDB provider supports, along with the criteria for each, with our browser http://www.adoanywhere.com/download Another way of getting the information is to read the Oracle System tables directly. -- Michael Collier www.adoanywhere.com Anyone knows how can I retrive the Primary Keys and I have a table in SQL Server 2000. For each column I have entered the column description. I need to retrieve this information in my VB6 application using ADO. Jackson One way is to use OpenSchema method of ADO connection. Another way is to get information from system tables on SQL Server. In that case you can execute usual SELECT statements to select information from server. Check tables which names begin from SYS -- Val Mazur Microsoft MVP column using Jackson Val information_schema is the way forward -- Allan Mitchell http://www.sqldts.com Could be in Oracle. I am not expert in Oracle, but I am sure that it should have some kind of those tables or other objects -- Val Mazur Microsoft MVP system tables tsk tsk