|
Hi all,
I want to develop an arabic Windows CE based application and I need your help .
* I don't have a pocket pc device and I am developping using visual studio 2003 .Net and .net compact framework in my work and using its pocket pc emulator.
SO, My question is :
- How can I load and use an arabic font and make the emulator understanding its arabic characters ?
Please help me as quickly as possible ...
Thanks for your time ...
Alaa El-Din Moustafa
|
|
|
|
|
I'm trying to determine how I can identify the accounts used to start specific services (if other than the system account assigned by default). I cannot find any information on returning this information. I would assume the natural place would be the ServiceController class, but it does not appear to be there.
Anyone have any ideas? Thanks for the help!
|
|
|
|
|
All you need is a bit of WMI
<br />
...<br />
using System.Management;<br />
using System.Management.Instrumentation;<br />
...<br />
...<br />
public void GetAllStartupAccounts()<br />
{<br />
ManagementClass serviceClass = new ManagementClass("Win32_Service");<br />
ManagementObjectCollection services = serviceClass.GetInstances();<br />
foreach(ManagementObject service in services)<br />
{<br />
Console.WriteLine("{0} starts under account: {1}", service["DisplayName"], service["StartName"]);<br />
}<br />
<br />
}<br />
|
|
|
|
|
I have a few pages that have controls with postbacks. Each time a postback is performed, a "flash" is generated which is very distracting on the eyes. How would you recommend I correct this? I had thought of doing a page transition fade effect for the controls but I am unsure of how to do this or if this is the right way to correct the flash.
Any suggestions?
|
|
|
|
|
I'm building a server based around Asynchronous sockets. Clients connect and are asked to authenticate, messages are exchanged using XML. As soon as the client has been authenticated the socket is associated with an object representing the person.
The server is working fine except when clients disconnect. If the client disconnects without sending a message to the server (i.e. the connection just drops) then the Socket seems to be closed before some of the server's clean up code can be called -- an ObjectDisposedException is thrown. I need a reference to the Socket since the clean up uses various parts of the type to correctly clean up.
Is there any way to ensure that my clean up code is performed before the Socket is disposed? The Dispose method is intended to be used for releasing resources, which isn't strictly the case and it would also require the derived Socket type to essentially be aware of where it's being used.
All suggestions are very much appreciated,
Paul
--
Paul
"Put the key of despair into the lock of apathy. Turn the knob of mediocrity slowly and open the gates of despondency - welcome to a day in the average office."
- David Brent, from "The Office"
MS Messenger: paul@oobaloo.co.uk
Download my PGP public key
|
|
|
|
|
How can I return the method that is called when an event is raised ?
System.Reflection.EventInfo.GetRaiseMethod does not work.
necati arslan
|
|
|
|
|
Are you looking for the method name? Or, a reference to the method?
Michael Flanakin
Web Log
|
|
|
|
|
I nead the method as System.Reflection.MethodInfo
necati arslan
|
|
|
|
|
Right off hand, I don't know. I would say that you can create a custom exception that passes the value, but I'm sure there's a better solution than that.
Michael Flanakin
Web Log
|
|
|
|
|
i have a asp.net c# project i connect to on a remote server from home. it opens fine but when i compile i get can't save to webserver .pdb(my local vs cache). first thing i do when project opened is sync all folders. any ideas.
ps only iexplore supports reg exp validator control, meaning that in netscape you must use the this.validate(), then this.isValid calls to make it work. I think this is a valid lawsuit for microshit.
|
|
|
|
|
Hi there,
On the login page of our .aspx intranet application, we use the system.directory namespace to query active directory using the username and password entered on the page. Something like the following.
oRoot = New DirectoryServices.DirectoryEntry("GC://dc=acme,dc=com, <username>,<password>)
oSearch = New DirectoryServices.DirectorySearcher
oSearch.SearchRoot = oRoot
oSearch.Filter = "(&(objectclass=user)(sAMaccountName=jbloggs))"
oResults = oSearch.FindAll()
We use GC:// instead of LDAP:// because we want to do a forest wide search as we have multiple domains. We have 3 Global catalogs within our network infrastructure. Most of the time this piece of code works find. But sometimes with no consistency, the application throws an error on the last line of the above code (oSearch.FindAll()). The error reported is 'The server is not operational'. Does anyone have any ideas, how does FindAll() work?
Thanks
Cammie
|
|
|
|
|
Greetings,
I am writing a program that installs an assembly into a remote machine GAC.
I am using the OpenRemoteBaseKey method to get the drive letter and path to where the .NET framework is installed. Now it works fine as an administrator going from one machine to another. But when I am a user it does not work. Okay I am fine with that.
How can set the security prinicple with this method to impersonate a adminstrator, whilst execute as a user?
I have the creditials that I need to pass in the process from an encrypted app settings file.
Thanks in Advance.
Cheers,
Campbell
|
|
|
|
|
You should really not be allowing applications to install anything in the GAC as a user level account. In fact you should not be allowing user level accounts to install applications at all
But if you must .....
To impersonate a user you need to use P/Invoke to call the LogonUser API from advapi32.dll to get a user token. Then you need to create a new WindowsImpersonationContext from this user token and call the Impersonate() method. After you've done the dirty work you should call Undo() to revert back to user level. And now an example: Windows Impersonation MSDN Example[^]
|
|
|
|
|
Okay. I had a look at the code and it makes sense. But where is the password passed, I saw the domain and username. Is that part of the LogonUser unmanaged method, using the interactive logon flag constant?
-Campbell
|
|
|
|
|
YOu can use the interactive logon flag to make windows bring up the password entry box, but if you have your own means of obtaining the password you can pass the password into the password parameter of LogonUser function and not specify any flags.
|
|
|
|
|
Can one unload an assembly?
dzsigit
|
|
|
|
|
No one cannot unload an assembly, but one can unload an AppDomain into which an assembly was loaded
|
|
|
|
|
Does any one know how to prevent a Windows Form from showing at startup. I've tried making the form hide inside my Load event, and tried to make it invisible inside my constructor and many things. I can make Main inside another class, but that makes a console appear instead.
I just want nothing to appear, except my notification icon. How would I go about this?
Thanks,
Shane S. Anderson.
|
|
|
|
|
I thought there was a way of doing this -- at least a better one than I've come up with...
Here's what I did (which is trick the form into submission):
In the form properties browser, I set opacity to 0%, then in the declarations sections of the class:
private bool loadedActivated = false;
and in the body of the Load and Activated methods:
private void Form1_Load(object sender, System.EventArgs e)
{
this.Visible = false;
}
private void Form1_Activated(object sender, System.EventArgs e)
{
if (!loadedActivated)
{
this.Visible = false;
loadedActivated = true;
}
}
and lastly in the the NotifyIcon Click (or double-click, if you prefer):
private void notifyIcon1_Click(object sender, System.EventArgs e)
{
this.Opacity = 1.00;
this.Visible = true;
}
... so I'm looking forward to someone who has a better, more elegant solution.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
Thanks for this solution... until I get the best solution, this would work for me! I was looking for the same..
----------------------------------------------------------------------
T Manjaly
C# Tutorials and samples : http://www.dotnetspider.com
|
|
|
|
|
You're welcome... glad to be of assistance.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
can i develop applications with c# that run on windows 98,me,nt4 ???????
i didn't find framework that works on these operating systems.
this is so imp. for me
thnx in advance
|
|
|
|
|
.Net is not supported on NT4, ME ore win98, so the answer is no.
Power corrupts and PowerPoint corrupts absolutely. - Vint Cerf
|
|
|
|
|
That's simply not true!
Microsoft .NET Framework can be installed on the following OS (hence applications will run on these operating systems):
Microsoft Windows® 98
Microsoft Windows NT® 4.0 (SP 6a required)
Microsoft Windows Millennium Edition (Windows Me)
Microsoft Windows 2000 (SP2 Recommended)
Microsoft Windows XP Professional
Microsoft Windows XP Home Edition
HOWEVER! ASP.NET is NOT supported on anything below Windows 2000 ..... and the Visual Studio .NET 2003 will NOT install on anything below Windows 2000. But ALL compiled applications will run happily on anything above and including Windows 98
|
|
|
|
|
I can vouch for that; I've run a .NET program fine on a Win98SE computer.
|
|
|
|