PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 ... 10
 on: October 10, 2019, 01:58:22 PM 
Started by SeaVipe - Last post by SeaVipe
Thanks, Ray. Eudora?! There's a blast-from-the-past! For years I was an itinerant technical salesman and after much trial and error, Office turned out to be the best way for me to have my wordprocessor, spreadsheet and email with me on my travels.
My main application (AKA an endless work-in-progress) is a CRM based on an old Ashton-Tate dBase .prg I wrote a very long time ago. Over the years it slowly morphed into a VB app and then a FireFly app and, when out of beta, a WinFBE app. Accessing the outlook.pst file would be a way to keep all electronic communication grouped together for an individual account. So far I can see-at-a-glance calls, texts and manually input journal entries. Currently, I copy/paste the body of an email into a journal entry only if it is or could become part of a business transaction. So having my emails as an accessible database would save a bunch of time. Maybe this is where SQLite3 comes into play?

 on: October 10, 2019, 07:23:38 AM 
Started by SeaVipe - Last post by raymw
Hi Clive, I'd help, if I could, but I do not use Outlook or Office. I used to use Eudora? for emails, but it screwed up my emails some years ago, so since then I've used Thunderbird. My emails are filtered to different folders as they arrive, and I have them back to 1998, and they are easily retrieved using Thunderbird, or since they are stored, in my case, as text files, by any other method I wish. (20GB of useless emails, though...). I also use Mailwasher, which allows me to pre-filter/delete the spam to save me from downloading it. As I'm not peripatetic, I do not need to leave my emails on my isp's server.

 on: October 09, 2019, 03:13:21 PM 
Started by SeaVipe - Last post by SeaVipe
Has anyone experience with the Outlook Mail REST API? I'm looking to get basic Office 365 email information from my own emails stored on my PC. I would like to retrieve Sender/Receiver, Date, Body etc. I've read through a lot of posts on this forum but they are mostly PowerBasic which I am completely unfamiliar with and do not want to attempt porting to FreeBasic/WinFBE.
Any help/ideas would be appreciated, thanks.

 on: October 09, 2019, 01:33:32 PM 
Started by raymw - Last post by raymw
Right, almost there, but I'm finding that often the border styles for the forms or list boxes appear to randomly change to a non-valid type for that particular control. I reset it in the designer properties, it then compiles, until the next time, it is happening rather frequently.
Interesting that you'd say that because eary in the visual designer development I would notice this as well. I implemented a fix and it seemed to had worked, but if you're seeing it then I better investigate more. It is related to a got/lost focus issue when the user moves from control to control.

I did notice (and fixed) the situation where you have a dropdown combobox open for a particular control property but then switch to another control and that dropdown remains open for the newly selected control's property. This "may" be related to the problem that we're seeing. You'll be able to test it when I release the next version.

Hi Paul, another manifestation of the border problem - If I create forms, it seems that any border style I select, does not compile - error is saying ' error 99: No matching overloaded function,ACCCEPTBUTTON()  and similar for CANCELBUTTON()  Loading in a basic program that ran yesterday,  the exe. ran fine, but looking in designer view of form, it shows no entry (blank) in border style in properties. The menu items appear when I click there, as normal, but any selection, it does not compile. This means that I can not reliably edit any programs. I don't know if that helps you in narrowing down the problem area

edit to add here's a couple of parts of what is generated for two different forms, but similar in simplicity - just a form with a button, maybe a couple of text boxes.

Code: [Select]
function firstType.FormInitializeComponent( byval pForm as firstType ptr ) as LRESULT
   dim as long nClientOffset

   pForm->Text = "Form1"
   pForm->OnLoad = @first_Load
   pForm->OnClick = @first_Click
   pForm->Button1.Parent = pForm
   pForm->Button1.Text = "Button1"
   pForm->Button1.OnClick = @first_Button1_Click
   pForm->Text1.Parent = pForm
   pForm->Text1.Text = "Text1"

function masterformType.FormInitializeComponent( byval pForm as masterformType ptr ) as LRESULT
   dim as long nClientOffset

   pForm->Text = "master form"
   pForm->BorderStyle = FormBorderStyle.FixedSingle
   pForm->AcceptButton = @pForm->y
   pForm->CancelButton = @pForm->y
   pForm->Button1.Parent = pForm
   pForm->Button1.Text = "Button1"
   pForm->Button1.OnClick = @masterform_Button1_Click
   pForm->x.Parent = pForm
   pForm->x.Text = "x"

 on: October 08, 2019, 10:31:16 AM 
Started by raymw - Last post by raymw
I'm struggling a bit, confused with other graphic systems I may have used in the past, and not understanding how it fits together in fb. I would like to be able to resize the drawing area on the fly. Dragging the form borders, I could resize the graphics area before drawing to it, but only before the graphic area was created. The other problem, is that it is relatively straightforward to plot lines from a previously constructed list of coordinates, but I'm not sure if I can use path.addline as in the gdiplus examples, and to be able to add lines one by one, as they are generated on another form, so I need to be able to call the graphic area and drawing routines from other forms, and iirc, some of the parameters I tried to share did not seem to be shareable. The winfbx library help is quite good, with examples of the various components, but I believe I need a more comprehensive overview, that explains to me just the fundamental structure, that I do not understand...
I thought I would return to the more inbuilt fb graphics, but  that is not capable of producing the sort of effect I want, unless I go down to the pixel level- no brushes, unless I build them.
At this rate, I'll have to go back to gardening..

 on: October 06, 2019, 12:24:22 PM 
Started by raymw - Last post by raymw
I contacted wd wrt their 'my cloud' and similar Nas. Their software, they said, is based on linux, and they said removing a drive from the unit, it would not be directly readable on a windows PC. So, I'm going down the route of usb3 drive enclosures, attached to a separate windows pc. I've purchased a very cheap mini pc - SMALLRT Mini PC Windows 10 Pro DDR3L 4GBRAM /64GB ROM eMMC Intel x5-Z8350 HD Graphics Desktop Computer,4K/Built-in Dual band WiFi/BT 4.0 /1000Mbps LAN  It's 4 inches square by 1 inch thick, no fans. Not yet powered it up, been milling plastic, instead. It runs w10pro, must be a some really special licensing arrangement from Microsoft (or not), since it is cheaper than buying a normal license. Can't find much info on it, but it will most likely do what I want, if not, It'll be driving a cnc something or other. It weighs so little, I thought Amazon had sent out an empty box.

 on: October 06, 2019, 11:13:52 AM 
Started by raymw - Last post by raymw
Thanks Clive.
Although i was not going to bother with printing or saving the graphics, the c# code was fairly straightforward
Code: [Select]
    ' save drawing
'          '  if (myBitmap == null) MessageBox.Show("empty bitmap")
'                try
'                 if (myBitmap != null)  then
'                        myBitmap.Save("s:\\test2.png")
'                        myBitmap.Save("s:\\test.jpg", System.Drawing.Imaging.ImageForrmat.Jpeg)
'                        buttonSave.Text = "Saved file."
'                    end if
'                catch (Exception)
'                    MessageBox.Show("There was a problem saving the file." +
'                        "Check the file permissions.")


Code: [Select]
private void button2_Click(object sender, EventArgs e)
'            PrintDialog printDialog1 = new PrintDialog()
'            'if (printDialog1.ShowDialog() == printDialog1.
'            '  { printDialog1.   PrintVisual(_PrintCanvas, "My Canvas")  }
'            printDialog1.ShowDialog()
'            if (printDialog1.ShowDialog() == DialogResult.OK)
'            {
'                ' myBitmapb.ToString().Print()
'            }

and looking through the winfbx help, it looks like if I use CMemBmp Class that there is save and print in there. I wonder how many lines of code that will take to get it working. Let's see. Who knows, i may even attempt 3d rendering... I wonder if I could graphically create anaglyphs?

 on: October 05, 2019, 09:58:24 PM 
Started by raymw - Last post by SeaVipe
Hi Ray, I use global types a lot (my programs tend to be data-intensive). For me, accessing old data files created with VB, UDTs are invaluable. You can do so much with them.

Each time I create a UDT I try to learn a bit more. Here is my most recent attempt (hardly touching the surface):

Code: [Select]

Type xmlSMS

    Declare Sub get_xml()
    Declare Sub get_sms_count( ByVal in_str as String )
    Declare Sub set_ab( _
                        ByVal in_str as String, _
                        ByVal s_search1 as String, _
                        ByVal s_search2 as String, _
                        ByRef a as Integer, _
                        ByRef b as Integer _

Declare Function get_readable_date( ByVal in_str as String ) as String
Declare Function get_contact_name ( ByVal in_str as String ) as String
Declare Function get_number       ( ByVal in_str as String ) as String
        Declare Function get_body         ( ByVal in_str as String ) as String
        Declare Function get_SMS_type     ( ByVal in_str as String ) as String

        readable_date( Any )    as String
contact_name ( Any )    as String
        call_number  ( Any )    as String
        body         ( Any )    as String
SMS_type     ( Any )    as String

file_name               as String = ""
        SMS_count            as Integer = 0
MMS_count As Integer = 0

End Type

Within the body of the include file are routines such as this that match the Declares above:

Code: [Select]

Sub xmlSMS.get_xml()   

On Local Error Goto xmlError

    Dim As Integer iCounter = 0 
    Dim As Long     f        = Freefile
    Dim As Long o = Open( file_name For Binary Access Read As #f )
    Dim As Integer i = 0
Dim As Integer  x = 0

    If o = 0 Then

        Dim As String s = ""
        ? "SMS Good Open"

        Do Until Eof( f )               
If Eof( f ) Then Exit Do

            Line Input #f, s               '' read a line of text ...

If Instr( 1, s, "mms date" ) > 0 Then

i = 0
'' Inceriment count
MMS_count += 1

ElseIf Instr( 1, s, "sms protocol" ) > 0 Then

i = 2
'' Increment count
SMS_count += 1

End If
If i = 1 Then

iCounter += 1
ReDim Preserve readable_date( iCounter )
ReDim Preserve contact_name ( iCounter )
ReDim Preserve call_number  ( iCounter )
ReDim Preserve body         ( iCounter )
ReDim Preserve SMS_type     ( iCounter )

readable_date   ( iCounter ) = get_readable_date( s )
                contact_name    ( iCounter ) = get_contact_name( s )

End If

            If i = 2 Then

iCounter += 1
ReDim Preserve readable_date( iCounter )
ReDim Preserve contact_name ( iCounter )
ReDim Preserve call_number  ( iCounter )
ReDim Preserve body         ( iCounter )
ReDim Preserve SMS_type     ( iCounter )
call_number     ( iCounter ) = get_number( s )
                body            ( iCounter ) = get_body( s )
                SMS_type ( iCounter ) = get_SMS_type( s )
readable_date   ( iCounter ) = get_readable_date( s )
                contact_name    ( iCounter ) = get_contact_name( s )

            End If
        Close #f

? "SMS_Count = "; SMS_count

        ? "SMS Open Error: " , Err
    End If

Exit Sub


? Error code here...

End Sub

It works perfectly so "if it ain't broke, don't fix it"
Sometimes I almost feel like I know what I'm doing!

 on: October 05, 2019, 08:21:42 PM 
Started by raymw - Last post by Josť Roca
The error is that this line must be removed.

y The width of the bounding rectangle for the ellipse.

Thanks for reporting it.

 on: October 05, 2019, 07:55:44 PM 
Started by raymw - Last post by raymw
Hi Clive,

Not much operator interaction, mainly change a tool size,  centre the workpiece. I want to keep the graphics form as a separate inc file, I will modify it to read in the gcode directly, useful for quick checks. It just generates code for machining objects. No real purpose, maybe jelly moulds? just sort of interesting. Instead of using cad, it is easier to enter a few values. The only operator is me, and possibly one or two other interested folk. I started programmatically generating  Gcode back in dos days, (using visual basic for dos - Microsoft denied producing it when I queried if it was still around). Converted the spaghetti to c#, adding to it, machining flanges, drill holes on grid patterns, etc. added in code for 3d printing, then a few years ago, I thought, as a separate item, spirals could be interesting, so wrote a c# program to draw spirals, and engrave spirals. A few weeks ago, I was chatting to a friend who does woodturning, I said I could most likely cnc mill bowl shapes, shapes he could not cut on a normal wood turning lathe, and I revisited the spiral program, took the g-code output, parsed it using winfbe added in the third axis, and wrote the 3d code. But, since the milling cutters have a short cutting length, and no reduced shank, it means that on my machine, each cut depth can not be much more than 10mm for a 6mm router. So, every so often, as the cut goes down, it has to plane off the rest of the surface, That was easier to do by porting the c# code to fb, and adding in the planing code. fwiw, the first attempt, without the planing, the shank of the cutter, rotating at 24000rpm, set fire to the resin swarf. Not serious, but smelled a bit.

I find I only get one chance of doing the graphics. If I close the graphics form, and change some values in the main form, and try to draw it again, it opens the graphics form, but draws nothing. I can restart the application, and it will draw whatever I want, but only once.

Just for the sake of it, I may attempt to port my far more complex c# software to freebasic.  Search and replace is quite powerful.

Hi Paul,
I didn't know about global types in free basic. I could most likely more directly translated the c# code, if I'd known. Anyway, if you maintain the winfbx help file, then I think there's a typo in the
AddEllipse (CGpGraphicsPath)  parameter list  along the lines of yyur,yyub,icuryy4me   :D

Pages: 1 2 [3] 4 5 ... 10