|
UPnp or Nat search for this on Google and yoju will understand how it works.
In fact it depends on your pre-configured hardware, most of the time UPnp is opened.
|
|
|
|
|
Hi,
I'm trying to send an email that contains a link to verification the users email address.
My problem is how to combine the values inside the hyperlink/
This is what i wrote:
<br />
StringBuilder body = new StringBuilder();<br />
body.Append("<h1>confirm the registration by pressing the link below....</h1>");<br />
body.Append(@"<a href='http://something.aspx?userName=name&tempPass=password'> Click Here </a>");<br />
msg.Body = body.ToString();<br />
how i can replace the name and the password for ex. with-
txtName.text and txtPass.text
Please help me... 
|
|
|
|
|
You can try something like this:
StringBuilder body = new StringBuilder();
body.Append("<h1>confirm the registration by pressing the link below....</h1>");
body.Append(@"<a href='http://something.aspx?userName=");
body.Append(txtName.text);
body.Append(@"&tempPass=");
body.Append(txtPass.text);
body.Append(@"password'> Click Here </a>");
msg.Body = body.ToString();
|
|
|
|
|
How do I manipulate the Title of a Application...
Example:
if I open Firefox ... it appear title text "Firefox 3.5". Now I need to manipulate this text Control to "Firefox 3.5 Hello manipulate Text".
It should be solve on Dot.Net, but no must.
I think it need Win Api to solve it....
Thanks forward
modified on Friday, December 18, 2009 4:44 PM
|
|
|
|
|
I believe you'll need to use FindWindowEx and SetWindowText
Google for those and check out pinvoke.net and you should be able to do what you want
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
I have been using XNA for about 4 months now and like many of its bubble wrapped features, however I need some decend game programming based books to bring me to speed on general game programming concepts such as oct trees (i keep hearing that phrase often).
Does anybody know some good books for my problem?
Thanks :P
|
|
|
|
|
|
Hello!
I am writing little application similar to CPUID, which have to determine some CPU parameters. I made most of it, but having problems with getting CPU codename, socket type and CPU family. I tried with WMI and SocketDesignation from Win32_Processor class, but instead of socket string I am getting CPU1. I think it's because I am running 64-bit dual-core Intel on 32-bit Vista, but I am not sure. Tried to replace SocketDesignation with UpgradeMethod and result is Slot2 . With Family from Win32_Processor I am getting Celeron. So basically the application recognizes my E5200 as Slot 2 Celeron. As I understand so far I have to use assembler method/instructions to get such a data, because C# doesn't have access to CPU instructions. BTW I am using Visual C#. So, any idea/advice how to get CPU info for supported instruction sets, CPU socket(like socket 775, 754 and so on), CPU family and CPU codename? But without using assembler if it is possible.
The other question - this application needs to test/benchmark the CPU too. Like how much MIPS and FLOPS. Again, any idea/info how to do it?
Thank you in advance.
|
|
|
|
|
I receive the following error when trying to DirectoryInfo on a Mapped network drive.
Error in DirectoryInfo. Error: System.IO.DirectoryNotFoundException: Could not find a part of the path 'Z:\Tom\import\TxtFiles\Sub1'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
at System.IO.DirectoryInfo.GetFiles(String searchPattern, SearchOption searchOption)
at System.IO.DirectoryInfo.GetFiles(String searchPattern)
at DocumentShuttleService.Service1.DirectoryInfo(String sPath, String sFileSearch)
Note: The same routine works without an error on a local c: drive in the Windows Service.
Also, the same routine works without an error in a Windows Form on a mapped network drive, yet fails in the Windows Service.
Here is the Code snippet of routine.
public Boolean DirectoryInfo(string sPath, string sFileSearch)
{
try
{
Boolean bolFoundAMatch = false;
if (sPath != string.Empty)
{
DirectoryInfo di = new DirectoryInfo(sPath);
FileInfo[] rgFiles = di.GetFiles(sFileSearch);
foreach (FileInfo fi in rgFiles)
{
bolFoundAMatch = true;
}
if (bolFoundAMatch)
{
return true;
}
else
{
return false;
}
}
else
{
return false;
}
}
catch (Exception ex)
{
sErrorMessage = "Error in DirectoryInfo. Error: " + ex.GetBaseException().ToString();
sRetStatusErrorLog = WriteInLog(sErrorMessage);
return false;
}
finally
{
}
}
|
|
|
|
|
Can you manually navigate to Z:\Tom\import\TxtFiles\Sub1?
|
|
|
|
|
Yes, I can manually navigate to Z:\Tom\import\TxtFiles\Sub1, and can also open it via the Start, Run, Open.
|
|
|
|
|
Hi,
I'm not sure about this, however maybe you only just created the Z: mapping and it does not yet apply to the Windows services. Make sure the mapping is marked persistent (there is a checkbox for that when you create it), then try a reboot. That might help. Or not. I'm curious to know this.
|
|
|
|
|
What account is the service running under? I'l willing to bet it's "Local System", in which case, it doesn't have access to the network drives you're mapping. Services have to login to Windows just like you do. Since I doubt your network allows any machines "Local System" account permissions to network shares, the service has to be told to run under an account that has access to those resources. Open the Services manager and get properties on your service. Click on the Logon tab in the dialog that comes up and tell it to use (as a test!) your account. When the service starts, it'll have access to everything you do.
|
|
|
|
|
I get the same exact error under the Windows Service, after resetting the Drive Mapping, setting the Service Log On credentials, and then re-booting.
Reset Drive mapping:
Drive Z:
Folder \\ServerName\Folder
Connect AS
Username : Domain\MyloginName
Password : ********
checked the -> Reconnect at Login (<-- Luc, Assuming this what you meant by 'mapping is marked persistent')
In Services
Service | Properties | Log On (Tab)
Log on as:
The account: Domain\MyloginName
Password : ********
|
|
|
|
|
If you map the drive in your logon session, the mapping does not carry over to the one the service is using.
The mapping would have to be done in a login script or some other persistance method.
BTW, you should not be using mapped drives in your service, rather UNC paths are preferred.
|
|
|
|
|
The UNC method worked without issue; therefore, for now I'm going to change all the components related to this process to use the UNC rather than a mapped network drive. NOTE: I will follow up with a reply post if I ever isolate why the same code works in the Windows Form but not in the Windows Service.
|
|
|
|
|
Tomb421 wrote: if I ever isolate why the same code works in the Windows Form but not in the Windows Service.
As Luc pointed out, the code works in your WinForms app because the mapping only exists in the process running the WinForms app. The mapping hasn't been defined in the process in which the service runs.
/ravi
|
|
|
|
|
In order to properly target this issue and increase and knowledge for all, please note the following.
In neither the Windows Forms application or the Windows Service Application is there every the creation for the Z: network mapping drive. This mapping was created externally during the booting of the pc and was created with the 'Reconnect at Log On' check true long before to the existence of the Windows Service.
The Windows Forms application or the Windows Service Application use the same routine 'DirectoryInfo' to check for the existence of a FileSearch based on the path passed to the routine. You can review this routine and the errror in the original posting.
Ravi, when you say 'The mapping hasn't been defined in the process in which the service runs.', where you thinking that the z: drive mapping was being dynamically created or is there something I am missing. Please clarify.
/Tom
|
|
|
|
|
Tom, see this[^] link. Let us know if it addresses the problem.
/ravi
|
|
|
|
|
I have tried all of the above and the only solution that I can find that works is by using UNC rather than drive mappings. I am good to go. Thank you for the good advice.
|
|
|
|
|
Hi,
I got 2 forms.. Form1 and Form2.
When the program is executed, Form1 is called. There is a button that will open Form2. At this point of time, Form2 will be on top of Form1. After the user closes Form2, i want form1 to show something..
But i cant find the OnFocus event.. any idea?
|
|
|
|
|
Documentation[^] shows a GotFocus event, which is probably what you want.
|
|
|
|
|
somehow, my form dont have the GotFocus event
|
|
|
|
|
I don't see how that's possible.
|
|
|
|
|
this might do what you are looking for.
Form1.Close();<br />
Form2.Show();
Or
Form2.Close()<br />
Form1.Show();
|
|
|
|