|
|
Thank you Garth. Actually thats a mistake of using the word "Couldn't". I meant that i couldn't get a working C# Code from their website.
Thanks a lot for your Suggestion.
Is there a way i could trigger an event when a card gets swiped. If so that would give the solution i'm looking for.
Thanks in advance.
|
|
|
|
|
Hey hari, i too want the solution of this , comment if you got the solution.
|
|
|
|
|
i am using the following table
idno name activity startdate enddate
1 abc def 10/26/2014 11/01/2014
2 ghi jkl 10/26/2014 10/30/2014
3 mno pqr 10/26/2014 10/30/2014
4 stu vwx 10/26/2014 11/01/2014
i want to blink 2 and 3rd row(not particular row because i have many rows in my database) because column enddate has todays date.
likewise i want to blink each row if only column enddate is todaysdate.
thanks and regards,
Bobby Sharon
|
|
|
|
|
Does this have something to do with C#? And if so where do you expect this blinking to appear?
|
|
|
|
|
hai sorry, i am using this in visual basic to display datagridview can you help me
|
|
|
|
|
Do you see what it says at the top of this forum?
"C#"
Now, does that look like a good place to ask "VB" questions?
Or is there a better, more appropriate forum...one that specialises in Visual Basic...Hmmmm....
Like this one perhaps: http://www.codeproject.com/Forums/1646/Visual-Basic.aspx[^]
Read first, think second, post third.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I always post third, read first THEN think second.
"I need build Skynet. Plz send code"
|
|
|
|
|
"Blinking" ui elements fall under the category of design blunders / poor taste, and generally fell out of favor with the passing of character-only displays.
They may also cause fits.
|
|
|
|
|
hello guys,
i have to write a simple project ... it is a hangman code in C#
i have this...but when I run it... i keeps printing twice some sentences... if anybody can help me... and if the user type something different from l ..when it is asked...everything goes wrong...
#include <stdio.h>
#include <string.h>
#define NUM_TRIES_ALLOWED 10
main()
{
int num_letters = 0,
count = 0,
tries = 0,
num_vis_chars = 0,
correct_guesses = 0,
correct_flag = 0,
repeat_flag = 0,
choice;
char guess,guessword;
char word[255] = " ";
char incorrect_letters[255] = " ";
puts( "Enter a word for player to guess." );
gets( word );
printf("Ready to start!\n");
num_letters = strlen( word );
char visible_word[num_letters];
for( count = 0; count < num_letters; count++ )
visible_word[count] = '*';
visible_word[num_letters] = '\0';
if (guess == visible_word[count]){
while( tries < NUM_TRIES_ALLOWED )
{
printf( "The word is: %s\n\n", visible_word );
printf("Number of turns remaining: %d", NUM_TRIES_ALLOWED-tries);
printf("\nWould you like to guess the word [w] or guess a letter [l]:");
choice = getchar();
if (choice=='l'){
printf( "\nWhat letter have you chosen?:\t " );
scanf( " %c", &guess );}
for( count = 0; count < num_letters; count++ )
if( guess == visible_word[count] || guess == incorrect_letters[count] )
{
repeat_flag = 1;
correct_flag = 1;
break;
}
if( repeat_flag == 0 )
for( count = 0; count < num_letters; count++ )
{
if( guess == word[count] )
{
visible_word[count] = guess;
correct_guesses++;
printf("\n**************************************************************\n\n");
printf("Good choice!\n\n");
if( correct_guesses == num_letters )
{
puts( "\n\nCONGRATULATIONS! You guessed the word!" );
printf( "WORD: %s\n\n", visible_word );
exit( 0 );
}
correct_flag = 1;
}
}
if( correct_flag == 0 )
{
incorrect_letters[tries] = guess;
tries++;
printf("\n**************************************************************\n\n");
printf("Bad choice!\n\n");
}
repeat_flag = 0;
correct_flag = 0;
}
puts( "You did not guess the word." );
printf( "WORD: %s\n\n", visible_word );
}
if (choice='w'){
printf( "\nWhat word have you chosen?:\t " );
scanf( "%s", &guessword );
if(guessword==word){
printf("CONGRATULATIONS! You guessed the word!");}
else{ printf("nops");
}
}
return 0;
}
|
|
|
|
|
Member 11189395 wrote: i have this...but when I run it... i keeps printing twice some sentences... I hate to disappoint you, but that is not C#.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have created c#.net desktop application in VS2012 with localDB.
now for deployment is it necessary to install sqlexpress or sql server at client pc ??
what exact steps for deployment.
I have also use crystal report in it, so how to deploy that crystal report also work properly.
-- modified 29-Oct-14 14:24pm.
|
|
|
|
|
You do not install SQL Server or SQL Express. If the user already has a SQL Server database, you should let them install into that installation rather than trying to force a one in there for them. If they choose to install, you can include the Express version as a redistributable that is triggered out of your install (the full version of SQL Server is not a redistributable). To be honest, you really should be considering looking at using a professional grade installation package, as this will make working out things like prerequisites much easier.
|
|
|
|
|
client has not install sql server so basically i have to install sql express ?
because i tried to run setup without installing sql express at client side but its not working
|
|
|
|
|
If you want to use a multiuser database in you application, then SQL server (express edition or teh full monty) is the way to go: but it come with a cost - and a pretty big one. SQL server is a big complicated package, and it isn't something you should expect the "average joe" to install. Heck, I have to Google for instructions every time I do it because it is horribly easy to get get it wrong!
Even asking the user if he needs it probably indicates you are doing something wrong: if two users in the same company install your software, you probably want them to share the data - they are not likely to know if it is installed, so they will probably install a new version - and then there is no data sharing!
If you app can use the database as a single user, then think carefully about if you actually need SQL server at all: SQLite, SQLCE, or even Access can handle 90% or more of what SqlServer can do for a single user, without needing a big, slow, cumbersome server installation (a couple of DLLs is all you need).
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Access to Form1 data label1.Text?
using abc;
namespace WindowsForm
{
class Form1:Form
{
private label Label1;
}
}
using Form1;
namespace abc
{
class classtest
{
public method1
{
Form1.label1.Text="text";
}
}
}
modified 29-Oct-14 11:45am.
|
|
|
|
|
What happens when you try it?
|
|
|
|
|
You seriously need to read this[^].
You import namespaces, not classes (expect in special cases). Your "using" statement is worthless and should be removed.
Also, Your class files shouldn't know ANYTHING at all about a Form. Your data should be stored in classes and the forms should reference that data, not the other way around, like you're doing.
modified 29-Oct-14 12:03pm.
|
|
|
|
|
Yes, but has to be some ways to get access from child to parent in OOP.
|
|
|
|
|
That's actually a violation of OOP principles. No "child" object should know anything about its parent container. Doing so very tightly couples the two classes together to the point that they cannot be used separately in other projects.
|
|
|
|
|
Okay, if the question you are asking is why can you not access the Text property of Form1.label1, there are many problems with your code. Some are code bugs, while others are architectural. Let's start with the code bugs in your example:
1. Form1 is not public. This means that it will not be seen outside the WindowsForm namespace.
2. Even if Form1 was public, you haven't instantiated it anywhere.
3. Assuming you manage to instantiate Form1, Label1 is private, so cannot be accessed outside of Form1.
4. You have a mismatch between the case of Label1 and label1.
5. Assuming that Form1 and Label1 were public, Label1 has not been instantiated, so it cannot be used anywhere as the Windows Forms Label control (I'm guessing that's what this is), is not a static class. So, you would need to instantiate it.
6. method1 is missing the scope and parentheses.
Okay, now let's get to the big architectural issue.
You are attempting to manipulate a control on another form from method1. This is a big OO violation. You aren't just exposing the text property of the label, you're exposing all the other properties that the Label has made public. The standard way to deal with this would be to expose something inside Form1 that can be used to set this value without exposing the control that's consuming it. You might end up with something like this:
namespace WindowsForm
{
public class Form1 : Form1
{
private Label Label1;
public string LabelText
{
get { return Label1.Text; }
set { Label1.Text = value; }
}
}
}
namespace abc
{
class classtest
{
public void method1()
{
Form1 form = new Form1();
form1.LabelText = "text";
}
}
} By the way, it's a good idea to rename your controls to be something more meaningful.
|
|
|
|
|
Pete O'Hanlon wrote: Form1 is not public. This means that it will not be seen outside the WindowsForm namespace.
Technically, that should be outside of the assembly which contains the class. Other classes in a different namespace within the same assembly would still be able to access it.
However, that's probably a bit too advanced for the OP at the moment.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Problem with access from child ro parent class has to have some solution. Especially in multy file project
|
|
|
|
|
Thank you. I've got it. Actually excellent involving and understanding.
modified 30-Oct-14 11:01am.
|
|
|
|
|
Good for you. That's excellent.
|
|
|
|