|
I will answer the hardware part only:
it has to be USB, since a modern PC (desktop or laptop) has 2, 4, 6 or more USB ports
and often 0 serial ports.
furthermore, if I need several hardware locks, its much easier to add USB ports (using
a USB hub), than it is to add serial ports.
and lastly you can easily have USB ports at a distance, such as the USB ports found on
many desktop monitors.
The performance issue AFAIK is irrelevant since an app will typically check the hardware
lock only once (at startup), or a couple of times (when saving something),
certainly not all the time.
BTW there are companies such as WIBU[^] that sell
USB hardware locks; they are organized in such a way
that they can hold a number of keys plus a couple KB of app data; so a new software
can be linked to either an existing key or a new, empty key, and that is how it should be.
And of course, companies that offer hardware keys also have the necessary software
to support them, including an API to integrate it in the app itself.
To sum it up, whatever your software product is going to be, if it comes with a
serial port hardware lock I wont buy it. If it works with a USB key, it better be
from a trusted hardware source and able to combine with other protected packages...
So I dont see the point in reinventing stuff that exists and performs well.
|
|
|
|
|
Luc Pattyn wrote: So I dont see the point in reinventing stuff that exists and performs well.
cost !
i have resources which will give me the hardware and i can write software, if i do it neatly,then i have something to sell :->
you won't belive, but i might have to install software on machines where they dont have USB port
so now i'm thinking of putting a switch as it should work on both (serial and USB)
thanks anyways !
regards,
logicaldna
|
|
|
|
|
Hi,
I need to export data from DB (SQL Server 2005) to a file (eg. Excel, text file or any other format, .CSV) at the same time preserving the rows and column schema of the DB. Then I need to zip it and mail it across to a mail id.
One approach is to use File object to create a text or excel file, but the data will be scrambled when it will be written on to the file.
I need to do all this programmatically.Please help.
|
|
|
|
|
Why not use the "FOR XML" with the SELECT statment? This way you get a XML representation, which could be saved to file etc etc.. ?
|
|
|
|
|
hi, I have a login window that opens up before any other window of the application. the problem is that I m not able to close the login window upon authentication and then load the parent window of the system.
I use the following code to hide the login window:
this.FindForm().Visible=false;
but hiding the window is a very bad approach as though the form is not visible but it still is consuming memory.
the following code to close the window closes all the windows of the application, including the MDI parent form
this.FindForm().Close();
Please help
|
|
|
|
|
Use MDI container , open the login as the child of tht MDI, on successful login close the form as its a child it wont close the parent, open a new form which you want to show !
does tht help ?
regards,
logicaldna
|
|
|
|
|
|
Hi,
There is simple approach to this problem create MDI form
and on MDI Form_load event
formLogin.Showdialog() --for .Net--
OR
formLogin.show(vbmodal) --for VB classic--
[ remember formLogin is not a child Form ]
and At Last on Successful Login Close formLogin.Close
Thanks & Wishes
Navneet Hegde
Nashik(City Of Pilgrimage)
Develop2Program & Program2Develop
|
|
|
|
|
I set "DrawMode = OwnerDrawText, checkboxes = false, StateImageList = myImageList " .
When the treeview show, the nodes are to get tightly.
The same for it that space between text and Image.
How to augment space between?
Thank you.
|
|
|
|
|
I know there is no Membership API for windows forms application. But if anybody can give some idea about where similar applications can be found fro windows forms application.

|
|
|
|
|
I am afraid the answers today will be the same the were last week.
|
|
|
|
|
Didn't you ask this question last week? MS hasn't magically added them over the weekend.
|
|
|
|
|
Hi,
I' ve a custom drawn panel similar to groupbox(with nice round borders and header text) . I would like to change it's dock bounds (offset it a little bit), so that when a control is docked inside my custom control, it won't overlay my custom drawn border and header text. I know there is a hidden property which handles dock bounds (can't remember it's name) or maybe changing the client area would help ?
thanx
Stevo
|
|
|
|
|
Hi,
I have a modal dialog that I don't want the user to close via the close button, how do I disable it?
Thanks
|
|
|
|
|
Override the OnClosing event and set the Cancel memeber of that event argument to true. Rember that just disabling close button won't do the job, user can still use ALT + F4 .
Stevo
|
|
|
|
|
wow, all that effort :/ in swing I remember just having to set a field :/
Thanks 
|
|
|
|
|
He you can do it by 2 methods,
First one is just capture closing event of that form and make
e.cancel = true;
or second method is you disable closing button using following code,
You have to use win32 dll.
<br />
const int SC_CLOSE = 0xF060;<br />
const int MF_BYCOMMAND = 0x0;<br />
<br />
[System.Runtime.InteropServices.DllImport("user32.dll")]<br />
public static extern IntPtr RemoveMenu(IntPtr menuHwnd, int position, int flags );<br />
<br />
[System.Runtime.InteropServices.DllImport("user32.dll")]<br />
public static extern IntPtr GetSystemMenu(IntPtr hwnd, int bRevert);<br />
<br />
public static void EnableApplicationClose( System.Windows.Forms.Form form, bool val )<br />
{<br />
IntPtr menu = GetSystemMenu( form.Handle, val ? 1 : 0 );<br />
if ( !val && menu != IntPtr.Zero )<br />
RemoveMenu(menu, SC_CLOSE, MF_BYCOMMAND );<br />
else<br />
{<br />
form.Enabled = false;<br />
form.Enabled = true;<br />
}<br />
}<br />
<br />
Rahul Kulkarni
|
|
|
|
|
I think I'll opt for method 1 
|
|
|
|
|
Choose a window style without close button: FormBorderStyle.None
Having a button (or any GUI element) visible but turned off (without a visual clue)
is not good practice.
|
|
|
|
|
Luc Pattyn wrote: Having a button (or any GUI element) visible but turned off (without a visual clue)
is not good practice.
Yup! The entity that can not be used drives the user mad.
|
|
|
|
|
and the dialog that can't be closed drives the user to kill process and uninstall.
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
I need to download data from multiple web servers using a web-service. Now the same web-service will be running on each of the servers. They will just have separate URL.
I am a new-comer in this web-service technology. I can only implement clients by first adding web reference to one of the servers. Developing clients without adding web reference seemed very complicated to me. So i want to add one reference and change the URL to access other servers.
Now my question is-
I will write the client code by adding any dummy web-server as web-reference. Then later when my client will run, this web-server might be shut-down, but it will keep calling this web-service by using other URL's. Will this create any trouble?
thanks
Chayan
|
|
|
|
|
If you check out the client applications config file, there should already be a webreference url entry. Before deploying the applicaiton to the client, cant you just change this entry to the right URL?
Unless I understood your query wrong
|
|
|
|
|
Hi,
When i use this NVC.GetValues(KeyName), at times i am getting the following
error,
Void Copy(System.Array, Int32, System.Array, Int32, Int32, Boolean) :
Source array was not long enough. Check srcIndex and length, and the array's
lower bounds.
and
i am getting NullReferenceException when i use NVC.AllKeys with the
following message,
System.String BaseGetKey(Int32) ~ NRE ~ Object reference not set to an
instance of an object.
I cant predict the reason.
Here is my code snippet,
public void ProcessData(MyNVC procNVC)
{
if (procNVC.Count > 0)
{
try
{
string[] KeyArray = procNVC.AllKeys;
foreach (string skey in KeyArray)
{
string[] sVals = procNVC.GetValues(skey);
if (sVals.Length > 0)
{
sbuild.Append(skey + procNVC.Sum(sVals) + ';');
}
}
}
catch (ArgumentException oARG)
{
log.Info(oARG.TargetSite + " ~ ARG ~ " + oARG.Message);
}
catch (NullReferenceException oNRE)
{
log.Info(oNRE.TargetSite.ToString() + " ~ NRE ~ " + oNRE.Message);
}
catch (Exception oEXcpn)
{
log.Info(oEXcpn.StackTrace + " ~ EXCPn ~ " + oEXcpn.Message);
}
if (sbuild.Length > 0)
{
SendToClient(sbuild.ToString());
sbuild.Remove(0, sbuild.Length);
}
}
else
log.Info("No Elements in Collection:" );
}
With Thanks and Regards
Sakthi.
|
|
|
|
|
I need some help on getting the intellisense to work in the editor for my custom control.
I have a control had uses sup elements. Look like this.
< Control >
< / Control >
I can't get the design time support working for the option elements like it works in the datagrid and other controls. I they have it I can have it too. So if anyone knows something about this. Please help me.
|
|
|
|