|
You might want search on the net related to licensing mechanism
some of the important things you might want do are
- Selecting hardware PC id for unique identification of the machine e.g hdd serial number,dongle, or even some network card ID [depends on your need]
- you should maintain a increpted license file with the product
- you should store your pc id in this file and other any related info, which you should use to validate the license of the product
rest you should think on your self!!
|
|
|
|
|
I just want to ask how will i be able to include the other relational operators like >= and <= in a regex pattern?
as of now this is my pattern:
(for\s*[\(]\s*int\s*[a-zA-Z\d]*\s*=\s*[\d]*\s*;\s*[a-zA-Z\d]*\s*[\<\>|\>=\<=])
Also, how will i create a pattern for unary operators? Whenever i create one using a regex tester, the tester does not capture the unary operator.
modified on Wednesday, August 5, 2009 2:43 AM
|
|
|
|
|
Are you trying to search for for loop in the file? If that is the case, then just search for text between for( and ).
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
No. that pattern is used to check the entered statement if it is a correct syntax of a for loop statement or not.
|
|
|
|
|
for(int i=0; i<(a+b)/2; i++)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
|
Mohammad Dayyan wrote: How can we change the background screen color in Console ?
Here it is,
using System;
public class Test{
static void Main(string[] args){
Console.Title = "My Console Application";
Console.ForegroundColor = ConsoleColor.Blue;
Console.BackgroundColor = ConsoleColor.Yellow;
Console.WriteLine("Press Any Key To Continue.......");
Console.ReadLine();
}
}
Hope This will help you
|
|
|
|
|
Thanks, but it isn't the one that I wanted.
|
|
|
|
|
What!
You were given the properties used to change the console colour. What more information could you possibly need?
Alan.
|
|
|
|
|
I want to change the background color like the image that I linked .
Actually I'm going to change whole background color.
|
|
|
|
|
I see,
That requires a screen clear after setting the new colour. Try the following code to see it happen.
Console.BackgroundColor = ConsoleColor.Blue;
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("hello");
Console.ReadLine();
Console.Clear();
Console.WriteLine("hello again");
Console.ReadLine();
Alan.
|
|
|
|
|
Great, It works.
Console.BackgroundColor = ConsoleColor.Blue;
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Clear();
Console.WriteLine("hello again");
Console.ReadLine();
|
|
|
|
|
Hey all,
I using GetWindowRect with this struct
[StructLayout(LayoutKind.Sequential)]<br />
public struct RECT<br />
{<br />
public int X;<br />
public int Y;<br />
public int Width;<br />
public int Height; <br />
}
However the sizes returned are not correct, any clue why?
1680 x 1050 returns 1686 x 1082
1280 x 1024 returns 1291 x 1061
1440 x 900 returns 1451 x 937
Only the last 2 have the same difference.
|
|
|
|
|
Could it be including the non client area ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
What you probably did is maximize a window and ask for its size, then compare that to the screen resolution; your conclusion should not be GetWindowRect is wrong, your conclusion should be a maximized window is set slightly larger than the screen size, which you can clearly see when looking carefully.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hey all,
I using GetWindowRect with this struct
[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int X;
public int Y;
public int Width;
public int Height;
}
Your structure is wrong. Its not Width and Height its Right and Bottom.
To get the height and widht you need to subtract the Right from X and the Height from Y
In all actuallity RECT in the SDK is definded as
public struct RECT
{
public int left;
public int right;
public int right;
public int bottom;
}
Width = right - left
and
Height = bottom - top
Bob
|
|
|
|
|
Which control can I use for displaying bulleted list?
> A
> B
> C
When I click A, there should be a gridview/panel which will be displayed.
Thanks
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
You have two separate issues here, 1) displaying a bulleted list and 2) displaying a panel on click. First though, tell us what platform you are using, Web or Windows. The answers will vary for both.
only two letters away from being an asset
|
|
|
|
|
Thanks Mark. Web platform is what I am using. I found the ajax collapsible panel but not sure if something better can be used here.
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
|
Hello all!
I am developing an app based on a Windows Form (Windows Application). My IDE is Visual Studio 2008.
I downloaded an example application (Console application) which used an external reference and everything went OK. Then I imported that reference into my Windows Application, and it crashed in runtime with the following exception:
'System.TypeInitializationException'
Then I realized that, in the add reference dialog, some of the DLLs appear in light grey (not selectable), whereas in the console application all of them can be selected.
¿what's the matter with this?
Thanks in advance!!!
|
|
|
|
|
Probably :
1. You don't have the license to use that reference ?
2. You don't initialized like in console application.
|
|
|
|
|
1.It makes no sense, because I can reference it in a Console App, ¿why can't I in a Windows Form App?.
2.¿Is it different to initialize in a console App and in a Windows Forms? How can I make it?
Thanks!
|
|
|
|
|
Hello all,
I have just started programming with c# (2008). The only programming experience that i have ever had is visual basic. I am only 12 years old. I have purchased a c# 2009 for dummies book and that does not seem to help my current problem. My problem is that I am unable to write things. This is what i mean:
Console.WriteLine("Enter your name:");
Above both the brackets i get a red line and a error saying "invalid token '(' in class, struct, or interface member declaration.
I also get the same message for the other bracket.
"invalid token ')' in class, struct, or interface member declaration.
I have tried everything and asked everybody however know one seems to know a solution, I would deeply appreciate if anybody woul help me.
Thank you,
Aman
modified on Tuesday, August 4, 2009 4:44 PM
|
|
|
|