|
ting668 wrote:
against changing the system time for delay the trial day count
You need to hide the date last run somewhere, and see if it ever goes backwards
ting668 wrote:
against reinstall the software after trial period and successfully run
Don't uninstall the information that tells you the software has already been run here.
ting668 wrote:
against reinstall the full version of the software to another computer or pocket pc with the same registration key
Generate a unique key that identifies the machine, get it from the customer, and use that in generating/validating the key you send back. That's what Microsoft does.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hi guys, i am doing a proejct which needs to modify the password of a MS Access database programatically in C#. Anybody could give a hint? Other language is fine as well, cos I searched a lot website without getting a tint msg.
Thanks a lot!!!
|
|
|
|
|
check
http://support.microsoft.com/default.aspx?scid=kb;en-us;304319
Sanjay Sansanwal
www.sansanwal.com
|
|
|
|
|
Hi Sanjay,
thanks for your reply, that really gives me some idea of what to look at, but still, cannot really get it work, below is the code I wrote trying to change the password. The first approach didn't throw any exception, but it doesn't work, the database keeps the original password. The second approach throws an exeception "Object or provider is not capable of performing requested operation." of type 'System.Runtime.InteropServices.COMException'. Any idea how to get it work? btw, I've also looked at the JRO one, which seems to work, but haven't tried yet cos some says JRO should be replaced by ADOX, etc.
private void ChangeUserPassword(String strOld, String strNew) {
ADOX.CatalogClass cat = new ADOX.CatalogClass();
ADOX.User user = new ADOX.UserClass();
ADODB.ConnectionClass dbConn = new ADODB.ConnectionClass();
dbConn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password="+strOld+@";Data Source=C:\temp\db1.mdb;Persist Security Info=True";
dbConn.Open(dbConn.ConnectionString, "", "", -1);
cat.ActiveConnection = dbConn;
user.Name="Admin";
//First try
user.ChangePassword(strOld, strNew);
//second try
//cat.Users[user].ChangePassword(strOld, strNew);
Console.WriteLine("password changed");
dbConn.Close();
}
Many thanks.
P
|
|
|
|
|
Hi all,
I have written an app with a user level, business level and data level tier. I originally designed the app to be used across the network so that the business and data tier 'lived' on a server.
I am not sure on what is the best way to handle updates of the three parts of the app. I was thinking about having the user interface call the business level but if I update the business level will that break the connection with the business level.
The other way I have seen this handled is to run from the server in the same directory and then just create a new directory for each update.
Any thoughts would be appreciated.
Thanks
|
|
|
|
|
hi there ,
how can i put data from datareader to datagrid ?
|
|
|
|
|
You can't bind Windows Forms Controls to a DataReader object. However, you can bind it to a Web Form's Controls such as the DataGrid
Anyway,
To Bind to Web Control, check
http://www.easerve.com/developer/tutorials/asp-net-tutorials-datareader-datagrid-vbnet.aspx
To Bind to a window control, you would need to convert DataRedaet to dataset and bind dataset to dataGrid
Check getting reader from dataset at
http://www.123aspx.com/redir.aspx?res=27901
Sanjay Sansanwal
www.sansanwal.com
|
|
|
|
|
The print preview showed two pages with text but after clicking Print on the print preview dialog window, only one blank page printed out from the printer. Any clue?
Two methods below:
private void btnPrintPreview_Click(object sender, System.EventArgs e)
{
try
{
streamToPrint = new StreamReader("C:\\Test1.txt");
try
{
printFont = new Font("Arial", 10);
PrintDocument pd = new PrintDocument();
pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage);
PrintPreviewDialog aPPDialog = new PrintPreviewDialog();
aPPDialog.Document = pd;
aPPDialog.ShowDialog(); //this shows up the print preview dialog window!
}
finally
{
//streamToPrint.Close();
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
return;
}
private void pd_PrintPage(object sender, PrintPageEventArgs ev)
{
float linesPerPage = 0;
float yPos = 0;
int count = 0;
float leftMargin = ev.MarginBounds.Left;
float topMargin = ev.MarginBounds.Top;
string line = null;
linesPerPage = 75;
while(count < linesPerPage &&
((line=streamToPrint.ReadLine()) != null))
{
yPos = topMargin + (count * printFont.GetHeight(ev.Graphics));
ev.Graphics.DrawString(line, printFont, Brushes.Black,
leftMargin, yPos, new StringFormat());
count++;
}
if(line != null)
ev.HasMorePages = true;
else
ev.HasMorePages = false;
}
Any idea what went wrong or what was missing in my code? Thanks.
|
|
|
|
|
I have a solution with 11 C# projects in it, and after importing the solution into Visual Studio, I'm getting about 800 compiler warnings saying "Load of property XYZ failed."
The MSDN documentation for this warning is found here, with a suggestion that the project has been edited by hand (not the case though). Has anyone else seen this Visual Studio problem?
Judah Himango
|
|
|
|
|
Judah Himango wrote:
Has anyone else seen this Visual Studio problem?
Not yet, but there is a reason why it is beta software.
- Nick Parker My Blog | My Articles
|
|
|
|
|
hehe true true, but even VS 2005 Express beta didn't have these problems.
I've also noticed a bug that occurs occasionally where after clicking the main menu of VS, then moving the mouse to the Project bar, VS freezes up, which also didn't happen in the Express version. However, I'm wondering if all these warnings regarding invalid project properties is what's causing the latter freeze up.
Judah Himango
|
|
|
|
|
|
The Project menu item freeze up, yes. The 800 warnings of bad project file settings, no. I have the feeling the two are related though.
Judah Himango
|
|
|
|
|
It is unlikely you will get a great deal of responses in this forum. If you are in the official beta program then you should post your question on the private beta forum. If you are just running the public build of the product, then you should go to the public microsoft news group for VS2005 and post it there.
Those two forums will give you the highest possibility of feedback.
Also -- if you are in the private beta group, you just did something that would get you banned from the beta. The NDA states explicitly no public comments to be made of what occurs within the beta.
This signature left intentionally blank
|
|
|
|
|
I'm running the public build so I'm free to make public comments.
Judah Himango
|
|
|
|
|
|
Itay Sagui wrote:
Does anyone know how to do the Ghost window feature, that can be seen at:
The look can be accomplished simply by setting the Opacity property of your form to the desired amount.
Itay Sagui wrote:
"If the layered window has the WS_EX_TRANSPARENT extended window style, the shape of the layered window will be ignored and the mouse events will be passed to the other windows underneath the layered window." But it does not seem to work....
What are you doing? Have you tried to override the CreateParams and or'ing the WS_EX_TRANSPARENT (0x00000020L) window style?
- Nick Parker My Blog | My Articles
|
|
|
|
|
I don't care much about the look. I have no problem with the opacity of the window.
I've over-ridden the CreateParams, and ORed the WS_EX_TRANSPARENT but this does not give the desired (specified?) results.
What I'm trying to do is to have a window passing the mouse clicks to the window beneath it...
I also forgot that this works fine, on windows from the same application, if I return HTTRANSPARENT in the WM_NCHITTEST message, but have absolutely no effect on external (other applications) windows...
|
|
|
|
|
Itay Sagui wrote:
What I'm trying to do is to have a window passing the mouse clicks to the window beneath it...
Without looking around too much you could call GetNextWindow passing GW_HWNDNEXT (2) as the second parameter to get the handle to the window below your window, thus calling ShowWindow with your corresponding hWnd to display the lower window as you would want it to have focus.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Related to my previous remoting question I now have to use ReflectionPermission to access my protected methods I am trying to discover.
I am executing the following code in my constructor:
ReflectionPermission sec = new ReflectionPermission(ReflectionPermissionFlag.MemberAccess);
sec.Assert();
However I get the same results. I just see public methods and not the protected ones.
Has anyone used Reflection Permission that can tell me just what I need to do? The MSDN help files are totally useless in actually using this feature.
Thanks,
Michael
This signature left intentionally blank
|
|
|
|
|
I am using C# and have a DataGrid. Within the grid there is a template column with a DropDownList in the footer template. I populate this list with a list of valid users. I would like the persons name who logged on to be the entry that is selected by default. How can I access this DropDownList in order to set the field to the default user name in the list? Here is the code that I use to access the field during an add.
DropDownList analyst;
analyst = (DropDownList)(e.Item.Cells[3].FindControl("cboAnalystFooter"));
This code is in the DataGrid_Command() function that is triggered by an Insert event. How do I access this field outside of this function, such as in the Page_Load() function?
Thanks for the help!
Scott
Scott
|
|
|
|
|
hi,
I have a Web-Service which runs on a Desktop and a Mobile Web Client which consumes this Web-Service from a PDA. Now I want to log the method-call and the time when a user executes an action with the PDA on the Desktop by WLAN in a database or in a file. Important is that it should be a generic solution, so not only the tasks from a Windows Mobile Client which consumes a Web-Service should be logged but for any other Microsoft specific Web Application which consumes some application on a desktop should be a possibility available to log the events.
An important aspect i have to consider is the performance. – This solution should not have such a negative impact on the performance.
Hopefully someone could give me tipps or hints how i can solve this problem.
regards,
mathon
|
|
|
|
|
Each of your methods in your WebService would have to log this information. You can't get the information about the appliocation that called your WebService though, but you can log all the parameters that were passed. But, like I said, you have to include this code in each of your WebService's public methods.
Any logging you do will degrade performance to some extent. It's dependent on how much information you log and where the log is written to...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
There is no possibility to log the information (the method-call->the name of the method and the time) of a WebService which is called by a client without changing the origin code?? I thought there are solutions...
mathon
|
|
|
|
|
Two ways to do it, neither of them good or easy...
- A packet sniffer running between the WebService and the Client. Not a good idea and not easy to pull out and log the information you want.
- Write a shim WebService that exposes all the same methods and parameters that forwards requests back and forth to the real WebService, while logging what's called and with what parameters. Also, not good, not easy, and is a duplication of effort because you have to duplicate the original WebService interface exactly.
The best method is to write the logging code into the original interface as you write it. Then you could at least configure it to look at it's configuration file and wee if it needs to log information or not.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|