|
ya i know about that , how will i detect that which line to redaw among so many lines, this is the main problem how to get the rectangle at the right place
Sameer Sood
Microsoft Student partner
NIT Durgapur,india
|
|
|
|
|
ssoffline wrote: how will i detect that which line to redaw among so many lines
Eh? Are you unable detect what line you just changed yourself?
---
b { font-weight: normal; }
|
|
|
|
|
Not that, i mean lines are there, but as i move other objects (not lines), then they may move over any of the line may be one or more, how to detect that, u need to redraw then.
Sameer Sood
Microsoft Student partner
NIT Durgapur,india
|
|
|
|
|
I am still a very inexperienced coder, so this might be a stupid question, but here it goes.
I am developing a website that has a membership login component. New users need to enter their username and email address. I then generate a random password for them. The problem comes in here, I need to send this password to them with some unique link for them to click on to verify that their email address is valid.
Generating the password and sending the email I can do, the problem is the link. I have no idea where to even start. How do I generate it and how do I verify it once the user clicks on it?
Daniel Oosthuizen
----------**************---------
ps. This is what part of the alphabet would look like if q and r were eliminated.
|
|
|
|
|
Well, you need to create an aspx webpage which takes a url parameter which identifies the user who is verifying.
So, on registration generate your random password, and a second random large password. Add the link to the email pointing to your webpage with the second password eg.
http://www.mywebsite.com/Authorise.aspx?Verification=9DFG45NN4NG80003GVN3N5
When the user clicks the link, you can collect the second password you generated from the aspx webpage and presumably look it up in your database to determine which user is being authorised.
Make any sense?
Regards,
Rob Philpott.
|
|
|
|
|
Thanks for the reply.
Most of what you said I had figured out already, but I didn't know the correct syntax for retrieving the value from the url. A friend pointed me in the right direction, but thanks again for replying anyway.
Daniel
|
|
|
|
|
Hi
I devloped a application.Every time clicking on .exe a instance is opened of that application.How this is possible that single instance run of this application
|
|
|
|
|
Hy,
Use the Process.GetProcessesByName(processname) class to see if another process with the same name is running.
Hope it helps.
Do your best to be the best
|
|
|
|
|
This is not the best way to do it, it's quite error prone.
The correct way is to use a Mutex and check if it exists.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
There are some articles here on CP covering this topic. Simply search the artciles for "single instance application".
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
This is the code your looking for.
[STAThread]
static void Main()
{
Process instance = RunningInstance();
if (instance == null)
{
Application.Run(new AteGui(splashScrn));
}
else
{
HandleRunningInstance(instance);
}
}
<big>Helper Functions and DLL imports</big>
public static Process RunningInstance()
{
Process current = Process.GetCurrentProcess();
Process[] processes = Process.GetProcessesByName(current.ProcessName);
foreach (Process process in processes)
{
if (process.Id != current.Id)
{
if (Assembly.GetExecutingAssembly().Location.Replace("/", "\\") ==
current.MainModule.FileName)
{
return process;
}
}
}
return null;
}
public static void HandleRunningInstance(Process instance)
{
ShowWindowAsync(instance.MainWindowHandle, WS_SHOWNORMAL);
SetForegroundWindow(instance.MainWindowHandle);
}
[DllImport("User32.dll")]
private static extern bool ShowWindowAsync(
IntPtr hWnd, int cmdShow);
[DllImport("User32.dll")] private static extern bool
SetForegroundWindow(IntPtr hWnd);
private const int WS_SHOWNORMAL = 1;
|
|
|
|
|
As has been stated before, iterating through a process list is not a good idea because of several reasons (with being slow the least one).
Mutexes are the way to go!
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi
how can i get the field names ( and not the data) of a table in sql server 2000?
regards
sAqIb
|
|
|
|
|
Hi again,
you can get the cloumns names by the following query:
Select name
From syscolumns
Where id = object_id('Table_Name')
Jamil abou khalil
|
|
|
|
|
I had used System.Drawing.PrinterSettings Class. Using that I used to fetch the printers that are added on my PC.
Now the problem is that I want to identify just the printers that are physically attached. I want the list of Virtual printers that are dummy and are not physically present. Can anyone help me as soon as possible.
|
|
|
|
|
hi,
I have created a setup & deployed a project using windows installer. how can i incorporate the self launching of the application after teh completion of installation. like we have for winamp, after installing winamp it used to launch on its own. this is the feature i want to incorporate.
Thanks in advance.
Praveen Raghuvanshi
|
|
|
|
|
Hi,
I'd suggest you to write a class like ;
[RunInstaller(true)]
public class RunAfterInstall: Installer
{
...
}
You should add it, as a custom action in your deploy project.
Also you can handle the after installation event, in the class above.
Hope this will help.
Cheers.
|
|
|
|
|
Hi
how can i query the name of all the tables existing (except system tables) in a database using sql server 2000.
regards
sAqIb
|
|
|
|
|
select * from sys.sysObjects
where type = 'U'
|
|
|
|
|
select name from master..sysobjects
where type = 'U'
|
|
|
|
|
hi
you can use this to get only the names of the table with no other coloumns.
Select name
From sisobjects
where type = 'U'
if you need anything else fell free to contact me on MSN: jamilaboukhalil@hotmail.com
Jamil abou khalil
|
|
|
|
|
i want to create webboard use c#
wherever have example or book
tell me please
Preaw
|
|
|
|
|
help guys... how can i enter next character in the text box using vb6? it so happen that i'm using hardware - buttons - in this program... using the inpout32.dll and the sort of thing... when i click the button to an specific number then click it again for other number, its just keep on changing the number in the text box - not adding the number that i have click... example: when i click number 1, 1 will appear in the text box, and then i will again click number 2 - the text box should display 12, since i click 1 before, ryt? but in this case, when i click the 2nd number which is 2, it simply replaces the 1st number - which is 1. guyd, can you help me with this? needed it badly thanks!!!
|
|
|
|
|
Could you please enlighten us on why you're asking a VB6 question in a C# forum?
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
hi guys i am trying to disable my lan adapter card and again enable it ,,
i am using WMI and the following code ,, but i am getting an exception
"The method is not implemented by any class" why is that ? and how to resolve this issue ,,, can any help me please,,,
=========================
ObjectQuery oQuery = new System.Management.ObjectQuery("Select * from Win32_networkadapter")
string[] o = new string[1];
ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oQuery);
ManagementObjectCollection oReturnCollection = oSearcher.Get();
foreach (ManagementObject oReturn in oReturnCollection)
{
Console.WriteLine(oReturn["macaddress"].ToString().ToLower());
oReturn.InvokeMethod("disable",(object[])o);
i also use the same code with the statement
oReturn.InvokeMethod("enable",(object[])o);
====================
}
please help me out
thanks in advance
hello
|
|
|
|