16,013,642 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 princektd (Top 24 by date)
princektd
4-Jan-18 20:21pm
View
Also, as given in the code example, this issue happens when I try to handle the edit box creation in the 'WindowProc' override, while, if I do the editbox creation in 'PreTranslateMessage',it works fine in Win 10 1709 also. Thus the question of what changed in the workings of WindowProc in Windows 10 1709, and how to work around it...
princektd
4-Jan-18 20:09pm
View
@KarstenK The issue seems to be some under the hood update to how IME works... Everything works the way it is supposed to with Windows 7 ~ Windows 10 upto the Creators Update. The issue pops up once you have updated to Windows 10 build 1709...
The project is already set for Unicode and the issue only happens with the first keystroke on IME. after that, it works fine.
That is, if I use IME to type 'sakura', an edit box is created on the 's' KeyDown event. After creating the edit box, the 's' is entered into it, followed by the rest of the characters so that you finally get 'sakura' which IME converts to the japanese input 'さくら' in the IME composition window, and pressing the Enter key will confirm this word into the created edit box. This is the expected behaviour and works correctly prior to Windows 10 Creators Update. But after updating to the Creator's Update, the same input works differently in that, on the 's' KeyDown, the edit box is created, but after that, for some reason, it does not get included into the IME composition. So, typing 'sakura' as before now inputs 'akura'which IME converts to the japanese input 'あくら'.
The conversion to japanese in itself is correct. In the first case the japanese character is 'さ' which corresponds to 'sa', while in the 2nd case, the first japanese character is 'あ' which correctly corresponds to 'a'. As you can see, the first character 's' is missing. This problem can be seen as you are typing, that is, normally, as soon as you type 's', IME composition window will display it as an 's' with wavy underlines. The next keystroke 'a' will be appended to the existing 's' and will get converted to 'さ'. You dont need to type the whole 'sakura' word to see the issue, as in Windows 10 1709, as you type 's', the edit box will be created, but the IME composition window will not be displayed with the 's' character. The next keystroke 'a' will now open the IME composition window and input 'a' into it, which will be converted to 'あ'. Thus, the first 's' keystroke seems to get discarded somewhere, though debugging generates no errors or warnings.
princektd
5-Apr-16 21:14pm
View
Usually, the entity framework in MVC4 is used along with LINQ.That is the norm. However, Entity Framework does allow execution of raw queries for special circumstances, for example, if the query has to be generated dynamically or so. Of course, you can do the same with LINQ also. But anyway, the point is that you can execute raw queries.
Check these links for examples:
1) BinaryIntellect Knowledge Base: http://www.binaryintellect.net/articles/fbc96859-8a31-4735-baeb-7adcbc521b30.aspx
2) StackOverflow: http://stackoverflow.com/questions/16828974/how-to-execute-raw-sql-query-with-in-entity-framework
princektd
4-Apr-16 21:13pm
View
Thank you Karsten for your fast reply.
The fact that CE7 is old is worrying, but currently, even our desktops support upto windows 8. Windows 10 support is planned for our desktop application and is on the way. The problem is that the client is still on windows 7 in the desktop, and they had some discussions with CASIO before they decided on the CASIO device. It is true that they may still change the device, but the chances of that happening are less. Also, Android and iOS are not supported by us. Our software is windows only. Our clients being Japanese, they worry about security, and they dont want to use any mobile devices except those specifically made for such use cases as their own business flow. So, most probably we will be stuck with this device in case of this particular client. Hence the need to find a solution for WinCE7. If we get a solution ready, we can influence the next client more strongly saying that we already have a solution for WinCE7.
princektd
23-Aug-15 22:05pm
View
Thanks for the reply. I think maybe I still have not made myself clear. I have already got all that information into a CRecordset using afxdb.h.
that part is allright. Next, I have already displayed the tablespaces, tables and column info to the user using list controls.
The user may make changes to the data in these lists, ie, he might add a new row to the columns list, in effect, he is adding a new column to some table.
or he might delete a row from the tables list. it means he wants to delete a table.
Now, instead of directly executing these commands on the database one by one, what I want is to cache these things, and write it down in some sort of structure. After some thinking, I feel XML might be a good choice. The reason to cache the changes is that
1) reduce waiting time and confirmation prompts from the user (which will be the case if i execute each change directly to the DB)
2) the user might want to rollback some change. Thus, instead of executing the changes, I have to display the changed structure using some list controls and also output it as XML. Then I display a single confirmation prompt. Once confirmed, all the changes will be executed and there will be no rolling back. In effect, upto the final confirmation, the user has a chance to rollback any changes.
Maybe the requirements may sound odd, but I cannot change them.
After deciding to use XML, I have looked at a few MFC C++ xml classes. The msxml looks OK, but I am not sure about the COM things shown in its example.
I also looked at 2 XML classes from codeproject itself:
http://www.codeproject.com/Articles/24492/CXMLFile-A-Simple-C-XML-Parser and
http://www.codeproject.com/Articles/982/XML-class-for-processing-and-building-simple-XML-d
these might work, but they don't seem to have a remove node function (which will be needed in case the user performs a delete operation.)
Do you have any other ideas of any simple xml class? I need to be able to add nodes, change the attribute values, add or remove attributes to selected nodes,
select nodes programmatically (search for a node), and remove nodes.
princektd
21-Aug-15 1:55am
View
How about an XML document in memory?
something like this:
<Database type="ORACLE">
<Schema name="">
<Tablespace type="SMALLFILE||BIGFILE">
<Datafile name="" size="" reuse="TRUE||FALSE">
<Autoextend value="ON||OFF">
<Next value=""/>
<Maxsize value=""/>
</Autoextend>
</Datafile>
<Tables>
<Table name="">
<Columns>
<column name="">
<int>
<identity/>
</int>
</column>
<column name="">
<nchar length=""/>
</column>
</Columns>
<PrimaryKey>
<key name="" clustered="TRUE||FALSE">
<column name=""/>
</key>
</PrimaryKey>
<UniqueConstraints>
</UniqueConstraints>
<Indexes>
<index name="" clustered="TRUE||FALSE">
<column name="" sortOrder="ASC||DESC"/>
</index>
</Indexes>
<Relationships>
</Relationships>
</Table>
</Tables>
</Tablespace>
</Schema>
</Database>
<
would such an XML object be faster & easier to use than struct or vector<> ?
princektd
21-Aug-15 1:44am
View
The app requirement is for the user to load a DB structure into memory, make changes to it in memory and save the changed structure as an XML file. Then, if they want, they can execute the changes to the DB, or leave the DB as it is... So, whatever changes they want to make to the DB structure should be in memory only without actually affecting the real DB unless they explicitly click the update button. Thus, I need some type of hierarchical data structure that can hold the DB structure information in memory, and allow easy modifications, and finally, write it out to an XML and update the original DB structure.
princektd
21-Aug-15 1:43am
View
@bling: Thank you for the reply.
OCCI is for oracle only. Sorry for
my mistake
. I also need to support MySQL and MS SQL Server. I will fix the question now.
princektd
20-Aug-15 21:10pm
View
Deleted
The app requirement is for the user to load a DB structure into memory, make changes to it in memory and save the changed structure as an XML file. Then, if they want, they can execute the changes to the DB, or leave the DB as it is... So, whatever changes they want to make to the DB structure should be in memory only without actually affecting the real DB unless they explicitly click the update button. Thus, I need some type of hierarchical data structure that can hold the DB structure information in memory, and allow easy modifications, and finally, write it out to an XML and update the original DB structure.
princektd
24-Sep-13 9:01am
View
Sorry, i forgot to mention that the tables meant c# DataTables. I have updated the question accordingly. Thank you for the reply.
princektd
24-Sep-13 9:00am
View
Sorry, I forgot to mention that by tables, i meant system datatables we use in c#, not sql/mysql tables... I have updated the question. Sorry again.
Is there any way i can use the 'except' on a System.DataTable?
Linq has anything similar?
I have tried using DataRelations on a DataSet and i got till finding rows which exist in both tables but have been modified. Here the DS contains the two DataTables to be compared and I set datarelations on it.
I already figured out a solution using foreach loops, but that is not an elegant looking solution.
What I am looking for is some way which can avoid the foreach/for loops and maybe Linq query the DataTables or use lambda expressions... or maybe dataset datarelation themselves... Though performance wise which would be better?
Thank you for the reply.
princektd
22-Jul-13 8:30am
View
something like 'not being able to be evaluated' or 'cannot be evaluated' is what is shown before the debug run stops on its own... No exception or other messages...
I worked out that the getter and setter has to be overridden. But where do I do it? In the DAL class?
princektd
8-Jul-13 7:10am
View
The problem is, though ORM would be helpful, my Team Leader says it needs to be handwritten... Maybe kind of practice/learning thing. He did say that I was welcome to google things out if I was finding difficulty in figuring out things for myself, given that I actually tried to understand what it is that is being done in some code, rather than a copy/paste.
So, i thought i would like to try things out for myself. Thus, I ended up trying to write out object classes in visual studio without using EF, models and the inbuilt dataset/adapter things.
Anyway, I went through your links. The 3rd one shows me how I can write out related objects using 'Virtual' and 'Virtual ICollection'. What i cant understand is, how does the app know if a particular field is a primary key, or which field exactly links 2 objects? I don't see that defined in the example shown there. If these go into some other classes or files, is there any way I can do this in C# in the object class itself? Right now, I am trying to set up an empty project that uses the inbuilt adapter/dataset designer and create a 4 table DB with relations and check to see if i can find how these relations get handled by VS... i have to get things done without the EF or designer tools, so any other ideas?
princektd
8-Jul-13 6:14am
View
Exactly what I was looking fro. Thanks Denis.
Now, I only got to figure out how to do this manually, ie, in C# only, without using EF or XMLs... What i want to do is when manually writing Object classes, I would like to set this up properly, without using EF... I am a new programmer and so am just learning stuff... Any ideas or suggestions are welcome.
And thanx again.
princektd
25-May-13 1:30am
View
I want to make the template self sufficient. The point is, the dll i am including is something i made. So of course other systems wont have it. So, it would be nice to get it included in the template itself.
By the way, I tried your suggestion. But, some of the files were already mentioned with the proper path and some were not. I corrected these, and now everything works. Except the DLL. These too i mentioned the proper path and everything, but after building and installing the template, when i create the new proj, these show up with an exclamation mark...
Another wierd thing is, you know, when u add a new windows form, you can see the Form.cs in your solution explorer with a tiny triangle to its left. Click on the triangle and it expands to show Form.Designer.cs and If resources are present then Form.resx under your Form.cs, as if they were on the 'next level' in your solution tree... I know actually the files ie, .cs, designer and resx are all in the same folder, but somehow linked so that solution explorer shows them that way... Well, I say the designer and resx files work now, but still, they dont show up 'UNDER' the form.cs. Rather these are displayed on the SAME LEVEL as form.cs, but they work. I checked by adding a button to Form.cs and the desiger.cs automatically reflect it as well as the resx too. But why wont these be displayed as being 'under' as is normaly the case? Of course, even when using my template, only the already present form and settings have this problem. if i add a new form or settings or resource files, their linked files are properly displayed... Any ideas?
princektd
23-May-13 0:54am
View
aah... that seems a good idea. I'll see to it.
Thanks a lot.
Also say, i want to have a dll in LIB folder in the template. Then in the reference section, should I mention the folder path or just the dll name and include the Lib folder and dll as files in the template?
princektd
11-Apr-13 8:53am
View
One obvious way to do a similar thing is to provide a 'wizard' like interface where the user does some action, then he has to click the 'NEXT' button upon which some verification/validation code maybe run to ensure that the user has infact provided the needed inputs and then proceed to the next screen. Other than such a 'next' button UI, what other way is there to handle the above mentioned situation?
princektd
18-Jul-11 6:28am
View
ok...
so, Location affects from the uppr left corner of the form.
So if the form is 1024*768 size, then
this.Location = new System.Drawing.Point( -1023, -767);
would do the job, I think???
princektd
16-Jul-11 9:01am
View
and i plan to use a simple timer tick as a trigger for the location code... one button click on the main form triggers the lockscreen form which then moves down based on timer tick and covers the whole screen in about 5 seconds...
princektd
16-Jul-11 8:59am
View
Thnx.
**To slide down, you need to change Location**
But how do I do that???
More clearly, say Form1 is the 'home screen' hosting the buttons. one of these buttons is for locking. clicking on this lock button has to create a new instance of a form, say Form2, and have Form2 slide down from the top to the bottom. Form1 should not be hidden of closed or disabled. Form1 must still be active but under Form2 untill Form2 is dragged upwards again to 'unlock'.
Now, when Form2 is created, it initially must be offscreen, with its bottom edge lying on the screen's top edge... similar to how your windows taskbar autohide looks when the taskbar is positioned at top and hidden.... the taskbar's bottom edge is just visible on the top edge of the screen. when mouse touches it, the taskbar slides down to reveal itself...
similarly, when the lock form Form2 is created, only its bottom edge must be visible and it must slide down till it covers the screen. it is to be dynamically sized coz it has to be fullscreen and users may have various screen resolutions... so i dont know if resizing is a good option to achieve this effect...
so how do i change the form's location to cause it to move downwards till Form2's bottom edge hits the screens bottom edge (ie, how to move it till the screen is fully in place)? how do i calculate this movement with respect to Form2's bottom edge?
If you could, please say which function i could use for changing location...
thnx
princektd
16-Jul-11 8:49am
View
i figured i would need a timer. but how do i move the form???
princektd
16-Jul-11 8:48am
View
thnx Manfred R. Bihy
princektd
16-Jul-11 8:48am
View
its kind of a screensaver u can say... but i need it specifically to act as a locking screen for a touchscreen app...
princektd
16-Jul-11 8:44am
View
i need to slide the whole form... say Form1 is the 'home screen' hosting the buttons. one of these buttons is for locking. clicking on this lock button has to create a new instance of a form, say Form2, and have Form2 slide down from the top to the bottom. also, Form2 has to be fullscreen, so size change is not an option... this doesnt mean i have to hide or disable Form1. Form1 must still be active but under Form2 untill Form2 is dragged upwards again to 'unlock'...
Show More