How To Highlight Similar Item/s and Fix Bugs in VB (Search ListView)

558fe5180e0e8fc922d31c23ef84d240

So my problem is that when I type for example "prod" in the SrchTBox and then click SrchBtn, it will only highlight "Product 2" but not "Product 1" even though they both have "prod" in their item name, how can I highlight any 2 or more relevant items? Also, how can I search items without the problem of worrying about case-sensitivity? That happened when I typed "prod" and it highlights the last item which is "Product 2" but not "Product 1." How can I also fix the bug where the program cannot read the text that I typed? (For example, I typed "rod" in the SrchTBox and a pop-up message shows up and it said, "No match has been found.")

NOTE: The problem is in SrchBtn.

Dim prdt As String() = New String(3) {}
Dim slctprdt As ListViewItem

Dim prdtName As String
Dim price As String
Dim qtty As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    ProductListView.View = View.Details
    ProductListView.GridLines = True
    ProductListView.FullRowSelect = True

    ProductListView.Columns.Add("Product Name", 126)
    ProductListView.Columns.Add("Price", 93)
    ProductListView.Columns.Add("Quantity", 93)

    prdt(0) = "Product 1"
    prdt(1) = "100"
    prdt(2) = "10"
    slctprdt = New ListViewItem(prdt)
    ProductListView.Items.Add(slctprdt)

    prdt(0) = "Product 2"
    prdt(1) = "200"
    prdt(2) = "20"
    slctprdt = New ListViewItem(prdt)
    ProductListView.Items.Add(slctprdt)

End Sub
Private Sub SlctBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    If ProductListView.SelectedItems.Count = 0 Then
        MsgBox("ERROR: No items selected")
    Else
        prdtName = ProductListView.SelectedItems.Item(0).SubItems(0).Text
        price = ProductListView.SelectedItems.Item(0).SubItems(1).Text
        qtty = ProductListView.SelectedItems.Item(0).SubItems(2).Text

        MsgBox(prdtName & " " + price & " " & qtty)
    End If

End Sub
Private Sub AddPrdtBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    Dim prdt As String() = New String(3) {}
    Dim slctprdt As ListViewItem

    If PrNTBox.Text <> Trim("") And PTBox.Text <> Trim("") And QTBox.Text <> Trim("") Then
        prdt(0) = PrNTBox.Text
        prdt(1) = PTBox.Text
        prdt(2) = QTBox.Text
        slctprdt = New ListViewItem(prdt)
        ProductListView.Items.Add(slctprdt)
        PrNTBox.Clear()
        PTBox.Clear()
        QTBox.Clear()
    Else
        MsgBox("ERROR: Incomplete textboxes")
    End If

End Sub

Private Sub SrchBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SrchBtn.Click

    Dim srchTxt = Me.SrchTBox.Text

    If srchTxt = String.Empty Then
        MsgBox("Please enter the search box first.")
    Else
        Dim strtIndx = 0
        Dim prdt As ListViewItem = Nothing

        If Me.ProductListView.SelectedItems.Count = 1 AndAlso Me.ProductListView.SelectedItems(0).Text = srchTxt Then
            strtIndx = Me.ProductListView.SelectedIndices(0) + 1
        End If

        If strtIndx < Me.ProductListView.Items.Count Then
            Do
                prdt = Me.ProductListView.FindItemWithText(srchTxt, False, strtIndx)

                If prdt Is Nothing OrElse prdt.Text = srchTxt Then
                    Exit Do
                End If

                strtIndx = prdt.Index + 1

                If strtIndx >= Me.ProductListView.Items.Count Then
                    Exit Do
                End If
            Loop
        End If

        Me.ProductListView.SelectedItems.Clear()

        If prdt Is Nothing Then
            MsgBox("No match has been found.")
        Else
            prdt.Selected = True
            prdt.EnsureVisible()
            Me.ProductListView.Select()
        End If
    End If
End Sub

WordPress 5.7 Introduces Drag-and-Drop for Blocks and Patterns, Streamlined Admin Color Palette, and One-Click Migration from HTTP to HTTPS

Category Image 091

WordPress 5.7 “Esperanza” was released today, named for Esperanza Spalding, an American jazz bassist who became an accomplished singer, songwriter, and composer in her early 20’s.

Versions 9.3 – 9.9 of the Gutenberg plugin are rolled into this update, bringing hundreds of enhancements and bug fixes that make working in the block editor more efficient and enjoyable.

One of the highlights is the new drag-and-drop capabilities in the block inserter. Users can now drag blocks and block patterns directly into the post content area, making page building even faster.

Many of the user-facing editor enhancements in this release give the user more control when using existing blocks:

  • Full height alignment: Blocks such as the Cover block now can have an option to expand to fill the entire viewport.
  • Buttons block: The Buttons block now supports vertical alignments, and you can set the width of a button to a preset percentage.
  • Social Icons block: You can now change the size of the icons in the Social Icons block.
  • Font size in more places: You can now change the font size in the List and Code blocks

This release also improves the UI for block variations to include the icon and description for the variation in the block inspector and a new dropdown to allow for switching between variations. Reusable blocks have been updated to be saved at the same time the post is saved. Quite a few more improvements have been added in version 10.1 of the Gutenberg plugin, which is not yet included core. If you use Reusable blocks frequently, you may want to install the plugin to take advantage of the expanded UI.

In addition to all the editor improvements, WordPress 5.7 introduces a streamlined color palette for the admin. It standardizes the palette to seven core colors and a range of 56 shades. One of the benefits is that all the shades meet the requirements for WCAG 2.0 AA recommended contrast ratio against white or black.

New Admin Color Scheme

Theme and plugin developers who want to better match the admin color scheme can easily reference the new standardized shades to make their products more at home in the WordPress admin. WordPress’ existing core classes have also been updated with the new color palette so plugin authors can use them to work within the new standardized palette.

One of the most exciting technical enhancements in 5.7 is a new one-click migration from HTTP to HTTPS. WordPress can now detect if the user’s hosting environment has support for HTTPS and update with the click of a button, handling mixed content rewrites where possible. This feature is available on the Site Health recommendations screen.

WordPress 5.7 continues the ongoing cleanup after the update to jQuery 3.5.1, which will eventually result in the removal of jQuery Migrate plugin. It fixes numerous jQuery deprecations in external libraries, cleaning up many JQMIGRATE warnings.

Developers may also be interested in the new filter-based Robots API included in 5.7. It enables the central management of the content of the robots meta tag injected into the page, and includes a setting to toggle whether search engines are allowed to display large media from the site. By default, a max-image-preview:large robots directive which will be injected into the robots meta tag based on the new setting.

Version 5.7 also includes native support for lazy loading iframes, a follow-up to WordPress’ support for lazy loading for images that came in 5.5. This should improve loading for pages that include embeds and other types of iframes.

Check out the WordPress 5.7 field guide for technical details on everything new in this release. This update is the result of work from 481 volunteer contributors who collaborated on 250 tickets on Trac and more than 950 pull requests on GitHub.

5 Key Security Protocols for WooCommerce Sites

Featured Imgs 26

5 Key Security Protocols for WooCommerce SitesWooCommerce sites certainly have unique needs in terms of web security, and as e-commerce increases worldwide, so does the risk of fraud and security breaches. Online security really is a basic requirement, just like the health inspection rating of a restaurant, and any issues that arise in your online store can undermine your web visitor’s […]

The post 5 Key Security Protocols for WooCommerce Sites appeared first on WPExplorer.

Add/Change Address on Receipts

Featured Imgs 23

We don’t ask for your address when you sign up for CodePen PRO. We don’t need it, as we don’t need to send you anything and we don’t really adjust anything based on your location. But it’s entirely understandable that you might want your address on a receipt of purchase. We get that request all the time. Now, rather than any sort of work-around, we allow you to enter an address that we’ll use for putting on those reciepts.

In your Settings > Billing, you’ll find an “Update Address” button.

Now when you open a receipt for any past charge (available always at Settings > Billing), that address will be there:

Note in the screenshot above I’ve clicked into the address area. That area is always editable, so you can manipulate one-off invoices before printing or saving as PDF, as needed.

Need to add a VAT?

Feel free to use one of the address lines for that, like Address 2 or Country. All these fields do is just output onto the receipt, so you can use them for whatever you need.

The post Add/Change Address on Receipts appeared first on CodePen Blog.

MemberPress Creators Have Earned over $1 billion dollars (Milestone Update)

Category Image 091

It’s always mind blowing for me to see the impact WordPress makes on the global economy.

MemberPress, the leading WordPress membership and course platform, announced today that they have passed the milestone of $1 billion dollars in creator earnings.

This is a conservative estimate and likely MemberPress creators have earned way more than that.

MemberPress Billion Dollar Creator Earning Milestone

With the digital acceleration from last year, they are estimating that MemberPress site creators are projected to earn over $600 million dollars in 2021 alone.

For those who don’t know, I invested in MemberPress in 2018 as part of our WPBeginner Growth Fund.

It’s been an exciting journey to work alongside with Blair Williams, founder & CEO of MemberPress.

The impact our users (website creators) are making through their online courses and membership sites is truly humbling to watch.

Note: Want to add premium content on your site? See our step by step guide on how to create a membership site, and how to sell online courses in WordPress.

Product Update from MemberPress

Last year, MemberPress launched an easy to use online course builder that works on top of the WordPress block editor. This makes it easy for non-techy website owners to create courses, add lessons, manage access control, and more.

Creating the sections and lessons for your course

The team also added a Classroom mode to offer a distraction-free learning experience that’s focused on content consumption and course completion rate. This immersive learning mode works with all WordPress themes.

The MemberPress course curriculum that users see, showing their progression through the course

Aside from the huge update on Courses, MemberPress also made it seamless to add premium content protection for various top page builder plugins such as Divi, Elementor, Beaver Builder, WP Bakery, etc.

They also made significant improvements to add drip content in WordPress, ability to gift memberships, added PDF invoices, integrations with PushEngage, and more.

I also got a sneak peek of some big features they’re working on, and it’s going to be an exciting 2021.

What Can You Use MemberPress for?

MemberPress is the best WordPress membership plugin and online course platform for many reasons.

Here’s what you can do with MemberPress:

Basically if you want to restrict access to any type of premium content in WordPress, then you should use MemberPress.

Final Thoughts on WordPress & Creator Economy

The WordPress economy and indirectly the creator economy is huge. In the State of Word for 2020, Matt Mullenweg, co-founder of WordPress shared that WooCommerce facilitated over $20 billion in sales in 2020.

Other third-party online course platforms like Teachable reported that course creators earned over $456.7 million in 2020. Thinkific is also estimating their course creators to earn around $550 million in 2021.

MemberPress is estimating that creators using MemberPress will surpass estimated $600 million in sales in 2021, and this is a conservative estimate.

The creator economy has been on the rise since I started WPBeginner in 2009, but it’s never been stronger than right now.

If you have the knowledge and passion for teaching others, then you can start a very successful online business today.

The combination of YouTube, membership platforms, and social networks for building community provide a unique opportunity for anyone who has a desire to succeed.

As a content creator myself, it’s extremely rewarding for me to see others succeed in their online journey.

I want to congratulate Blair and the MemberPress team in their role for building a robust platform that supports thousands of creators find success online.

Here’s to an amazing 2021!

P.S. If you have a WordPress product that’s empowering website owners to succeed online and want to work with us, then I would love to chat with you. Click here to learn more about WPBeginner Growth Fund.

The post MemberPress Creators Have Earned over $1 billion dollars (Milestone Update) appeared first on WPBeginner.

New Technologies of Computer

Category Image 041

There has been a lot of technologies that have brought a significant change in our daily life. Because of the invention of the computer, our life has become so much easier. So here we discuss various technologies that have been kept on improving and will keep on improving.