|
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid..
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
For those new to message boards please try to follow a few simple rules when posting your question.- Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
- Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
- Keep the subject line brief, but descriptive. eg "File Serialization problem"
- Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
- Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
- Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
- If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
- Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
- Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
- Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
- If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
- No advertising or soliciting.
- We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
I can't find the setting(s) to change the color of a combobox within a datagridview.
I tried this code below. I get a dark line around the datagridview cell and a white background. I see the colors I set below when I view the list within the combobox.
combo.DisplayStyle = DataGridViewComboBoxDisplayStyle.ComboBox;
combo.CellTemplate.Style.BackColor = Color.LightSalmon;
combo.CellTemplate.Style.ForeColor = Color.Black;
combo.CellTemplate.Style.SelectionBackColor = Color.LightSalmon;
combo.CellTemplate.Style.SelectionForeColor = Color.Black;
modified 16hrs ago.
|
|
|
|
|
Microsoft have knobbled many features of quite a few controls (e.g. ProgressBar - we all prefer green! MonthCalendar - change the font to make it big enough to see - No!) and often the only thing you can do is to disable visual styles. That can be a problem though as some controls require visual styles to be on (e.g the Tile mode of the ListView).
However with the DataGridView the colour works in the way you desire when the FlatStyle of the ComboBoxColumn is set to either FlatStyle.Flat or FlatStyle.Popup. I guess they missed that.
|
|
|
|
|
Hello Everyone Myself Emmanuel Katto, I wanted to know what are Custom Control and User Control?
|
|
|
|
|
A User Control is built from existing controls: similar to a panel, you drop existing controls onto a blank canvas to create your own unique control.
A Custom Control is generally derived from an existing control, so you can extend its functionality rather than building from the ground up.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
... and user controls are generally easier to create than custom controls, and people often create custom controls when they don't need to.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
MY FIREBASE DATA IN VACCINE-ID-DATE-DETAILS
I WANT TO FIND DATA,IF I LOAD DATA TO DATA GRID VIEW1 AND DATA GRID VIEW2.AFTER I SELECT TWO DATE AND PRES FIND BUTTON I WANT SHOW THAT DATE BETEWEN DATE IN DATA GRID VIEW1 AND2
|
|
|
|
|
DON'T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalization if you want to be taken seriously.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
sameera suresh bandara herath wrote: I WANT TO FIND DATA
Well, go ahead and do that. You have our permission.
Feel free to come back if you get stuck and have an actual question to ask, rather than a vague requirement to shout at us.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Steps
- Learn C#
- Learn basics of a database
- Learn how to access database from C#
- Learn how to code a UI.
- Learn how to do a range query for the database.
- Learn how to code that range query in C#.
- Put all of the above together to solve your problem.
|
|
|
|
|
You mean: C# and SQL.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Gerry Schmitz wrote: You mean: C# and SQL.
Me? My comment does say C#?
And although I was thinking about SQL I did mean just database in the first part.
But I also was not sure about what persistent data store they would be using. Their post did suggest something odd so I wanted it generic.
And re-reading I can see that the database is 'firebase' which is in fact a NoSQL database. So learning SQL is not appropriate in this case.
|
|
|
|
|
"Everything" I see dealing with Enums (in different name spaces) is lots of "recasting" to the underlying type or lots of namespace qualifying.
I needed to integrate "duplicate" Enums in different exe's and dll's that were "not the same" (or easily accessible) due to namespaces.
Now in my sender "POCO" I might have:
[DataMember]
public ServiceArm ServiceArm { get; set; } = ServiceArm.Undefined;
So I added to the POCO:
public string ServiceName => Enum.GetName( typeof( ServiceArm ), this.ServiceArm );
And in the consumer (different namespace; different exe / dll):
block.ServiceArm = Enum.Parse<ServiceArm>( unit.ServiceName );
No fiddling with namespaces; no obscure casting.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I may not be getting this correctly.
Are you trying to make use of several different independent enum definitions in different name spaces as if they were one, matching them on the enum name?
You can of course set up a demo to show that it works (today), but wouldn't it lead to a lot of maintenance problems, if the various enum definitions are updated independently of each other?
(I can't tell how much I miss a proper enum concept like the one we had in Pascal, where "underlaying type" was irrelevant: enums are not names of integers. They do not have any "underlaying type" but are literal values in the same sense as 'true' and 'false' in their own right as enum constants. 'using myEnumDefs' make these enum symbol available just like 'using myFunctions' make the function symbols available. But even programmers who never coded C/C++ seems to have adopted the idea that enums 'really' are integers with a name!)
|
|
|
|
|
What is an "interface"? I "tell" you a "valid" (Enum) "name" is the "interface" to the .exe / dll. And who tells who what to use? (I also happen to be serializing and deserializing)
The enum happens to be a handy implementation in this case.
The alternative is: a "standard" dll with "every" enum that anybody could possible need: creating one big dependency.
It also implies, I have to rewrite every exe / dll to "migrate out" every reference to this "master" enum into it's own dll.
(You had musing about a "universal language": this pattern can give different "names" based on context that "translate" to different enum values)
The whole "point" was to not have to muck with xxxx.aaa.xxx.ssss.ServiceArm, etc.
(If you don't code in C#, this is probably meaningless)
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
OK, I did not really intend to bemoan your use of the available facilities.
I was more focused on the lack of facilities, that could have been provided if C# had a proper enumeration type. So it was a sidetrack.
Now that C# does not provide a proper enumeration type, your workaround is fair enough. I am not happy with such workarounds being required, but I accept them - reluctantly.
|
|
|
|
|
What is a "proper" enum? The issue I'm addressing pertains to classes as well; which is "long namespaces".
You ignored the whole "central maintenance" issue.
If I had implemented it as a dictionary, would that have made a difference? No, just clumsier.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
The simpler solution for you is probably setting up an #include file with sequence of #define entries defining the proper constant names for you.
|
|
|
|
|
The actual translation in messaging layers should not be a significant problem.
Problems come about more because messages end up being modified far more than they should - probably because insufficient design or because there is no adherence to longer term roadmaps.
But if enums are a problem then move them, and only them into their own namespace (and dll.) Or redesign so static values are not used at all. That does of course trade strictness for ease of use.
|
|
|
|
|
The "Name", of the enum "value", is the "key", not the value.
The "personal" Enums happen to be "views" (I just made that up)
The fact that one uses bytes (I do) or ints, makes no difference.
The more I think about it, the more I like it.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Hi,
I have implemented a billing application in c#. I have stored customer data and billing data into sqlite database. I have created Setup project for the same. I need help here, when I install application, sqlite database(*.db) was not created automatically. I tried couple of custom actions(Install and commit) but sqlite database was not created during installation. Let me know if anyone have solution?
Thank You!
|
|
|
|
|
Do you have an empty copy of the database that you're looking to install, or are you wanting the install program to run a Sqlite command to create a new, empty database file?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
|
You could create the database from code; use scripts or code to create your tables.
It is far easier to create a DB that contains all tables but no data. Then you simply copy the empty DB to the appropriate location using the installer.
That means, NOT in the "Program Files" directory. I'd expect this DB to live in a single user-account. If you want multiple users, then SQLite isn't your best starting-ground.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|