___----------------------------------------------- The following example below demonstrates how to change the printer orientation to landscape. Please note that your printer must support landscape mode for these commands to have any effect. 1. Start a new project in Visual Basic (ALT, F, N). Form1 is created by default. 2. Add a command button (Command1) to Form1. 3. Add the following code to the global module: Type OrientStructure Orientation As Long Pad As String * 16 End Type ' Enter the following Declare statement on one, single line: Declare Function Escape% Lib "GDI" (ByVal hDc%, ByVal nEsc%, ByVal nLen%, lpData As OrientStructure, lpOut As Any) 4. Add the following code to the Command1_Click event procedure of the Command1 button: Sub Command1_Click () Const PORTRAIT = 1 Const LANDSCAPE = 2 Const GETSETPAPERORIENT = 30 Dim Orient As OrientStructure '* Start the printer Printer.Print "" '* Specify the orientation Orient.Orientation = LANDSCAPE '* Send escape sequence to change orientation x% = Escape(Printer.hDC, GETSETPAPERORIENT, Len(Orient), Orient, NULL) '* The EndDoc will now re-initialize the printer Printer.EndDoc Printer.Print "Should print in landscape mode" Printer.EndDoc End Sub Regards, Gord. E-mail: macleodg@cadvision.com Gord's Visual Basic Home Page http://www.cadvision.com/forward/vb ... Math Problems? Call 1-800-10x(24+13)-(64-16)/2 36x2. ___ * ColorQWK 1.1 * --- Maximus 2.02 * Origin: TechTalk; Calgary, Alberta. V.34+ (1:134/40) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: E1C00002 Date: 01/06/97 From: GORD MACLEOD Time: 10:42am \/To: CAMERON BURGESS (Read 4 times) Subj: READ: VB JET redistribut Quoting Cameron Burgess to All about READ: VB JET redistributi... Hi Cameron, CB> I have come to the point of programming where it is time to distribute CB> my application and get some financial compensation for sitting up all CB> night over the past eight months in developing a piece of software for CB> a specific set of professionals. The program calls heavily on the CB> Jet Database Engine. CB> CB> THEN, I read in the License Agreement for Visual Basic 4.0 Professional CB> that: (Legal drivel snipped) CB> Have I misread the agreement? What are your comments? Have a look in the VB Help file for "Files You Are Allowed To Distribute" I'm sure you'll find you *are* allowed to distribute the JET engine and support files. You are in VB3. Regards, Gord. E-mail: macleodg@cadvision.com Gord's Visual Basic Home Page http://www.cadvision.com/forward/vb ... I'd give you a piece of my mind, but I'm on the last one. ___ * ColorQWK 1.1 * --- Maximus 2.02 * Origin: TechTalk; Calgary, Alberta. V.34+ (1:134/40) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: E1C00003 Date: 01/07/97 From: JOHN TOMLEY Time: 09:43am \/To: PETER SMOLENAERS (Read 4 times) Subj: USER DEFINED MESSAGE BOX Maybe I dont understand your message but you can just call the message box function with the following Msgbox "DO you require help" and the message box will have that in quotes in the box Try having at the top of your sub sub(/////////////) on error goto errmess errmess: msgbox"An error has occured of type " & errnumber &chr(10)_ & "which is " & errdescription exit sub endsub --- GEcho 1.12/beta+ * Origin: The InterACTive BBS - Canberra ACT - (06) 253-4933 (3:620/243) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: E1C00004 Date: 01/07/97 From: KURT J. TISCHER Time: 04:47pm \/To: DIK COATES (Read 4 times) Subj: Time/Date Stamp DC> KJT> No I haven't tried that. How would this relate to the DC> KJT> time/date stamp? DC>By setting the archive bit of the file attribute, it gives the operating DC>system information that the file has changed since the last time it was DC>opened and should set the file date and time of the file DTA... All files DC>carry the following info with them: Thanks, I always wondered what the archive attribute was for. The others seem self-explanatory. * SLMR 2.1a * Harrass an agnostic. Burn a question mark in his yard! --- SLMAIL v4.5a (#4334) * Origin: 3RD EAR BBS - Middleburg Hts., OH (216) 234-6088 (1:157/438) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: E1C00005 Date: 01/04/97 From: PAUL JOHNSTON Time: 10:48pm \/To: CAMERON BURGESS (Read 4 times) Subj: READ: VB JET redistribution agreement Hello Cameron. CB> "Unless your software product requires your customers to license CB> Microsoft Office for Windows, or a component of it, in order to It seems to stress general purpose in the paragraph. I think what they're trying to avoid is some-one drawing a few text boxes, knocking up a few lines of code, and coming up with a freely distributable application a bit like one of the office things, which uses the MS code in the DLLs to do the hard work. CB> As I understand it, a simple "e-mail address book" program, for CB> instance, that relies on the JET engine would be in breach of this CB> agreement if sold for $5. No, that's not general purpose and so allowed. Write them an email about this, but stress in the message that if they do not reply within a time period which you specify then you will assume they have no objections. Well done on finishing your app! Paul --- FMail 1.02 * Origin: Paul's region of zero area in the plane, Manchester (2:250/109.38) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: E1C00006 Date: 01/07/97 From: DIK COATES Time: 07:12pm \/To: KURT J. TISCHER (Read 4 times) Subj: Put a LF in a text box >>>> QUOTING Kurt J. Tischer to Dik Coates <<<< KJT> Thanks! I'll give it a shot. Hope it helps... sorry for the lack of comments... but when yer codin' ya gotta be codin'... Should be simple enough to sort through... Regards Dik ... Beam me up Scotty, she says she's .... pregnant! ___ Blue Wave/QWK v2.12 --- Maximus 2.02 * Origin: The KAWARTHA Connection, Omemee ON, Can. 705-799-1160 (1:253/2) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: E1C00007 Date: 01/07/97 From: DIK COATES Time: 09:03pm \/To: RICHARD LONES (Read 4 times) Subj: READ: VB JET redistribut >>>> QUOTING Richard Lones to Cameron Burgess <<<< RL> I would take the intent of the above restriction to be "You RL> can't use our DBMS RL> engine as the nucleus of a product which competes directly with RL> ACCESS, WORD, EXCEL, or MS-OFFICE." I would then suggest that any database system that uses the jet engine could be considered to compete directly with access... Regards Dik ... -0.809016994 - Sine of the beast. ___ Blue Wave/QWK v2.12 --- Maximus 2.02 * Origin: The KAWARTHA Connection, Omemee ON, Can. 705-799-1160 (1:253/2) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: E1C00008 Date: 01/06/97 From: BUCKY CARR Time: 03:13pm \/To: PAUL JOHNSTON (Read 4 times) Subj: S-T-E-E-P Learning Curve PJ> It might do, but that's not the point. If you make a function or PJ> variable public then anything can modify it. A typo in one module PJ> could modify a variable in another by accident - causing problems. You PJ> should only make things public which you are prepared for others to PJ> call. Gotcha. --- PPoint 2.00 * Origin: Vanishing Point 7198460140 Trinidad CO (1:15/7.1) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: E1C00009 Date: 01/06/97 From: BUCKY CARR Time: 03:14pm \/To: PAUL JOHNSTON (Read 4 times) Subj: Events PJ> Of course, this is part of the reason why DOS is faster than windows. May be faster, but is less robust in a comprehensive way. The more I work with VB v4.0 with Win95 and 50 megs of memory the more convinced I get that it is miles ahead of MSDOS Basics (and I have QB v4.5, PDS and VBDOS and learned programming in Basic under CP/M with 64k machines.) It finally got through my thick skull last night that a given object may have a LOT of interrupt-like "events" that can be invoked upon it. I have a textbox that clears when it gets-the-focus, then the keypress event ("interrupt") can act on that object, too. A dozen other events can act on that object as well. PJ> These are object-orientated programming terms. Encapsulation is about PJ> letting outsiders only access some parts of your class (just the PJ> public ones). VB can do this, I believe. PJ> Inheritance defines a class in terms of another class and some new PJ> elements. For example, you may define the class animal. When defining PJ> the class cat, you would say it was an animal, but it had some PJ> additional features. Don't know if the hierarchy of VB will allow for this exactly. Sounds sort of like "making up the rules as you go along", ie - defining additional truisms as one goes along. If I'm on the right track, thinking-wise, if a lesser class adds definitions can the superior classes know about them, too? PJ> I won't even try to explain polymorphism. Drats. I'll have to ask an alien. PJ> These don't seem to relate much to VB which does not as yet allow a PJ> lot of object orientation. Alas. --- PPoint 2.00 * Origin: Vanishing Point 7198460140 Trinidad CO (1:15/7.1) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: E1C00010 Date: 01/06/97 From: BUCKY CARR Time: 03:26pm \/To: SAMI ALBORBAR (Read 4 times) Subj: I need a "random" number SA> Using Randomize function (both QBasic and VB 4.0) is enough. In QB it really was a poor provider of randomization. I'll fiddle with it in VB and see. Thanks. --- PPoint 2.00 * Origin: Vanishing Point 7198460140 Trinidad CO (1:15/7.1)