Showing posts with label Android (operating system). Show all posts
Showing posts with label Android (operating system). Show all posts

23 May, 2018

Enable the Design and Split Buttons in Visual Studio

23-May-2018

The ActiveReports designer as it appears in Vi...
The ActiveReports designer as it appears in Visual Studio, with important areas labeled. (Photo credit: Wikipedia)
Enable the design and split buttons in Visual Studio. That was something that I needed to do about a month ago as I was tasked to create a small web application, a submodule of a bigger application. But only source view is enabled and is the default.

So how to enable it?

2 ways:

First Way:
Click on File >  New > File
Choose General on the left pane, then HTML Page at the middle pane.
At the bottom right area of the New File dialog, click on the down-pointing arrow beside Open.
Click on Open With.
Select HTML (Web Forms) Editor, then on the right side, click Set as Default.
Click on OK.

No, that may not show the Design | Split | Source buttons yet. You need to restart Visual Studio first.

Second Way:
Click on Tools > Options > Web Forms Designer
Make sure box on Enable Web Forms designer is ticked.
Start pages in Source View, Design View, Split View, you choose that.
Click on OK.

Again, that may not show the Design | Split | Source buttons yet. You need to restart Visual Studio first.

Hopefully, one of these methods would enable the design and split buttons in your Visual Studio.

Till then!

22 November, 2017

How to Speed up Windows 7, 8, 8.1, 10

Windows 7 build 7600
Windows 7 build 7600 (Photo credit: Wikipedia)
22-Nov-2017


In Windows 7, 8, 8.1, 10, slow performance is one big hurdle to tackle.

Aside from simply increasing the RAM to max, if that is possible, and switching to SSD, if that is at all possible (financially, of course), there is the usual list:


  • uninstall unneeded software
  • clean up computer clutter
  • disable services not in use
  • delay start up for some services
  • and many, many others


What I am writing about now is not these usual stuffs, but one that is normally overlooked, or not done: Windows File Indexing.

A bit on File Indexing. It is to aid searches. Google it to know more, but this is taxing Windows far beyond belief. Right after Windows install, there already is a ton of files in your C: drive. And this feature is turned on by default. So if you have several discs (desktop, in particular), or partitions, then all of these partitions have the file indexing flag turned on.

And every time you add or remove a file in any of these drives, file indexing kicks in, for what? Again, to aid file searches. Even more, to check what is inside the file, so when you do your searches, file name and file content is checked.

Let your imagination now run wild. How much system resource will that consume? Sorry, but I can't compute!

So let's get it done with.

Simply, to check on it, right-click on a drive, like C:, or D:, or whatever you have, except of course CD drive and the likes excluded, and at the bottom is Properties. Click on it.

Then, again, at the bottom part, you will see 2 checkboxes. First is 'Compress...', and next is 'Allow files on this drive to have contents indexed in addition to file properties.'

So was wrong. Not only file name and contents are indexed, but file properties is also indexed. Wham!

Well, to turn that off means all of those indexing activities will immediately cease. And all you have to do is uncheck that box, Yes, that is all. Right away. Immediately.

Sudden, instant, immediate effect. And do it for all disc drives that you have. I'm sure you will right away feel the difference.

I mean, why would Windows have that feature turned on by default, and without a hint, it is taking a lot of system resources?

Now this is the kind of 'improvement' that I would recommend to anybody and everybody, without having to fork out a single cent.

Of course, if you need to do searches, then leave it on, and forever be plagued by a slow Windows PC.

Wait, you mean there is no help? If I want to turn off File Indexing and I do searches, then I'm done for good? Actually, there is. You are not the first to ask that question. And for sure, you will not be the last.

There is a free tool, Search Everything, that you can use to help you in doing file searches, and it is customizable, too. So go ahead and turn off File Indexing to get that added speed (or conversely, remove that Windows slowness), and since Windows will not be able to help you anymore with searches, use Search Everything, a free tool from voidtools.com.

So now you have a way to make your PC a bit faster without forking out a single cent, and you also have a new tool to use for file searches.

Who says you can't have the best of both worlds?

Now you can.

Till then!

24 August, 2017

Minimize An App to System Tray

24-Aug-2017


I am writing a small WinForms program, and I thought of including minimize an app to system tray feature. Since this is the first time I will do this, I just did a search in Google. I am very sure many have done it as it already is a common feature.

Well, common for everybody else, but at this point, not me. Not yet.

Thus, I searched for ‘minimize an app to system tray’, and I did find valuable articles, many in Q&A forums, like StackOverflow.com.

I’ll go directly to the point now. What is required to make it happen?

1. Handle the form’s resize event.
2. Make a NotifyIcon click event restore the form back.

Here’s how it’s done.


Handle the Form’s Resize Event

Select the form and on its Events, declare this:

private void MyForm_Resize(object sender, EventArgs e) {
    if (FormWindowState.Minimized == this.WindowState) {
       myNotifyIcon.Visible = true;
       myNotifyIcon.ShowBalloonTip(500);
       this.Hide();
    }
    else if (FormWindowState.Normal == this.WindowState) {
       myNotifyIcon.Visible = false;
    }
}


Make a NotifyIcon Click Event Restore the Form Back

Add a NotifyIcon tool, and on its click event, declare this:

private void myNotifyIcon_Click(object sender, EventArgs e) {
    this.Show();
    this.WindowState = FormWindowState.Normal;
}


This is all that is required, really. But sometimes it doesn’t work. One small trick is needed.

Add an Icon to the NotifyIcon tool.

myNotifyIcon.Icon = SystemIcons.Application;

Also, you can add in the Text and Tip properties:

myNotifyIcon.BalloonTipText = "App is minimized to System Tray.";

myNotifyIcon.BalloonTipTitle = "My App Name";


Sometimes, you will see articles that suggest using the Form’s Visible property. But this is also known to still make the app appear or selectable (although not visible) when you do Alt + Tab. So stick to Hide() and Show() events. Still your choice, though.

Okay. I’ll stop here, cause that’s all that is really needed to minimize an app to system tray. Easy, right?

Happy coding!

16 July, 2017

Remote data not accessible: Excel 2016

English: Illustration of subroutine in Microso...
English: Illustration of subroutine in Microsoft Excel that reads the x-column, squares it, and writes the squares into the y-column. All proprietary Microsoft art work has been cropped to leave a generic spreadsheet (Photo credit: Wikipedia)
English: Use of user-defined function in Micro...
English: Use of user-defined function in Microsoft Excel. All proprietary Microsoft art work has been cropped to leave a generic spreadsheet (Photo credit: Wikipedia)
16 July 2017, 10:20 PM


Remote data not accessible:
To access this data Excel needs to start another application. Some legitimate applications on your computer could be used maliciously to spread viruses or damage your computer. Only click Yes if you trust the source of theis workbook and you want to let the workbook start the application. Start application 'SV.EXE'?  YES NO

I am working on PcVue data extraction using Excel 2016. That was the response thrown by Excel after I typed "=SV|DB!DATE" and pressed [Enter].

Of course, I clicked on YES, but then again, this is the result:

“Cannot run ‘SV.EXE’.  The program or one of its components is damaged or missing.”

Beats me!

This is another one of those DDE nightmares, where the support for a legacy system is required even when already using Windows 10 64 bit and Excel 2016.

I searched for more articles using the string "remote data not accessible" and well, I got some from Technet, and some from Microsft forums, and some scattered Q&A here and there, even in StackOverflow. And I think the solution was derived from one of the Microsoft forums Q&A.

The advice is to make Excel run as Admin. So I did that. I modified the shortcut of Excel 2016 to make it execute, 'Run as administrator'.

And yes, it worked! I was able to extract data from PcVue iNexus 10/11.2 into Excel using DDE!

Then the C# program wouldn't still work, though.

But getting the idea from what I did to Excel, I looked for the compiled program, set it also to execute and 'Run as administrator', well, what do you know?

It also worked!

So while I cannot make use of DDE through Visual Studio's Ctrl+F5. I just do a build, set the compiled exe file's property to 'Run ad administrator', and voila! It would be working like a charm!

I hope this helps somebody working on the same legacy system, DDE, and still make it work.

Till then!



08 July, 2017

How To Remove Cleanserp.net Search Engine Hijacker From Chrome

Logo used from the start of the Chrome project...
Logo used from the start of the Chrome project until March 2011 (Photo credit: Wikipedia)
July 8, 2017


Recently I was plagued by cleanserp.net search engine taking over Google. I do a search and out comes cleanserp.net taking over Google.com, and that is even when you type Google.com in the web address!

I let this happen for a couple of days, until I got fed up. I was thinking that it was a bit difficult to remove this search engine browser hijacker, but my curiosity got the better of me.

So I did a search, and guess what? It is easy enough, easier than I expected, even if it were to be done manually.

I'm not telling anything anymore about what cleanserp.net is, of how it got into your computer, and what it does, and more.

So here are the steps:

1. Check the browser shortcut by doing right-click on it, then Properties. If after the .exe it shows "http://cleanserp.net", remove that. Then click on OK.

2. Change your startup page, it must not be "http://cleanserp.net".

3. Uninstall any program that may be related to anything rogue or questionable. Since you know your computer better, you know what you are installing, and anything that doesn't look like a legit program, you uninstall these.

Specific to Google Chrome, if changing the search engine throws out “This setting is enforced by your administrator”, try the following (this is what fixed my problem):

1. Open %WINDIR%\System32\GroupPolicy folder (just copy that path and paste into the address bar of Windows Explorer). Delete the contents of that folder.

2. Next, open %WINDIR%\System32\GroupPolicyUsers and delete all of its contents.

3. Finally, restart your computer.

There is a possibility that a few more minutes will be added than before to your computer's restart process, but that is just the first time reboot after doing the change. it would return to normal afterwards.

Some more info can be got here: How to Remove Cleanserp.net [Chrome, Firefox, IE, Edge]

Hope this helps.

Thank you, and till then!