|
Mapping drives is so '80s; use a UNC.
|
|
|
|
|
the '80s were great, so mapping drives also
|
|
|
|
|
Mapping isnt so 80's when having to interface with DOS
|
|
|
|
|
hi all,
i use ShowWindow(hWnd, SW_HIDE); in order to hide a running windows application.
it works good. and hide any application i want. (for example notepad)
(after calling that fuction the app is not seen in taskbar any more but available in task manager - still running in background)
the problem is:
i cant bring that process back with using ShowWindow(hWnd, SW_RESTORE);
what should i do in order to bring the hidden process back to the foreground ?
any ideas ?
thanks in advance.
MFA
|
|
|
|
|
Try ShowWindow(hWnd, SW_SHOW); instead.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Message Closed
modified 27-Apr-15 11:15am.
|
|
|
|
|
The problem that you have here is that MainWindowHandle is 0 because the window is hidden. To get round this, save the window handle that you used to hide it and pass that into ShowWindow instead of the MainWindowHandle .
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Message Closed
modified 27-Apr-15 11:15am.
|
|
|
|
|
Excellent. Glad to be of service.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
We are planning to rewrite out data access layers in framework 3.0 (currently its is Framework 1.1). We are using DataSets throughout for data access, and also while passing data from Data Layer to other layers.
I have to find out alternative data containers, because DataSet would consume lots of memory because mostly we may have to fetch a few rows and for that we don't want to use a DataSet. DataTable could be an alternative, but I wanted to know if there are other data efficient data containers in new .NET Framework, or another method of data access.
I am doing my research on google, still it would be great if someone could point me in the right direction.
Regards,
Blumen
|
|
|
|
|
Not really, your other options are to pass XML, or to create collections of your entity objects in your data layer, and pass those out.
Of course, they are passed by reference, anyhow.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you for that response.
Can I avoid DataTable and DataSet if I use xml?
|
|
|
|
|
You could, but it you be a nightmare to manage. XML is best used as a transfer mechanism, not as a storage mechanism.
If you were to use XML you would have to convert everything into it, including converting numbers to their string representations. If you need anything out of it you have to parse the strings back into their original representation. That takes time.
Have you considered some alternative patterns like DTOs (Data Transfer Objects) - These are lightweight objects that hold some data. It you want to represent a table you can create a collection of DTOs.
An example of a simple DTO:
public class PersonDTO
{
public int PersonID;
public string FirstName;
public string Surname;
public string MiddleNames;
public DateTime DateOfBirth
} Although it would be preferable if you created the fields as private and created property accessors for each of the fields.
|
|
|
|
|
Hai Everybody,
Can any one tell be how to program with the Exchange Server 2003 in C# with the help of API's.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
I have one doubt on User32.dll.
Convert html to Image using c#.
i have download the code from the site http://www.codeproject.com/cs/media/IECapture.asp.
It is working fine in Winxp.
but windows 2000 throwing some errors.
I have debug--> it is problem in User32.dll doesn't support PrintWindow in Windows 2000
Please any one help me out from this
Subash
|
|
|
|
|
What are the exceptions that it is throwing?
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Thanks.Exception Is Entry Point cannot be loaded in User32.dll PrintWindow.
Subash
|
|
|
|
|
If you look at the bottom of this page[^] under "Requirements" from MSDN, you will see that the PrintWindow is only supported on XP and 2003.
From the page:
Windows NT/2000/XP/Vista: Included in Windows XP and Windows Server 2003.
Windows 95/98/Me: Unsupported.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Any other solution for it.
My Scope of the Project is I want to convert HTML or any web page to Image Format using Dotnet. Do u have any solution of it.Please let me know
Subash
|
|
|
|
|
Sorry, you would be better off asking the author of the article you got the original code from.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Dears
i made the service controller having in system tray.....
it work quite nicely but after some time
The Try Catch Message occurs "Can not Stop The New Service(Service Name) On Computer qasim(computer name)"
The code is just as
nStar()
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
if (sC.Status == ServiceControllerStatus.Running)
{
if (sC.CanStop)
{
// sC.Close();
sC.Refresh();
sC.Stop();
sC.WaitForStatus(ServiceControllerStatus.Stopped);
sC.Refresh();
sC.Start(strArray);
sC.Refresh();
btnConnect.Enabled = false;
btnStop.Enabled = true;
}
}
else if (sC.Status == ServiceControllerStatus.StopPending || sC.Status == ServiceControllerStatus.StartPending
|| sC.Status == ServiceControllerStatus.Stopped)
{
if (sC.CanStop)
{
sC.Refresh();
sC.Stop();
sC.Refresh();
sC.WaitForStatus(ServiceControllerStatus.Stopped);
}
sC.Refresh();
sC.Start(strArray);
//
sC.WaitForStatus(ServiceControllerStatus.Running);
sC.Refresh();
//
btnConnect.Enabled = false;
//
btnStop.Enabled = true;
}
}
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
OnStop()
//////////////////////////////////////////////////////////////////////////////
if (sC != null)
{
if (sC.CanStop)
{
sC.Refresh();
sC.Stop();
sC.Refresh();
sC.WaitForStatus(ServiceControllerStatus.Stopped);
MessageBox.Show("Service Stop Successfully");
btnStop.Enabled = false;
}
else if (sC.Status == ServiceControllerStatus.StartPending || sC.Status == ServiceControllerStatus.Running)
{
sC.Refresh();
sC.Stop();
sC.Refresh();
sC.WaitForStatus(ServiceControllerStatus.Stopped);
MessageBox.Show("Service Stop Successfully");
btnStop.Enabled = false;
}
Now How can i solve thsi problem
Qasim
|
|
|
|
|
Hello,
I tried in the past to use a windows form into my windows service. Some users here at code project pointed me out that a windows service is not intending to have a user interface, also because you can run a service without having the user logged in.
Now my experience, (not so big on that) learned me that my service 'crashed' read go to stop mode when some GUI components were called.
For example, the MessageBox.Show you are using, try to log the output to a file.
Also when you are doing the try catch, print the exception to the log for more information
ex.Message, ex.StackTrace ...
Once that you passed that and found out what is wrong you can decide to get rid of the UI elements (system tray icon ?) I'd love to have a service with a system tray icon where i can do stuff, but it didn't work out for me. So I used Remote.NET to communicate with the service.
Let me know more how it goes.
|
|
|
|
|
Hi,
I'm doing research on application similar to VNC Viewer or build-in Windows Remote Desktop Connection. Can anybody help mi with some basic ideas, links, what to aware of etc... I will be a .NET 2.0 Windows application (run on both comuters).
Thank you very much.
|
|
|
|
|
When i inser a break point and debug a c# programme i m unable to change the code in this mode(Debug Mode). I remeber previously i can change code in c# APplication.Has any body idea what reason may be ????? Why it is not allowing to change code while debugging.Now it gives follwing message on change of code "Changes are not allowed when debugger has been attached to an already running process or the code being debugged is optimized"
|
|
|
|
|
hi,
As far as i know you can make changes to the code during runtime only in a web application. You cannot do it in a windows application.
Thanks
Regards
Anuradha
|
|
|
|