|
I see, thank you.
Matthew Hazlett
Windows 2000/2003 MCSE
Never got an MCSD, go figure...
|
|
|
|
|
Hey
I got a ListView(as controller) there I change the background color of induvidual items with theres sub items.
I use this
addItem.BackColor = Color.DodgerBlue;
addItem.ForeColor = Color.White;
This ListView is in a Client application.
When i starts up 3 clients and one server on my computer and then login on the fisrt client, the ListView(as controller) is updating and al looks good,
but when i login on the second client this client's listwiev is not drawing the listview(as controller) items/subitems right. Its just painting some of the subitems.
When i drag a window over the clients listview(as controller) it updates it self and i can se the right bakground colors again.
How do i fix this problem? i have tryed to use update and so on on the controler(with the listView) but its not fix the problem.
Pleas any ides?
//Jimmy
|
|
|
|
|
I've been looking at the platform SDK, and what I have at the moment in terms of code. I think it was actualy solved a while ago, it just didn't match what the documentation states.
FOr some reason, the zero value of the STRRET that is returned from my method appears to be correct and functioning.
The string returns a full path if I set the NORMAL flag, with a square charachter on the end, and simply a square charachter if I set the INFOLDER.
The problem I have is, if I am getting the object name, where is the square charachter comming from? How does the full path that is returned get generated? The square value would be where the name of the object should be, say a file or something. The odd thing is, it appears to not realise it's actualy looking for a folder.
Normal Flag:
@"C:\Documents and Settings\All Users\Desktop\?"
INFOLDER Flag:
@"?"
where the question mark is the square charachter.
Any ideas why this is the case? And why I can't seem to get the folder value returned?
Cheers
Cata
|
|
|
|
|
|
This little sqaure character is most likely the string termination character, ASCII value 0.
It is VERY common throught the Win32 API to pass strings with a null termination character, ASCII 0.
RageInTheMachine9532
|
|
|
|
|
So if I correctly understand the post an SDK function is called which returns a STRRET that ends with a "square" character instead of an expected "question mark."
Research into [C# Spec Escape Sequences] reveals "\?" is most likely not a valid escape sequence for a "square" character.
Additionally, the @"" preceeding the string means to treat the string verbatim, i.e. to not process escape sequences.
Have you tried to remove the verbatim @"" and use escape sequences, i.e. each \ in the call string becomes \\ ?
What SDK function are you calling? Can you post a code example?
Sincerely,
-Ron
|
|
|
|
|
Hi Guys
I need your help. (please...) I don't know if my question is on the correct newsgroup.
I created a C# program that listen to another computer get the data and save it to SQL server databse using his port number. I need to run this program into the windows service so that it will run continously.
I don't want to use the windows scheduler. I want to create a C# program that will function as service and run my program at the same time.
Please any help or tutorials would of great help tome.
thanks in advance, specially the time.
Dabus
|
|
|
|
|
Use the search bar at the top of page and search this site to find some arrticles about how to create a windows service. Its very easy with C#.
Mazy
"A bank is a place that will lend you money if you can prove that you don't need it." - Bob Hope
|
|
|
|
|
http://www.codeproject.com/csharp/csharpsvclesson1.asp
http://www.codeproject.com/dotnet/simplewindowsservice.asp
I think these are ones...
|
|
|
|
|
I've been using the AxWebBrowser control for some time now. Lately though, it's been giving me this error message when I exit the program (after debugging).
<br />
An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in system.windows.forms.dll<br />
<br />
Additional information: Unable to get the window handle for the 'AxWebBrowser' control. Windowless ActiveX controls are not supported.<br />
Sammy
"A good friend, is like a good book: the inside is better than the cover..."
|
|
|
|
|
is it posible to catch some console input before drawing it on screen using some API functions?
thank u for help!
|
|
|
|
|
|
FileIOPermissins this class give me permissions on my application but not change permissions Physically on my drive i need to change the permissions on any folder on my drive Physically even if i close the application
|
|
|
|
|
There is nothing native in the .NET Framework to modify the Access Control Lists on Files, as far as I can find. You would have to use calls into the API to accomplish this. It would require writing up a couple dozen structure and function headers:
LookupAccountName, InitializeSecurityDescriptor, GetSecurityDescriptorDacl, GetFileSecurityN, GetFileSecurity, GetAclInformation, EqualSid, GetLengthSid, InitializeAcl, GetAce, AddAce, AddAccessAllowedAce, AddAccessDeniedAce, SetSecurityDescriptorDacl, SetFileSecurity, ...
then there's the structures that go along with them:
SECURITY_DESCRIPTOR, ACL_SIZE_INFORMATION, ACL, ACCESS_ALLOWED_ACE, ACCESS_DENIED_ACE, ACE_HEADER
RageInTheMachine9532
|
|
|
|
|
|
hi i have A Room with diementions
z=-80 to z=286
y=-66 to y=5
x=20 to x=100
i dont know what is the best type of lighting and where to put it and what is the recommended number of lighting??
|
|
|
|
|
I'm currently writing a painting method of an custom usercontrol. Is there a way to determine if the control is in designing state or at useual (runtime state) ?
public void PaintObject()
{
if (DESIGNTIME == true) DrawRectArountControl();
else DoUsualDrawing();
}
|
|
|
|
|
Sure, try using base.DesignMode().
RageInTheMachine9532
|
|
|
|
|
public void PaintObject()
{
if (true == this.DesignMode) DrawRectArountControl();
else DoUsualDrawing();
}
|
|
|
|
|
please help me, i need change a permissions folder by code not manual,i mean where permissions saved in regedit
|
|
|
|
|
Take a look at FileIOPermission class.
Mazy
"A bank is a place that will lend you money if you can prove that you don't need it." - Bob Hope
|
|
|
|
|
thank you for help me,but this class give me permissions on my application but not change permissions Physically on my drive i need to change the permissions on any folder on my drive Physically even if i close the application
|
|
|
|
|
|
What the problem really is, is that I wanted to store a function inside a namespace instead of a class, but that appearantly cannot be done. I have several very different classes witch all must use one function. I feel it would be waste of memory if I just drop the function to each class, or create an seperate class called something like MyFunctionsStoreClass that would store all the functions I might need. Is there an alternative ?
|
|
|
|
|
Yes, methods need to be inside a class. If you don't need an instance, you can add the word 'static' before the function declaration (like in 'static void blablabla()') and use it by calling ClassName.blablabla(), without the need for an instance.
Perl combines all the worst aspects of C and Lisp: a billion different sublanguages in one monolithic executable. It combines the power of C with the readability of PostScript. -- Jamie Zawinski
|
|
|
|