16,002,061 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Tino Fourie (Top 79 by date)
Tino Fourie
30-Jun-20 19:09pm
View
Old post I know, but you got me back on track. My code was working great and today I made quite a few changes all over. After that I got that damn messages and I could not figure out what the hell I did. I searched StackExchange for many hours and there were many a solution which included another 5 days coding just to fix it. So simple!! Not sure what they are smoking there but it aint good. +5 to you Richard!! +5 to OP for asking the question.
Tino Fourie
7-Feb-19 5:19am
View
My apologies for the late reply - I was waiting 2 days for replies myself.
I was advised to look into Analytic Functions - LEAD and LAG, however it was a little over my head (and still is) the basic sample code I tried did not work at all and MySQL Workbench does not provide clear debug messages.
Thank you for the , I will certainly look into that.
Tino Fourie
7-Feb-19 5:13am
View
Hi Maciej, thanks for your comment.
The appID is the PK however, it will be pointless to even consider the appID because I can have sequential appID's but non-sequential time periods.
appID = INT(11) AUTO INCREMENT
appStartTime = DateTime (2019-01-01 10:00:00)
appEndTime = DateTime (2019-01-01 10:15:00)
I am indeed looking for times where a resources is not booked, however the user will not be able to see if a resource is booked or not because the type of booking will determine what the time period will be between the appStartTime and appEndTime.
Tino Fourie
2-Feb-19 11:24am
View
Hi WGC, my apologies for the late reply.
I totally agree with you on your suggestion of implementing a timestamp field. In my approach I have such a field specifically used for the BackGroundWorker when retrieving messages. I have set the BackGroundWorker to fetch messages every 5 sec, which means that my MySQL Stores Procedure will only look for messages that is 5000ms younger than NOW().
Thanks for your reply.
Tino Fourie
12-Nov-18 13:01pm
View
Hi Richard MacCutchan, thanks you for your input.
Alas, I initially went with 2 tables: one for SentMsgs and the other for RecvMsgs. I reconsidered because it would make no sense to be honest because both tables would be a 100% duplicate of the other because they store the same data, except for the SenderId and the RecipientId.
You could argue that 10,000 msgs will take longer to process (relatively speaking ofc) than processing say 1,000 messages. That is a strong argument in an environment where you have no control over the age of messages. I am however considering to remove messages older than 21 days (3 weeks). Not sure how well received it will be.... but then again, use you email instead.
Tino Fourie
12-Nov-18 12:55pm
View
Hi MadMyche, thank you for your input.
I use a BackgroundWorker to do the looping. I use Win Forms application, but don't want to bring HTML into it at the moment since WebBrowser is native to IE7 and you need to do a bit of work for force it to treat the HTML page for an earlier version of IE, e.g.: Edge, IE11, IE10, etc.
I just finished a section where I had to use StringBuilder to assemble an HTML page and then send it off to the WebBrowser control (I don't want to have the HTML page outside the application). You can probably imagine the effort it takes to build on the HTML inside of a Win Forms application.
Tino Fourie
12-Nov-18 10:23am
View
I gave you a ^5, a pint will be just fine :laugh
Tino Fourie
12-Nov-18 10:21am
View
Hi 0x01AA and thank you for replying.
I did look into that originally when I started out. The problem is, I have no way of telling which one of the duplicate entries will be the most correct "unless" I run validation within my application.
Keep in mind, some entries will have a patID, other don't and then you have incomplete patId's which could either be less than 13 digits OR more than 13 digits.
This is just one example, with a few variations, that I am facing.
Currently, I am focusing on only a few data fields to determine if a duplication exist. The rest I leave up to the user to either update incomplete data OR in the very least, delete the worst of the duplicate entries and correctly update whatever remains. Somewhere along the line I hope to have a few "perfectionist" users out there who has an uncontrollable and impulsive obsession to correct data :P
Tino Fourie
11-Nov-18 5:55am
View
Again, that I agree to and sadly it is a combination of poor data validation and lack of user responsibility.
Now that is where my application comes in. This project is self-funded and being an entrepreneur I saw an opportunity in the market.
How do I know users will enter patient demographics correctly when using my application - well they don't have to enter (type) anything because I use data injection via WinAPI into the front-end of the 3rd party application. I refuse to write directly to a 3rd party database, I ain't stupid :laugh
Tino Fourie
11-Nov-18 5:37am
View
Hi Griff and thanks for your reply.
For your starter, I completely agree with you. That can certainly be addressed to prevent inflating a DB.
However, for the rest I don't really have the luxury of using the appropriate data types as you pointed out in par. 2. I collect data from various 3rd party DB's, therefore I don't have to validate for correctness. Data correctness validation is done through my application when users are required to update the information on the DB.
When I do validation from 3rd party DB, up to 30% of the entries fail initial validation. I know you were not aware of this, and therefore I can assure you that I did not throw any context away nor decided how a user will input data.
As it stands, it is poor data validation from 3rd party vendors and I need to fix that.
Why I use strings, instead of the more appropriate data type, is that when data is imported into my DB, I have no idea how a date was entered, which data format (dd/MM/yy, dd/MM/yyyy) were used - you could say that I am completely blind when importing data from 3rd party DB's.
PS: I don't do the pub scene and also not a student like in attending classes - but I like to learn even at 50. So I guess you could call me a student ;)
Tino Fourie
11-Nov-18 5:22am
View
Hi Wendelius, Thank you for the prompt reply. Your comment is a little over my head, only because I lack the required knowledge on Triggers and Declarative Constraints as I have not needed to use them....until now it seems. However, I will certainly read up on the topics.
With regards to the relational model, I can not say for certain that it is 100% optimized, however my argument was to separate information into separate tables, rather than having one enormous table. This would allow me the option of extracting specific information such as medical insurance information.
Tino Fourie
14-Jan-17 6:52am
View
Richard, thanks for the reply. I left out the i += 1 statement in the code block when I pasted the code across. I have editted the post to include the For loop stepping.
Tino Fourie
18-Aug-16 17:07pm
View
MCSI, thank you again for your reply.
Unfortunately I don't have any info on the Hospital system, not even a URL. I am working purely from what was described to me by the doctor and the print outs they have made in the past. I also made mention in my original post that I have absolutely no technical information regarding the Hospital system.
I am going to keep digging into WCF for now and see if it is a possible way to go and if so, how it can be used to achieve the desired result.
Once again, thank you for your input this far. It is appreciated!
Regards,
T
Tino Fourie
18-Aug-16 12:21pm
View
MCSI, thank you again for your reply. I believe there is some misunderstanding between what my application does and the sought after interaction between my application and that of the hospital.
Summary:
Hospital: - Doctor access patient information via Web Browser after providing a Username and a Password. The doctor then needs to print the information and then only can they enter some of the data into their own practice software.
My Application: - It is a WinForms app and stores specific patient information (certain information is the same as provided by the Hospital) it gathers from various sources - the Hospital system is a resource I want to have access to. Backend is a MySQL DB.
The requirement, the WinForms application should be able to send Username and Password to the web host, after successful login it should send a Patient Number to the web host and receive Patient Information from the web host. The entire process should be a background process without any user interaction. The Username and Password can be preconfigured under User Settings for example. The Patient Number is the only information that the user will need to provide.
It seems that WCF can send and receive data to and from a WinForms app to a Web Host - I am still not fully up to date on the WCF library at this time.
Tino Fourie
18-Aug-16 9:54am
View
MCSIDevelopers, thank you very much for your reply and information contained therein. I just finished 2 months of bone crunching API32 and SendKeys integration into my application.... I am happy to know that one is able to extract data from html pages.... I would hope there are API32 possibilities as well. I think I've read somewhere that it is possible.
However, to keep things as simple as possible I would rather strive to settle on a working relation with the hospital group rather than stripping info off of html pages. Besides, the doctors must log in to be able to access particular patient information and I want to automate that process, simply because I believe it can be done.
As for accessing the 3rd party DB directly through one of their (or my own) Stored Procedure (SP) is something that neither of the entities would want to entertain, at least not at this stage. And since their SP's can change at any time without prior notification, I want to establish if there is a method of automate the LogIn process by passing log in credentials to the host, if successful send the patient code and then receive the relevant data into my app.
What are your thoughts on WCF (Windows Communication Foundation) ? I just started reading up on it and looking at code to see what can be done code wise with the WCF lib.
Regards,
T
Tino Fourie
23-Jun-16 17:51pm
View
After a more thorough look at the data, it is clear that I can not use the "Brute Force" method because the only unique identifier in the data (patIDNo) is not always completed by the user. And as mentioned before the software used to capture the data does not validate the data for completeness. For example, the patIDNo will either be blank or consist of the Date of Birth. Out of 42000 records read, 15800 records had a blank patIDNo, 14200 records had an incomplete patIDNo and 1018 records exceeded the maximum allowed digits for an ID No.
The first reply I got seemed to have been the most obvious choice IF data validation were done properly by the software used to capture the data. CHill, in a way, confirmed this by his Solution.
To both, thank you for your input and advice.
Tino Fourie
23-Jun-16 13:03pm
View
Oh no I totally agree with your description of a straight forward INSERT with column constraints. Let the DB decide, could be a much faster and more concrete way of doing it... instead of trying to reinvent the validation wheel. :)
Tino Fourie
23-Jun-16 11:49am
View
CHill, thank you for your reply.
I completely agree with your comment on users. Sadly the software they are using to initially capture the patient information does not enforce data validation... will hold the software vendor responsible for poor design :P
1. It takes me roughly about 2 hours to write 42000 records (consisting of 47 fields) to a web DB over a 2mb line to make sure that even the slowest of internet connections will achieve the desired results. The 2 hours it takes to write 42000 records is against an already populated DB of 42000 records (yes, I have written to an empty DB, then write the same 42000 records to the now populated DB).
I am handling duplicates in my WinForms app instead of a DB procedure or trigger, where I use currID (current ID) and prevID (previous ID) getting the latest DB ID with the LAST_INSERT_ID() (see provided stored procedure code).
2. Already using LAST_INSERT_ID() (see provided stored procedure code). I was wondering if one could use an IF...ELSE statement to check for a new DB ID with LAST_INSERT_ID(). If a new AUTO_INCREMENT ID was generated then INSERT the rest of the data in their respective Tables.
3. Would you still advise to handle the logic inside the WinForms app instead of having a long winded Stored Procedure ?
e.g:
IF currID <> prevID then
'New patient added, store rest of patient information
'Set prevID to latest AUTO_INCREMENT ID
END IF
Next Patient
Would you also go with the "Brute Force" method as suggested earlier ?
Tino Fourie
23-Jun-16 10:19am
View
Thank you for your reply and explanation. With regards to the inconsistencies of the information, example:
I could have a records like: AAA BBB CCC DDD EEE,
then I could have information on the same patient like: AAA BB1 CCC DD2 EEE.
AAA - being the ID No (SSN / PPSN) number of the individual.
This inconsistency is because the information comes from different sources and because people don't care much about the correctness of information I could end up with a patient with no Initials but a corresponding ID No.
If I place a NN constraint on the Initials column, and because the software used to capture patient information does not check for "blank" on the Initials field, I could potentially skip this patient where in comparison I could add the information and have the user update the information.
Tino Fourie
23-Jun-16 9:43am
View
I understand column constraints and their uses but unfortunately I can't use that because I have to handle inconsistencies in the information about a patient.
How does brute force improve performance ?
How do you combine all the other Insert's into a single Stored Procedure and validate there is not a duplicate entry ?
Tino Fourie
9-May-16 6:01am
View
Andy, thank you very much for your contribution. I have looked at OG's solution and would rather venture down that avenue for now. It seems easier to read and with the JOIN option it makes readability much easier as well.
I am fortunate to redesign the DB as it is a brand new DB and still growing as new information is added or Application requirements are added / removed / changed.
Thanks again!!
Tino Fourie
9-May-16 5:55am
View
OG, as always you read my intentions, my intention was indeed to store "Items" as a list from where I could manage the content of the column in my application. My experience with SQL is limited and I know that your advice is ALWAYS sound as I have found with a previous question and you pointed towards Stored Procedures.
In the application, the User can only add to the list as it is part of a Subscription section - unsubscribing has no benefit and therefore there is no option to unsubscribe.
That all said, I will rather look into your advice and design a separate table for the Items and learn to use the JOIN function with the SELECT statement.
Thanks again for the "push" into the correct direction. ;)
Tino Fourie
16-Feb-16 10:12am
View
Griff, thanks mate. Makes perfect sense. It is unattended, you can provide feedback to the user if something went wrong and as the system owner you know of nothing!! Next to having a condom in your pocket, that takes the prize!!
Tino Fourie
16-Feb-16 8:01am
View
The application will be used by a broad audience and the validity of the data entered could only be validated for correctness weeks, months or even a year later; it will all depend on how often a specific record will retrieved and manually validated by a user. (The Employee / Manager scenario was just an example)
Will the Transaction Rollback option be available for a record older than say 3 months ? Would probably all depend on the Transaction Log being kept.
Tino Fourie
16-Feb-16 7:44am
View
Thanks Griff!! Reading what I wrote and combining with your reply suddenly brought forth a concern regarding the integrity of the data when written in a compact fashion, especially considering that the information is written to a Web DB.
I honestly don't think it is worth the effort to try and be fancy (and lazy by trying to cut back on steps) at the risk of data integrity.
Back to your reply, I think it is best to put in the effort of writing the 3 statements and make sure that data accuracy is not reduced.
Thank you again!!
Regards,
T
Tino Fourie
11-Feb-16 3:40am
View
Ralf, thanks for your reply.
I found out later that I was going about it all the wrong way.... I just had too many hours invested into my work yesterday that I did not see the obvious.
When declaring a User Control Globally, there is no need to declare it again in a Function / Procedure, you can ".clear" it from any parent control as long as you do not "destroy" it in the process.
I am with you on the Getter and Setters.
Thanks for your reply.
(As for not "Improving" my question, it was getting to a point where I had no idea of what was happening. Losing functionality as I did, things just came apart at a rapid pace and I had no idea of why it was happening.)
Tino Fourie
4-Feb-16 15:10pm
View
In most part I completely agree with you, however I still find it a useful tool when it comes to printing. Sadly, as you already mentioned, it is severely handicapped in functionality and the RTF code is almost not from this world, thus not easily learned or implemented.
Thanks for your reply and alternative options provided.
Regards,
T
Edit: Here is the code I use to format the text - hope it sheds some light on what I am trying to do ;)
'Description Lines
'Patient Information and Contact Information Columns
Col1 = "Patient ID :" ' Patient Information
Col2 = "Mobile Number :" ' Patient Contact Information
'Insert Line
Dim DescriptionLine As String = String.Format("{0, -70} {1, -24}", Col1, Col2)
rtfMain.AppendText(DescriptionLine)
'We now have to move the cursor back to the first Col in order for us to paste the first Barcode. To do this
'we need to (1) Store the current cursor postion and (2) subtract 70 + 24 from the current position to paste
'Col1 Barcode, (3) move the cursor to the stored cursor postion to paste Col2 Barcode
CursorPosition = rtfMain.SelectionStart
'Move cursor back to Col1 position + 4 chars from ":"
rtfMain.SelectionStart = CursorPosition - 70 + 4
'Paste Barcode for Col1
If Not frmMain.ucPatientInformation.txtPatID.Text = "" Then
GenerateBarcode(frmMain.ucPatientInformation.txtPatID.Text)
Clipboard.Clear()
Clipboard.SetImage(img)
'We need to put the RichTextBox in Overwrite mode before pasting the Barcode
'My.Computer.Keyboard.SendKeys("{INSERT}", True)
SendKeys.Send("{INS}")
SendKeys.Flush()
'Paste the Barcode
rtfMain.Paste()
'Enable Insert mode again
'My.Computer.Keyboard.SendKeys("{INSERT}", True)
SendKeys.Send("{INS}")
SendKeys.Flush()
Tino Fourie
4-Feb-16 14:27pm
View
Hi SA. You are perfectly correct in your reply as most of the documentation I have studied advised against that and MS also warned about Timing issues with both Old and New methods implemented in SendKeys - I just could not find other way of achieving my goal.
I am trying to format text in two columns using a RTB for printing purposes (a DGV will not work unfortunately). I have Line Descriptions of a fixed length and then Barcodes of a variable length. First, I AppendText the Line Descriptions after which I move the caret (cursor) back and forth to Paste the Barcode from clipboard.
Needless to say, as you probably know, Insert mode is default which means every time I paste the Column 1 Barcode the Line Description of Column 2 will move forward depending on the width of the Barcode image.
Let me know if you need more info on what I am trying to achieve.
Regards,
T
Tino Fourie
4-Nov-14 6:53am
View
Once again, thank you for your post.
If I am not mistaken, PNG is the only format that is capable of giving a transparent channel. On this topic, in your experience would it be possible to convert a JPG to a PNG format and then apply the A-channel ?
Tino Fourie
28-Sep-14 18:59pm
View
Prior to a "rewrite", download Visual Studio Express 2005 / 2008 and try an Import of your VB6 project. Chances are great that it will NOT be able to import is because VB6 uses .OCX controls which is unknown to .Net. I just tried it myself on a very small VB6 project and VS2008 failed to import it.
EDIT:
I don't think you should have too much trouble rewriting the above code into VB.Net. I am not familiar with ADO (ODBC I am more familiar with) but from what I have seen here on CP there is not much difference from the code you used in VB6. The only code that is not familiar to me is the "Cash." and "Events." code in your example. Take some time and look at the "WithEvents" code in VB.Net.
Tino Fourie
28-Sep-14 18:55pm
View
Ravi, from your brief explanation nothing makes much sense. Try not to tell us what you want in a single sentence and also make sure you use the correct descriptive names of controls. LinkButton - what is that exactly ?
Tino Fourie
28-Sep-14 18:50pm
View
Great read !! +5 to Matt Gemmell. He summed it up beautifully in 8 min.
Tino Fourie
26-Sep-14 10:23am
View
CBool
Tino Fourie
26-Sep-14 10:15am
View
Deleted
You are testing for a Boolean value "True/False" and you getting an error. It means that the cell you are referencing is NOT of a Boolean Type. You are getting confused with the cell indexes.
Add a screenshot of your DataGridView with all Columns visible to your original post.
Please translate all error messages to english before posting. Nie almal van ons kan Hollands, Vlaams or Afrikaans lees, skryf of verstaan nie.
Tino Fourie
25-Sep-14 8:49am
View
Well firstly, your approach to use MODI on an image of a 7 segment display will never work since the 7 segment display will never produce a character than can be identified during OCR.
Secondly, MODI is a discontinued product from Microsoft with its last release with MS Office 2010.
You will need to look into Emgu, an OpenCV wrapper. More information at this
http://www.emgu.com/wiki/index.php/Tutorial
:
If you do it right, you should be able to read what is displayed on the 7-segment display during live video feed. No need to capture a frame of the video feed and then create an image from that.
Just make sure that your frame rate is fast enough to produce "full motion" video feed - minimum of around 12 - 14 frames per second should do.
Tino Fourie
25-Sep-14 1:41am
View
Example for NOT: NOT going to happen.
Who in his right mind is going to copy & paste MSDN examples because you are too lazy to search for it yourself ? Provide the code you are having problems with and we will assist you.
Tino Fourie
24-Sep-14 15:06pm
View
Learn to store the rowID of your database row in your datagridview. This way you can directly access the row in your database when Updating or Deleting information in your DB without interrogating your database again.
For using DataSource, not sure how to because I don't use it in my applications.
Tino Fourie
24-Sep-14 14:57pm
View
Are your forms continuously resizing or are their size different in the IDE compared to when you run your application ? Do you perhaps programmatically set the form sizes at runtime ? Also look at the WindowState of your form.
Tino Fourie
23-Sep-14 9:01am
View
There is nothing wrong with your code, I tested it myself. However, I think you might have forgotten that as in the case with Rows, Cells are also 0 based. Make sure that your DataGridView has at least 5 columns and that your TickBox column is the last column in the DataGridView. I believe you are referencing the wrong column for your "True / False" check you do on the Cell.
Here is my version of the code which I know works perfectly:
Private Sub btnCopyRows_Click(sender As Object, e As EventArgs) Handles btnCopyRows.Click
For i As Integer = 0 To dgv1.Rows.Count - 1
If dgv1.Rows(i).Cells(3).Value = True Then
dgv2.Rows.Add(dgv1.Rows(i).Cells(0).Value, _
dgv1.Rows(i).Cells(1).Value, _
dgv1.Rows(i).Cells(2).Value)
End If
Next
End Sub
Tino Fourie
23-Sep-14 2:38am
View
Nothing happens automatically, you have to provide the logic for the control to executed something based on some condition. Adding rows is one of the most basic functions of a datagridview.
Post the code you are having trouble with and we can then try and assist from there. Posting another link you used does not bring us any closer to the problem you are facing.
Tino Fourie
23-Sep-14 2:34am
View
Forgive my friend Sergey, he lacks a lot of diplomacy however it does not mean that I don't agree with what he wrote. PLEASE do not post EXE files as it puts us at risk since we do not know what your EXE's contain.
Post the code you use to "Wait" for a connection and the code you use to "Make" a connection. Alternatively you may want to post your source code.
In the mean time, have you tried using other ports ? Use Google to find a list of all Non-Reserved TCP ports and try some of them.
Is your Firewall allowing connections to the port you have selected ?
Are you using TCP or UDP connections - TCP is slower than UDP.
Tino Fourie
14-Sep-14 21:51pm
View
Is it really a solution?
SA, I am truly sorry if my code is too complex for you to understand. Yes, I am guilty for not "copy & paste" the MSDN code into my code in order for you to follow what is actually happening. Before you post nonsense like this, why don't you try the code yourself THEN ONLY reply with your arrogant attitude. In fact I am still waiting for your code snippet from Solution 1 to be posted since you are so adamant that only your solution is the true solution.
Mind you, it is 4am here where I am, at this moment in time I do not have the energy to deal with your attitude. If you find anything wrong in my code then post the mistakes else just move along.
Tino Fourie
14-Sep-14 20:51pm
View
FYI: It was not how I added the nodes but actually how I read through the Nodes.
This might help you:
http://msdn.microsoft.com/en-us/library/wwc698z7(v=vs.100).aspx
[
^
]
SA, if you don't mind, could you provide me the code to do it the way you suggested please. I would like to have a look at both solutions... mine I know works perfect. I would like to broaden my knowledge if there is something extra to learn from it.
Tino Fourie
14-Sep-14 19:39pm
View
Hey SA. Thanks for the reply. I looked into the System.Windows.Forms.TreeNode.Nodes as well as the MSDN link. However, VS2010 gives me this "Error 1 Type 'System.Windows.Forms.TreeNode.Nodes' is not defined."
The link you provided uses pre-selected nodes to move from one TreeView to another TreeView.
I have stepped into my code and from what I can gather is that my routine for some reason only reads the Root Nodes although TreeView.Nodes is supposed to return "all" the Nodes in the TreeView control. Why would that be? Is it perhaps the method I use to iterate through the TreeView.Nodes ?
Furthermore, I have also checked to see if it ever reads through the "Tier 2" nodes and from what I can see, it does not do that. Now the question still remains, am I iterating through the Nodes incorrectly or am I still adding the Nodes incorrectly ?
Tino Fourie
9-Sep-14 13:57pm
View
Dave, thanks again for another suggestion. I am aware of dongles and also the security is provides any software developer. The only thing I have against dongles is the associated price tag. Security aint cheap I know (and for good reason I should add) but sometimes it just kills the project because of the "cost to client" aspect. On the other hand, I will definitely look into Deskey. It is not a name that rings a bell. I spent a few hours researching 3rd party products an found that there are so many out there. Thanks again for the info mate.
Tino Fourie
9-Sep-14 13:56pm
View
Deleted
Dave, thanks again for another suggestion. I am aware of dongles and also the security is provides any software developer. The only thing I have against dongles is the associated price tag. Security aint cheap I know (and for good reason I should add) but sometimes it just kills the project because of the "cost to client" aspect. On the other hand, I will definitely look into Deskey. It is not a name that rings a bell. I spent a few hours researching 3rd party products an found that there are so many out there. Thanks again for the info mate.
Tino Fourie
7-Sep-14 15:27pm
View
Dave, Thank you for your reply. I did originally looked into hardware locking and in the end decided against it. The reason for moving away from hardware locking was the fact that my licensing model is based on a site license, which covers all computer systems for a business location. Another reason was to prevent upsetting a user / owner too much with being too critical with piracy prevention. Another reason is that Windows 8 makes it more complicated to gather hardware information and since MAC addresses can be changed by hand, just spoofed it all for me.
I came up with a possible less inconvenient way by using a Pin Code. Randomly generated code for each installation, this Pin Code can never change. It is not stored anywhere on any client computer but instead gets printed on a certificate once. You can not reprint the document once it has been printed. I use the same philosophy as Microsoft, if you loose it you buy a new one. The only place that the Pin Code is stored in on a Web DB which I maintain and to which my application connects every time it is fired up to validate the registration information.
The only drawback I see in this method is that the client needs to be connected to the internet when using my application. BUT also noteworthy to mention is that 99% of my target market will / have to be connected to the internet in any case. So I am not really taxing the client by forcing a permanent internet connection on them.
It is not a full proof system and it will probably get hacked by an experienced hacker fairly easily, but at least I keep the school kiddies from hacking my application.
Thanks again for your reply. It is something I did investigate from the beginning but decided against it in the end.
Tino Fourie
13-Aug-14 1:18am
View
Posted 3 days ago
somethinginnovative279
Edited 3 days ago v2
Well Solution 4 was posted 3 days before and since it appeared on the 2nd page of the Quick Answers list I did not bother to look at the date when the OP posted the question.
I think it is only fair to say that this reply of yours should apply to Solution 4 AND since the Quick Answers list does not show the date when it was originally posted I assume that it was a recent question.
As much I have ignored the date of the original post, you did not bother to check why it happened. And if you were one of the down voters, your reason for down voting is really poor and without substance.
Tino Fourie
11-Aug-14 15:59pm
View
Why don't you use DropBox instead of Linux ?
Do you see how irrelevant and stupid it is to suggest what I have just did ? My reply is truly based on two of your post where you suggested using DropBox as a replacement for a Database system like MySQL.
My apologies that I can not contribute more than this because I do not develop on Linux, although I would love having my VS apps run as an x-architecture application instead of being limited to MS OS's only. Python is the next language to learn as it is x-architecture.
Tino Fourie
11-Aug-14 15:22pm
View
You get Propriety (SAP and Oracle) and Generic (MySQL, Interbase and MS SQL) database management servers. Propriety DB systems can only be used by their own development environment and does not have connectors to be used by other languages.
If I am not mistaken, Oracle is starting to open their doors by distributing connectors that can be used by other languages.
Android is Linux based therefore it will make perfect sense to at least consider using MySQL for your database. Most ISP's running Linux servers will have MySQL installed.
Tino Fourie
11-Aug-14 15:14pm
View
Dropbox is a file hosting / sharing solution and was never meant to be used as a data presentation platform. If you are spending the time to write software, then the least you can do is to respect your backend and by that I do not mean your bottom.
A chain is as strong as its weakest link, your database is one such link. Why bother writing a piece of software to write to a text file hosted on dropbox.
Flat files were used in the days when Wang, Unisys, IBM Persetel, ICL, CDC Cyber, etc. were big names in the mainframe computing industry. Cobol (Reporting) and Fortran (Scientific) were the most commonly used development environments known at the time, not forgetting Natural Adabas and Basic. None of these had a decent Database Management System like we have today, namely SQL to name but one. ISAM and VSAM file structures were used back then which really boils down to some degree of a Flat File structure.
Use MySQL for your backend storage. It is available for both Microsoft and Linux and any ISP running Linux Servers will have it by default with all Linux distro's.
If you want people to take your seriously, you need to get off your bloody DropBox backend suggestion. Posting silly solutions (this is the 2nd DropBox post) you post and getting down voted every time means you move backwards with your over all scoring which coincides with you advising members to use dropbox, which is moving back in time (more like to the 70's and 80's).
PLEASE think before you post and remember DropBox is NOT a recognized Database Management System.
Tino Fourie
11-Aug-14 15:04pm
View
Dropbox is a file hosting / sharing solution and was never meant to be used as a data presentation platform. If you are spending the time to write software, then the least you can do is to respect your backend and by that I do not mean your bottom.
A chain is as strong as its weakest link, your database is one such link. Why bother writing a piece of software to write to a text file hosted on dropbox.
Flat files were used in the days when Wang, Unisys, IBM Persetel, ICL, CDC Cyber, etc. were big names in the mainframe computing industry. Cobol (Reporting) and Fortran (Scientific) were the most commonly used development environments known at the time, not forgetting Natural Adabas and Basic. None of these had a decent Database Management System like we have today, namely SQL to name but one. ISAM and VSAM file structures were used back then which really boils down to some degree of a Flat File structure.
Use MySQL for your backend storage. It is available for both Microsoft and Linux and any ISP running Linux Servers will have it by default with all Linux distro's.
Tino Fourie
21-Jul-14 11:45am
View
Sorry for the late reply, please see Sol. #1 last posted comment from me.
I have the choice of the quadrant yes. Depending on the position on the Region Of Interest (closest to Top, Left, Right, Bottom) I will display it on the opposite side of the borders else it will always be in the shape of a forward slash "/".
So fortunately I decide the length of the slanted line, everytime. In fact it will all be constant values for all three line.
Tino Fourie
21-Jul-14 11:40am
View
Sa, thanks for the update and my humble apologies for the late reply. I just got bogged down with work and did not have much time to invest into playing around with your suggestions.
As soon as I get a chance I will try it out and ofc if it work I will gladly accept your solution as the working one ;)
Tino Fourie
17-Jul-14 6:11am
View
SA, most of our conversation was really about the usability of a Picturebox compared to other controls with similar capabilities.
I have given you a +5 for the guidance and opening my mind to other possibilities and not be constraint to what MS let us to believe about controls. They do not necessarily allow us to open our minds to other possibilities.
The research I have done so far has revealed more than what I have gathered from your past posts. For example, having a line drawn at a certain angle I need to look into Radiants (whatever it is called).
Although you have given me much to think about, there are still things I am not entirely sure about. I know how to draw a circle and plot a line, the problem I have (because I don't understand it yet) is how to intersect the line with the circle at a certain point on the circle. So at this stage I still have a lot of self study to do as I have not yet found all the information that will help me with what I need to achieve.
Tino Fourie
16-Jul-14 13:25pm
View
Alright!! You have me almost convinced ;)
You make a strong argument but what about aspect ration of an image when displayed in either a Picturebox, Panel or Form... without resizing the control itself.
If I remember correctly, Picturebox maintains aspect ration depending on how the Picturebox should display the image.
I am actually going out on a limb here to be honest. I am really eager to hear your reply because I have reason to convert from a Picturebox to say a Panel because of another function I want to implement with Bitblt and the function can only be used on the parent form.
Nonetheless, I really look forward to the education when it comes to graphics / images and the link you've provided is a valuable resources indeed. Thanks again SA, it is greatly appreciated.
Tino Fourie
15-Jul-14 18:51pm
View
SA, thank you for your reply and your efforts of posting the links, much appreciated. In my scenario I have to use a picturebox because the image I load (no animation involved here) needs to be zoomed and panned. For this I use a Panel control and place a picbox inside the panel with its size greater than that of the parent Panel control. This will allow me to pan the image inside the panel control.
Also I need to "zoom" the image up to 200x its original size. All this is working perfectly and when I add a marker (a triangle) it works really great. The problem I have it to keep the triangle at the same location when I start to zoom in or out (this is something I will worry about later)
However, I will look into your links and mine whatever I can from it.
Thanks again for your efforts and reply.
Tino Fourie
15-Jul-14 15:03pm
View
Thanks for the info, will definitely help me to plan this better.
Tino Fourie
15-Jul-14 13:09pm
View
Before you code anything it is best to have your keyboard replaced since it is only capable of typing in UPPERCASE. Also having your keyboard replaced with one that is capable of producing "lowercase" and "UPPERCASE" characters you will improve your chances of getting help here.
Most of us here rely on contributions from members here and most of us asking questions are also quite keen to help out where we can. However, I will ignore any post that is SCREAMING at me or when someone states "I don't care" because that points to one thing and that is you expect someone to give you the code that will make your problem go away without making any effort on your side to try and understand the code to avoid bothering us with the same question days later.
Be considered and respectful, we do not get paid to give you your answers unless you start paying. If you are paying I guess you can address me in any form you like as long as you pay upfront.
Tino Fourie
13-Jul-14 9:32am
View
Thanks for the info mate.
Edit:
It is possible that you have closed the wrong topic. The one that was closed had more information which could have helped others with similar problems. Where as this post has no information. Maybe consider closing this topic instead.
Tino Fourie
13-Jul-14 9:26am
View
Thank you for the info, I learned something today.
Tino Fourie
13-Jul-14 9:20am
View
Darren, could you marked any of the solutions to stop your question from coming up as Unanswered.
Thanks mate and happy coding.
Tino Fourie
13-Jul-14 9:11am
View
The SMTP (used for sending out emails to your ISP) protocol has three distinct ports used by ISP's to listen for incoming message from clients. These ports are 25, 465 and 587. It is also important to understand that some ISP's you will need to specify to use SSL or that you need to send your Username and Password of your mailbox to verify that you are a client before the ISP will accept your email message. This is called SMTP Authentication.
Not all ISP's require you to connect with SSL but they do require you to authenticate. SSL authentication happens on port 465 and 587 while standard authentication can be done on port 25.
Tino Fourie
13-Jul-14 9:04am
View
With very limited knowledge on what your application does and where you get your data from, it makes it extremely difficult to help or guide you.
Where do you store your information ? Do you hardcode it into your application or do you get it from an external source like a database, .DAT file, XML file, etc.
Do you understand what needs to be done to a DataGridView to update the information ?
Best advice I can give you at this time is to consider using a database backend to store all your information. You can then read the data from your databased and store it in a DataTable on the local machine. The DataTable is an indexed container holding whatever data you have selected from the database.
Once you have read the data into the DataTable you can now populate the AutoCompleteCustomSolution property of the textbox, set the AutoCompleteMode property of the same textbox to whatever you want it to do, eg: Suggest, Append, SuggestAppend, etc., then the last property you need to set is AutoCompleteSource - using the Custom Source setting will give you what you want.
Tino Fourie
13-Jul-14 8:37am
View
Definition of MyBase:
The MyBase keyword behaves like an object variable referring to the base class of the current instance of a class. MyBase is commonly used to access base class members that are overridden or shadowed in a derived class. In particular, MyBase.New is used to explicitly call a base class constructor from a derived class constructor.
I think your friend was correct to propose
MyBase
to Override the properties of the control (Panel) you inherit from and based on what you wanted to achieve.
http://msdn.microsoft.com/en-us/library/dzfhkk01(v=vs.90).aspx
[
^
]
The MSDN link gives a little bit about the definition and use of MyBase but I am sure you can research from there to broaden your understaning. I am not knowledgable on the subject but I have seen it being used in code snippets in the past.
Tino Fourie
13-Jul-14 8:19am
View
No worries mate, as long as you made some progress that what's it about. OG has solid general to advance knowledge on the various topics, so it is always good to consider his advice and go on from there.
Tino Fourie
12-Jul-14 17:15pm
View
I just remembered something else I tried but did not work for me. Look at this MSDN link where you can send a control to the "back" or bring it to the "front". This really means that you are either going to "move" a control behind others or place it over existing controls.
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.bringtofront(v=vs.110).aspx
[
^
]
Tino Fourie
12-Jul-14 16:54pm
View
I have been faced with exactly the same problem while designing Forms and I have found that the IDE screws it up somehow. The bad news is, there is no way to fix this and you will need to redesign / recreate the form from scratch. I have lost hours of coding time because of this anomaly in VS and it has driven me to the brink of tears.
It is not worth your time to try and fix it, redesign / recreate the form using a new form. Do not reuse the exiting form.
To test this, create a new form and see if you can replicate the same problem you are facing now. You might be pleasantly surprised.
Edit:
For improved performance, use a BackGroundWorker to place controls on the Panel control. This will prevent your application from "locking up" while it adds the controls or cause your application to lag.
Hope that helps you.
Tino Fourie
12-Jul-14 15:22pm
View
I assume that you are assuming that a user is actually sitting at their desk scrolling through 10k lines in a DataGrid. However, it is more likely that the data in the datagrid could be used by other processes in the application and will require all the data to be present. To incorporate Paging to be triggered automatically by another process and not by user interaction through scrolling seems like a daunting exercise.
It is also possible that the OP is not quite clear on how the data is used by the user which validates your reply.
Tino Fourie
2-Jun-14 14:50pm
View
I am currently studying a post on StackOverFlow which is very comprehensive and detailed with regards to "locked" image files.
Here is the link (http://stackoverflow.com/questions/18250848/how-to-prevent-the-image-fromfile-method-to-lock-the-file) for those of you who are also stuck on a similar issue.
Tino Fourie
2-Jun-14 14:37pm
View
Unfortunately, that is a no can do mate. What I do find interesting is that out of the 7 image files I load only the last loaded image produces the error message.
I have tried all sorts of possibilities in both VS2010 & VS2012 on both Vista and Win 7 and it is always the last image files read that is locked.
Is there perhaps another way of applying the same code but in another way of logic ?
Tino Fourie
2-Jun-14 14:25pm
View
OG, Option 3 of the code I posted is touching on what you have given but is not quiet the same as yours. I will definately try your code (even the translated code looks pretty good). I will post back in a minute !!
Tino Fourie
24-May-14 9:40am
View
WinForms... I thought that "VS2010 VB.Net" would be enough not to confuse other members between WPF and VB. My bad if it was not clear enough though.
Tino Fourie
28-Apr-14 9:25am
View
Thanks Enigmatic Texan for your suggestion.
I am familiar with the Alpha channel (aRGB) and how to use it. Although I haven't tried it, as I am busy with other slightly more critical functions, I think the problem will come in where it is necessary to filter through a range of different "white" pixels based on the 255,255,255 RGB channels.
In addition to this, I need to try and stay away from a multipass process where I have to scan the image for the various "white" pixels. I might have it wrong due to the lack of research on my part, but as far as I know you can only set one colour a your transparent background.
Coupled with that I will probably need to have an option to set the opacity or at least have control over it from the GUI.
BTW. love the the way you prevented bots from harvesting information ;)
Tino Fourie
24-Apr-14 20:00pm
View
I am truly fascinated by your way of giving mild criticism not to mention the fact that you accuse others of being rude while you at the same time are very forthcoming with your opinions and so called mild accusations.
If you are unclear about the question, you "ask" for clarity, not give your opinion. Allow me to quote a valuable quote from Code Project:
"3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome."
Am I missing the part where it is mentioned to give your opinion without substantiating it or why you have come to that conclusion ?
Allow me to quote your first post:
"And the result of embossing should not be white and black." Says who exactly? The Sobel transform is dynamic enough to allow for different results. There is no industry standard for a Sobel transform therefore any result can be accepted, it does not mean it is the best result.
"You are doing it wrong" Says who exactly ? Refer to previous comment.
"And it should not be transparent". A Sobel transform does edge detection, nothing more. It is therefore safe to say that a Sobel transform's intended use is not to create transparent areas on an image.
"I see no reason in helping you doing the transparency." And yet you have prepared a detailed answer. You are opinionated, easy to "mildly" criticise others and contradict yourself. You sir, have no contribution to make here except for your opinions, contradictions and criticism without substantiation.
Please, continue to have a fantastic day.
Tino Fourie
24-Apr-14 18:39pm
View
Sergey, thank you for your reply. I prefer to use System.Drawing / GDI+ and not jump to WPF since I am not very familiar with the code. As for reading through MSDN documentation, unfortunately I do not understand half of what Microsoft writes in their technical documentation and I find their example code to be more confusing than anything else and in other cases I can't apply their examples to my problem. It is for this reason I visit websites like Code Project and Stack Overflow, maybe this is the reason why these websites exist in the first place.
As for my choice of doing a Sobel transform, I prefer to have a more black and white image and since I have 18 (9 for the X-axis and 9 for the Y-axis) values to manipulate between the values of +5 and -5. I think I have earned the right to choose how light or dark my transform gets done since it is my application and most certainly not yours.
Of everything you wrote in your reply, the part most striking is what YOU decide what can and can't be transparent. I think I made it perfectly clear why I need to convert a range of white pixels to be transparent. In addition, I fail to see who gives YOU the authority to decide what can be done and what can't be done in other people's application.
Lastly, if YOU see no reason to help then why did you bother to post unless ofc you are trying to bump up your reputation score with meaningless comments like you have done here.
You should really try to keep your opinions to yourself and stop posting on threads where you do not wish to help. If you have something to contribute then post your contribution else don't bother to even leave a footprint that you have visited this page next time.
I hope you have a fantastic day ahead of you.
Tino Fourie
24-Apr-14 18:08pm
View
It sounds like you need to build a library instead of a user control to not only be implemented in all your project but also to maintain it in a proper manner.
Sreeyush touched on this when he mentioned to use it as a DLL in your project.
Another important aspect of a collection of functionality it to have as many of them as a function. In its current form, as User Control, it sounds more like most of the functionality is issued on controls contained in the user control therefore your code is only limited to that control for as long as it lives.
Also, a user control is there to create a new control which could either be an improvement of an existing control,an entirely new type of control or just a collection of commonly used controls in a single container. The user control has a specific purpose compared to that of a library which is a collection of various functions.
Tino Fourie
24-Apr-14 16:22pm
View
Ledtech, thank you for your reply and wealth of information especially when one is not sure what to search for to drill down to the juicy bits of your research.
I completely agree with you that reinventing the wheel in this case is not worth the effort as it will delay launching your own application, plus running the risk of having your "ironclad" encrypt/decrypt server based copy protection solution hacked in a matter of a few hours. Not to mention the weeks and month it took you to write another piece of software to hopefully protect the first application and then see it get hacked.
Thanks again mate, very resourceful post.
Regards,
Tino
Tino Fourie
24-Apr-14 16:18pm
View
Vedat, thank you very much for you reply and the information contained therein. It is certainly good to know about solutions which has been tried before. Install Key is not all that expensive if you consider the time and effort already invested in creating a commercial application and to spend $89 is a small investment to protect you from potential major losses.
Thank you again.
Tino
Show More