VB6 How to disable weekend days from Calendar control - date

I'm almost finishing my VB6 app and I'm trying to add some visual enhancements to controls.
My app allows to assign medical shifts to patients for which I use a Calendar Control. Now, I'm trying to find a way to disable Saturday and Sundays from being selected. Besides, it would be great if I could change the color of days if there are available shifts on them (that will be based on a sql query).
Does anyone know if this is feasible? I have looked at so many web pages for help but no success.
Thanks for your help
Gerardo

Absolutely not. The control is not even a standard Windows control, which means you're limited by the original implementation of it when Microsoft made it for VB6 back many years ago.
The easiest solution is to produce an error, or cause the cursor to switch to a different, nearby date.
The best solution is to make your own control, which would not be such a bad idea if you want anymore flexibility.

You could redesign your form to have a grid that shows appointment times, by staff. Just shade the squares according to availability.

Use the Weekday(date) or WeekdayName(date) function to see if the user entered a date that corresponds to a weekend day.

Related

VBA hide form from menu

I'm trying to hide a form from the menu using VBA; I've Googled this, but everything is giving me the .visible option, however I want to hide it from the groups menu located on the left side. I could just as easily manually do this, however it's very tedious and I can't be going on other user's computers to do so.
Is this possible?
I might suggest normally you should only disable menus vs. removing them all together, might suggest doing an enable/disable menu item instead..
It should be possible but how much work is it and is it worth it to you? It isn't clear what your host application is just that you're using VBA. Might suggest the host application may already allow for customization if so use what it provides.
If the app doesn't allow customizing your menu you can still do it, just how much work is it worth for you? You'll need to look at the Win32 way of doing things. If not familiar with Win32 and menus take a look and start here looking here at MSDN to start learning about menus in Windows. After this you'll find Pinvoke will be handle to give you C#/VB sample to call what is needed. The VB should be useful but you will probably need to further translate the VB to VBA for your needs. FYI when starting out a a C/C++ developer back in the day 30 years ago it was anticipated anyone getting into windows might take them a few months, there is a lot you'll need to get up to speed on. Thus is this feature really worth it?

Forecasting shows a massive gap in Visual Studio Team Services

I'm having really odd problems with my VSTS Forecasting tool - It doesn't seem to matter what I set the Forecast velocity to, it leaves a massive gap of around 20 stories before it starts doing anything. Has anyone else had an issue like this and can point me at what may be causing a problem?
I'm sorry there's not much more to go on but I can't offer much more without providing my product backlog and I can't do that.
I've tried changing the settings to only show Backlog Item level and below.
Here's a screen grab - I've had to do it in 2 parts because I actually have to scroll down to see any of the forecast lines...
Moving the items with no estimation value to the bottom of the backlog made no difference either (although I would expect a fair few more break lines before hitting that point)
The problem here is that (in most cases) I was using the 'Story Points' rather than the 'Effort' field (because that's what they are!). I fixed the issue by replicating all of my story points data into the 'Effort' field. The Story Pints field doesn't actually seem to do very much.
This article: https://www.visualstudio.com/en-us/docs/work/guidance/agile-process-workflow seems to disagree with this theory however.

Eclipse - Number of times compiled over project?

My team just finished a huge project. We're going to present it to class in a week, and want to add some interesting stats.
Is there any way to find out how many times we've compiled the code over the last X days?
Thanks
Not that I'm aware of but if you go into Project>Properties>Refactoring History you can see a detail of all the refactoring you've done. That may make for some interesting stats.
I'm not aware of such functionality but you can install a metrics plugin such as this for other code metrics. Eclipse auto-compiles code so I'm not sure how useful such as statistic is.
I don't know of any way to get the number of times you compiled. But if you want some similar (and hopefully useful) statistics, go to .metadata\.plugins\org.eclipse.core.resources.history. You will see the change history there. Each time you make a change, Eclipse keeps track of the change by creating a file here. Sort the files by date, and you can easily get some statistics to display for your presentation.

How to highlight the differences between two versions of a text in .NET web app?

I have been supporting a web application at work for our Call Center unit for about 2 years now. The app is written in ASP.NET 3.5 with SQL server 2005 database. I’ve been asked to expand the call detail section to allow agents to edit the current call note with the ability to revert back to its previous version. Now, that’s all cool but now the manager wants to be able to click on any particular note and see all edits with changes highlighted in yellow (and if something was deleted, he wants to SEE the deleted text crossed out). Actually, what I need is very similar to how Stackoverflow handles edits on their questions. I’ve been thinking about how to go about this and after doing research and Google-ing of course, I am still unsure which route to take. I am fairly new to .NET development. Any ideas on the best technique for highlighting the changes in UI? I am afraid I am going to have to store a copy of the entire note each time they make a change because the manager wants to be able to easily review notes and revert back to ANY version (not just the most recent one) before sending the monthly call report off to our VIP customers. Since this department OFTEN changes their mind on things, I want to make sure the new functionality is scalable and easy to maintain. Any ideas would be greatly appreciated. I am really just looking for someone to point me in the right direction; maybe there are some tools out there that can be useful, recommended keywords in Google lookup, etc.
This will be difficult do to.
You'll need a "text editor" control that can not only edit the text, but which can also tell you what changes were made.
You then need to store not only the final text string, but also the list of changes
You'll then need to be able to display the text plus changes, using strike-outs, and different colors for inserts vs. changes
You'll need to do this not only for the changes of a single user, but you'll need to store each users' changes in the database, and will need to be able to display all the changes, all at once.
Your manager should be really sure he needs this.
Some tools for doing the diff for you can be found at Any decent text diff/merge engine for .NET?.
This would entail storing every version like you say. This should allow you to implement it similarly to SO. I seem to recall reading or hearing Jeff mention it, but wasn't able to find it, likely in one of the SO podcasts.
Easiest would be to store the text for each revision, then when the user wants to see the diff use a diff tool to generate the highlighted text.
Here is some Javascript diff code:
http://ejohn.org/projects/javascript-diff-algorithm/
If all the computers have Word installed you may be able to use a Word control to accomplish this. TortoiseSVN has scripts in its program directory which can take two word documents and produce a document with changes highlighted. To see this create c:\aaa.doc and bbb.doc, then install TortoiseSVN and run:
wscript.exe "C:\program files\tortoisesvn\Diff-Scripts\diff-doc.js" c:\aaa.doc c:\bbb.doc //E:javascript
I think you should see http://en.wikipedia.org/wiki/Revision_control

Strange CrystalReportsViewer toolbar behaviour

I have a problem with the CrystalReportsViewer's toolbar that puzzles me. Let's say I have a report that consists of five pages.
If I click the next button, I get to page two as expected, but if I press it again, page two reloads!
I can click the last page button and get to the last page, but if I try to go to the previous page from there, I end up on page one again.
So, no matter how many pages my report has, I can only get to the first, the second and the last one!
These problems began when we migrated from Windows Server 2003 to 2008. We're running Crystal Reports 10 which perhaps have problems under 2008? Can any of 2008's new security stuff be responsible for this?
Has anyone seen this behaviour before and know how to solve it? Thanks!
Never seen that Dev tool before so it won't be in our supported platforms.
I recall something similar and it was due to the screen resolution or zoom level.
Have a look at the source code of the page to see what it is doing. Compare it to a VS .NET ASP.NET app to see what the differences are.
I haven't seen this weird behavior before, but I know from a project I worked on a few months ago that Crystal Reports isn't supported on Win2k8 / IIS7 yet. I wish I could find a link that stated that for you, but I remember running into that problem.
I had to go the route of setting up a virtual server to host Win2k3, just so I could publish some reports.
Oops, it seems this isn't considered programming related (even though there's been a certain amount of programming to show the reports and that the CrystalReportViewer is a server control), so sorry about that.
Thanks Ken for your input. I bet i doesn't help that we're running an old version of CR as well. Maybe your route with the virtual 2003 machine is the best to go.