--------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EBN00000 Date: 07/16/97 From: MICHAEL JOSEPHSON Time: 09:12am \/To: ROBERT DIGGLE (Read 5 times) Subj: APM Hello Robert! 13 Jul 97 20:43, David Burns wrote to Robert Diggle: RD>> Does anybody know the APM procedures in the API (if any) for RD>> Visual BASIC. I want to be able to switch my computer to RD>> standard-by mode etc. DB> Haven't tried it yet, but DB> Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds DB> As Long) DB> certainly looks promising Unfortunately the Sleep function has nothing to do with power management. What it does is suspend the current thread in a program for the time specified in dwMilliseconds. I tried to check the SDK ref for info on APM and couldn't find anything. I checked the Delphi help file and there's a page which says "This overview describes the power management functions and messages, and explains how to use them in applications and installable drivers." but I can't actually find any of the info! ;-( /\/\ike email: maj@cs.man.ac.uk ... Gravity doesn`t exist: the earth sucks. --- FMailX 1.02 * Origin: Michael's Point in Sunny Whitefield (2:250/102.7) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EBN00001 Date: 07/18/97 From: DIK COATES Time: 07:22am \/To: STEVEN LAGER (Read 5 times) Subj: back in the echo >>>> QUOTING Steven Lager to All <<<< SL> FINALLY, my link to Visual_Basic has been restored. Glad to be back SL> here; and I imagime Dik will be tagging along very shortly. Yup! Regards and thanks, Dik ... I'd rather be monkeywrenching! ___ Blue Wave/QWK v2.12 --- Shotgun v2.00/Gold+ * Origin: On-Site Consulting Support BBS - Shotgun Alpha 2.0 (1:253/234) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EBN00002 Date: 07/18/97 From: STEVEN LAGER Time: 06:48pm \/To: EILEEN LOUISE (Read 5 times) Subj: Thank You. Eileen, Thank you very much for your netmail this morning, and while it gave me a momentary hope for a solution I still couldn't get the printing to work correctly and I tried (and tried and tried ). So I went back to using a RichTextBox as I had been using that originally. The reason that I switched to the MSFlexGrid was because I couldn't figure out how to properly format the RTB to handle columns. Well after having another coffee and taking another look at the RTB help files (which didn't help ) I sat down to try and figure out how to format for columns in a B. I have managed to figure it out (now 3 hours into formatting the RTB to display the data correctly) and thought I'd show you what I did, to show how I did it and to see if there WAS and easier way to do it . Anyway, what I did was create several defined tempStrings (col) to hold the TEXT portions and another one to hold the formatted numerical data: ======/snip code/============ Dim tmpString As String * 17 ' holds the formatted numeric data $###,###.#0) Dim col1 As String * 46 ' Dim col2 As String * 49 ' Dim col3 As String * 48 ' holds the Text Dim col4 As String * 23 ' Dim col5 As String * 12 ' Dim col6 As String * 3 ' Dim tmpYER As String tmpYER = App.Path & "\tfile1.tmp" If FileExists(tmpYER) = True Then Kill tmpYER End If Open tmpYER For Output As #1 Print #1, "" Print #1, Tab(2); "INCOME" LSet col2 = "Sales,gross income" RSet tmpString = CStr(Format(tmpCalc, Mformat)) Print #1, Tab(4); col2; Tab(128); tmpString Print #1, Tab(4); "LESS" LSet col2 = "Sales tax (if included in above)" RSet tmpString = CStr(Format(tTax, Mformat)) Print #1, Tab(6); col2; Tab(90); tmpString LSet col4 = "Sub-total" RSet col6 = "(-)" Print #1, Tab(70); col4; Tab(102); tmpString; Tab(125); col6 & tmpString Dim x, y x = tmpCalc - tTax NetSales = x LSet col5 = "Net sales" RSet tmpString = CStr(Format(x, Mformat)) Print #1, Tab(110); col5; Tab(134); tmpString Print #1, Tab(4); "ADD" ==============/end code snip/================ this tmpYER file is then fed into the RTB and the resulting display is: =============/ file display snippet /============= INCOME Sales,grosss income $.00 LESS Sales tax (if included in above) $985.97 Sub-total $985.97 (-) $985.97 Net sales -$985.97 ADD Reserves allowed in prior year Gross income -$985.97 COST OF GOODS SOLD Inventory at beginning of period ADD Purchases (including delivery,freight) $207.87 =====================/ end snippet /========================== Well, that's what I've done to get past the problem - but I do want to thank you again for taking the time to help out. 'Til next time ...... ..........> Steven Lager Sysop - On-Site Consulting FTN: 1:253/234@fidonet Internet: slager@ptbo.igs.net 100:1019/1@gds.net lager@usa.net 10:2020/203@softnet 111:1705/3@technet --- Msged/386 4.10 * Origin: ..oO Shotgun Pro v2.00 Alpha Test Site Oo.. 1:253/234@fidonet.org) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EBN00003 Date: 06/29/97 From: EDWARD ALOSKOFIS Time: 10:09am \/To: KURT J. TISCHER (Read 5 times) Subj: question for vb3 Hello Kurt! 05 Jun 97 03:34, Kurt J. Tischer wrote to Edward Aloskofis: KJT> Try setting the "Enabled" property of the timer to "False". hen KJT> in the button click procedure you can enable the timer. Here's a snip KJT> from one of my apps which is similar. Surely that was the culprit as I understood from you and many others in this important echo. I thank you for dealing with this matter Keep well Edward Aloskofis/Athens-Greece DDY ---------------------------------------------------------------------- --- GEcho 1.00 * Origin: Edward Aloskofis /Athens-Greece (2:410/138.5) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EBN00004 Date: 07/12/97 From: EDWARD ALOSKOFIS Time: 09:18am \/To: ALL (Read 5 times) Subj: I am back Hello All! I was delighted when my Boss where I am a point, informed me he is postponing his shutdown until early September this year. So I am happily back to this important echo where I received important assistance when preparing my timer program which I use extensively over my internet connections. I'll follow this echo as far as it can go. I am also expecting instruction as to how to import this echo from a site in the internet. Keep going!!! Edward Aloskofis/Athens-Greece DDY ---------------------------------------------------------------------- --- GEcho 1.00 * Origin: Edward Aloskofis /Athens-Greece (2:410/138.5) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EBP00000 Date: 07/18/97 From: EILEEN LOUISE Time: 06:50am \/To: NIELS SCHOOT (Read 5 times) Subj: Who Solves This Problem? Hi Niels, Quoting Niels Schoot to Mike Scirocco on Monday July 14 1997 NS>>> CPU occupation rises to 90%-100%, just when it's waiting for NS>>> some simple characters! MS>> I'm not sure I entirely understand what you are attempting to do MS>> here. Here is what I think you're asking for: MS>> 4. is this what you're looking for? a way to avoid a loop and MS>> still react to the string in the right way? NS> Thank you for your thinking, but this is not the solution to my NS> problem. what mike wrote seemed to be the solution to your problem based on your description. can you state your requirements? --- eileen@technologist.com * Origin: We Gladly Feast On Those Who Would Subdue Us (1:326/431) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EBP00001 Date: 07/18/97 From: EILEEN LOUISE Time: 06:56am \/To: STEVEN LAGER (Read 5 times) Subj: MSFlexGrid Hi Steven, Quoting Steven Lager to All on Wednesday July 16 1997 okay ... i think i see what is happening here. would love to play with it, but can't this morning (due to deadlines ... grin.) and you are on such a short time frame. it looks like the code is causing the print output to exceed the printer acceptable page margins. in other words, you are printing columns for several pages in one loop and not issuing an endpage. can you envision how that would be causing this problem? as to solving it... what is the best way and quickly? i don't know offhand. first thing i would investigate is whether of not an error is being raised when you exceed the bottom margin. if it is, that is the easiest way to discover where to issue the endpage. however ... you will have to change the logic quite (as you can probably see). if not, then some preprocessing logic regarding how big the grid is may be in order. scale it out to figure out if the last row is below the bottom margin and then fill it differently so you can issue the page break. SL> The code below will print the whole MSFlexGrid contents - even the SL> un-seen cells. SL> =======[ code follows ]=========== SL> Private Sub Grid_Print2(MSFlexGrid As Control) SL> Dim tppx As Integer ' alias TwipsPerPixelX SL> Dim tppy As Integer ' alias TwipsPerPixelY SL> tppx = Printer.TwipsPerPixelX SL> tppy = Printer.TwipsPerPixelY SL> Dim Col As Integer ' index to Ygrid1 columns SL> Dim Row As Integer ' index to Ygrid1 rows SL> Dim x0 As Single ' upper left corner SL> Dim y0 As Single ' " SL> Dim x1 As Single ' position of text SL> Dim y1 As Single ' " SL> Dim x2 As Single ' position of Ygrid1 lines SL> Dim y2 As Single ' " SL> Printer.Print "" SL> Printer.Font = Printer.Font SL> Printer.Font = "" SL> Printer.Font = Printer.Font SL> Printer.FontSize = 10 SL> Printer.FontBold = False SL> Printer.FontItalic = False SL> Printer.Font = "Arial" SL> Printer.FontSize = 12 SL> Printer.Print "" SL> Printer.Print "" SL> Printer.Print "Company : " & Trim(Label3) SL> Printer.Print "Address : " & Trim(Label5) SL> Printer.Print " " & Trim(Label6) SL> Printer.Print " " & Trim(Label7) SL> Printer.Print "" SL> Printer.Print "Telephone:" & Trim(Label9) SL> Printer.Print "Fax :" & Trim(Label11) SL> Printer.Print "" SL> ' set upper left corner SL> x0 = Printer.CurrentX SL> y0 = Printer.CurrentY SL> '///////////// SL> ' I know that typically it would be Cols first then Rows in the loops SL> but when SL> ' when I tried it that way it would only print the 'visible' cells, SL> whereas I ' need all the grid contents printed. '/////////////// SL> y1 = y0 SL> For Row = 0 To YGrid2.Rows - 1 SL> x1 = x0 SL> For Col = 0 To YGrid2.Cols - 1 SL> Printer.CurrentX = x1 SL> Printer.CurrentY = y1 SL> YGrid2.Row = Row SL> YGrid2.Col = Col SL> Printer.Print YGrid2.Text SL> x1 = x1 + YGrid2.ColWidth(Col) SL> If x1 + YGrid2.ColWidth(Col) >= YGrid2.Width Then Exit For SL> Next Col SL> y1 = y1 + YGrid2.RowHeight(Col) SL> Next Row SL> End Sub SL> ===============[ end code ]===================== SL> If anyone can help PLEASE jump in with any ideas ... this is the last SL> part of the project (and wouldn't you know it would be the one to give SL> me a problem) and I am on a REAL short timetable. SL> I will even call voice if you netmail me a phone number. --- eileen@technologist.com * Origin: We Gladly Feast On Those Who Would Subdue Us (1:326/431) --------------- FIDO MESSAGE AREA==> TOPIC: 178 VISUAL BASIC Ref: EBP00002 Date: 07/19/97 From: LILA GODEL Time: 11:09am \/To: LAURENT TRABATTONI (Read 5 times) Subj: Load notepad with file -> x = Shell("C:\windows\notepad.exe " + Command$, vbMaximizedFocus) Worked just fine. Now thanks to this I can launch any other program by right clicking on a file and minipulate the file if I come up with a reason to. --- PCBoard (R) v15.3/M 5 * Origin: Riverdale, Ga (1:133/9024)