Sunday, July 30, 2017

Rendering of Nodes in a Graph

Rendering of Nodes in a Graph


Olaf is a genius who gave us much VB6 + ASM projects over the years. Below is an advanced VB6 project + the vbRichClient5 library. If you ask what is this vbRichClient5 library, I can tell you that vbRichClient5 is a VB6 package that puts all programming languages at the corner of shame. Maybe Microsoft does not update VB6, but, super-advanced programmers like Olaf put Microsoft programmers at the corner of shame. I'm glad to have you among us Olaf !

This cairo-(vbRichClient5)-dependent Demo will show (as the Title says) - how to efficiently
implement a scenario, where you have to manage "connectable, draggable Boxes"
(as in the Graph in the following screenshot):



And a video here:



There's a green highlighted Connection (with an appropriate ToolTip), which can - (especially
when the Path is complex) - often cause headaches with regards to: "how-to-implement".

With cairo we have two nice calls available, which can help a great deal, when solving
such more challenging "HitTest-problems":

- cCairoContext.InFill(x, y)
- cCairoContext.InStroke(x, y) <-- this one was used in the Demo

So, what one basically has to do to accomplish a complex HitTest is, to simply apply the Path
in question onto a CairoContext with the appropriate coordinates "as when truly rendered".

Even better, such a cairo-context doesn't have to be derived from "something physically"
(as e.g. a larger ImageSurface), a "virtual one" is already sufficient for that task.

For that purpose (when working with the WidgetEngine, as in this Demo) - each cWidgetBase
already offers such a context over W.MeasureContext.

A slight problem I found was, that whilst CC.InFill always worked reliably, CC.InStroke was only
delivering reliable Hits in 80-90% on the length of a complex Path (as e.g. the Beziers I used here,
due to rounding-errors in the cairo-C-Source).

Though I found a patch for that in the cairo-repo and backported that to the version (vb_cairo_sqlite.dll)
which comes with the RichClient - in consequence CC.InStroke will now work equally reliable as CC.InFill.

So the version of the RichClient (including the latest compile of vb_cairo_sqlite.dll) which will work
well with the zipped Demo-Archive below, needs to be at least 5.0.24 - please visit the Download-
page at vbRichClient.com and update your package appropriately before running it.


by
Olaf

Source:VBForums
Source: VBRichClient



Sunday, July 23, 2017

You just can't trust Microsoft anymore

We used VB6 and Microsoft abandoned it (though we are lucky that it still continues working, even on Windows 10 despite Microsoft). Microsoft behaved despicably with VB6 - always using phrases like "we have no plans to support VB6 in the next release of Windows". But they always had to because VB6 programming is so widely used.
We used Silverlight, it was very good but Microsoft abandoned that too.
We looked at LightSwitch, we liked it, we even used it a little. Fortunately we didn't do much with it because we could no longer trust Microsoft. And we were right not to trust MS because they abandoned that too.
Then we needed to develop mobile apps. But Microsoft could only offer us Windows Phone, which they kept breaking compatibility with (Windows Mobile 6, Windows Phone 7, Windows Phone 8) before losing out altogether.
You just can't trust Microsoft anymore.

Saturday, July 15, 2017

Get IP and MAC addres

Get IP and MAC addres


Private Sub Form_Load()

    Dim myWMI As Object, myObj As Object, Itm
    
    Set myWMI = GetObject("winmgmts:\\.\root\cimv2")
    Set myObj = myWMI.ExecQuery("SELECT * FROM " & _
                     "Win32_NetworkAdapterConfiguration " & _
                     "WHERE IPEnabled = True")
    For Each Itm In myObj
        MsgBox (Itm.IPAddress(0))
        MsgBox (Itm.MACAddress)
        Exit For
    Next

End Sub





Source: VBForums

Friday, July 7, 2017

They left because they lost all trust

David Sobeski was a General Manager with Microsoft. 
He posted about "what went wrong" https://www.facebook.com/dsobeski/posts/10153683440480008
"The trust with developers has been a long deteriorating problem. .... Then, everything went to **** when .NET was released. Changes were being made to the C language, to the Visual Basic language. In one fell swoop, Microsoft told all of its developers that everything they were doing and did was wrong. Stop all that crazy C code or the AddRef / Release or that insane VB or Access code and use the new new thing."
"Being a developer for a Microsoft platform was insane. Don't forget Office. One of the largest platforms on the planet. It avoided all this and you still used VBA. Office had to continue to use VBA because there was no guarantee of compatibility between VBA and VB.NET. But now you were an island."
"The Windows Phone team did something that would seal its fate forever and lose the trust of developers. Windows Phone 7 was released with a new user experience and was the answer to iOS and Android. It actually got developers excited. But, a year later with Windows Phone 8, Microsoft told all the developers that the investments they made in Windows Phone was a waste of time because none of their apps will work on Windows Phone 8. That was it. It was over."
Sobeski concludes: "At the end of the day, developers walked away from Microsoft not because they missed a platform paradigm shift. They left because they lost all trust. You wanted to go somewhere to have your code investments work and continue to work."
by Chucky1