|
so .net 1.1 uses black magic to enable the xp themes?
surely there must be some api call(s) to enable the styles..
//Roger
|
|
|
|
|
No, it doesn't use "black magic". The concept is simple and could be found by reading the docs for the Theme API. The manifest file (with appropriate sections) redirects any calls to a file (in this case, comctl32.dll) to a side-by-side assembly. .NET 1.1 requires that you do this before starting the application (Application.Run ) because it uses a manifest file called XPThemes.manifest (in the .NET 1.1 runtime directory) to accomplish the same thing.
This is the only way to do it in 1.0. If you don't believe me, MSDN has a couple articles outlining the same thing.
"Magic" is the art of misdirection. Theming is the art of redirection. It's all in the documentation for the Theme API.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I have an IntPtr variable, and I want to change area of memory on which he specifies? How can i do this?
Excuse my english.
|
|
|
|
|
Marshal.StructureToPtr(newContent, intPtr, true);
|
|
|
|
|
If anyone is interested, I have translated an existing example of skinned mesh to the summer release of the DirectX9 SDK and cleaned up the code so it hopefully is easier to understand. It is written in C# for VS 2003.
Download at:
http://bjoernen.ebolaget.com/directx/animatedmeshexample.zip
Feel free to comment or correct my code.
Regards, Björn.
|
|
|
|
|
hi.
I intrested but your link is broken.
can you send me project.
I realy need that.
sajjad_9k@yahoo.com
|
|
|
|
|
If you can help me with this one you are a champion. I havn't been able to find anyone that knows how to do this.
I need to loop through all embedded icons in an embedded folder and populate an imagelist. As seen below, I have an embedded folder Prud.Library.Icons.State which contains a set of icons. I would like to add all Icons in State to an ImageList regardless of their name.
Does anyone know how this can be done?
Thanks heaps.
Note: string sIconName = "Prud.Library.Icons.State.Icon1.ico";
System.IO.Stream objStream = null;
System.Drawing.Icon[] objIcon;
try
{
/*
* Stream Icon and add to ImageList
*/
objStream = this.GetType().Assembly.GetManifestResourceStream(sIconName);
if (objStream != null)
{
objIcon = new System.Drawing.Icon[1];
objIcon[0] = new Icon(objStream);
}
}
catch (Exception err)
{
throw err;
}
finally
{
/*
* Dispose of Stream Object
*/
if (objStream != null)
{
objStream.Flush();
objStream = null;
}
}
return objIcon;
|
|
|
|
|
ImageList images = new ImageList();
images.Size = new Size(16, 16);
Assembly asm = this.GetType().Assembly;
string names[] = asm.GetManifestResourceNames();
if (names == null) return images;
foreach (string name in names)
{
if (name.StartsWith("Prud.Library.Icons.State"))
{
int index = name.LastIndexOf(".");
if (string.Compare(name.Substring(index), "ico", true) == 0)
{
Stream s = null;
try
{
asm.GetManifestResourceStream(name);
Icon ico = new Icon(s);
images.Images.Add(ico);
}
finally
{
is (s != null) s.Close();
}
}
}
}
return images;
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Does anyone know how to stop a particular column within a datagrid from being resized?
Sounds simple enough but I have not been able to find anyone that knows.
Thanks for you help.
|
|
|
|
|
You can override the OnMouseMove and OnMouseDown methods and check if the user is trying to resize that specific column.
public class MyDataGrid:DataGrid
{
protected virtual bool CancelMouseAction(System.Windows.Forms.MouseEventArgs e)
{
System.Windows.Forms.DataGrid.HitTestInfo hitTest=this.HitTest(e.X,e.Y);
if(hitTest.Type == DataGrid.HitTestType.ColumnResize)
{
//lets say that you want to skip column 1
int skipColumn=1;
if(hitTest.Column==skipColumn){return true;}
}
return false;
}
protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
{
if(!((e.Button==MouseButtons.Left)&& CancelMouseAction(e))){base.OnMouseDown(e);}
}
protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
{
if(!CancelMouseAction(e)){base.OnMouseMove(e);}
}
}
ps. I don't have any idea why OnMouseMove appears like this...
Best Regards,
Daniel Zaharia
|
|
|
|
|
How DataSet can be used in Client Server Application?
In my Client Server Application I had MSDE as a Server Side Database.
It has multiple clients in the same network as multiple instances of a Windows based client side applications which directly connected to the server side database(MSDE). In the client side application, it has a data entry form. In which we can scroll through records(next previous etc.) and can insert , delete, update records. For this purpose I use a DataSet in C# and when the form loads the data is retrieved from database to the dataset and for inserting, I use NewRow() method of DataSet and after inserting called the Update() method of DataAdapter. for deleting Delete()method of DataSet. In a single machine it works fine, When using the same application from multiple machines in the same network, any changes made in one machine should not be affeced in the other machine until the form is closed and reopened, because the dataset is populated at the form load event. I want to track the changes without closing. What is the best way for doing that in this kind of application ?. Can anybody give me the detailed idea of client server database application using C#?
Thanks in advance.
Cenray
|
|
|
|
|
so you had a big problem ,
i dont know you application but you can provide the form with a button for refreshing the data and get the latest changes from the database
in the button you can use fill function from the data adapter
otherwise if you want to get the changes in the real time you have to de the foolowing :
1- create function with c++ to open a TCP socket then send a string on this soket
2- compile this function to support an extended stored procedure for sql server
3- goto the sql server then add a reference to the dll which contain the function you had created
4- create a trigger on the table you want to monitor it on add or update and call that function to send an alert to all users of your application
5- in the application side you have to open a TCP socket listner for geting the alerts from the database
then you can refresh the dataset as well as you had an alert from the database
so chose one of that solutions
|
|
|
|
|
I'm writting C# code with web project, I want delele network share file, and try it
File.Delete(host\folder\filename) but it error :
[b]Logon failed
bad username and password to logon[/b]
somebody can help me to solve it
thanks
Nho'c Ti`
|
|
|
|
|
befor any thing you should use the following path :
\\computer_name\Directory\file_name
if you use that path and the error still appear you should test you permission to sccess the target computer then try it again cuz this message mean's that you don't have access permission to that folder or file in the target computer
you can make simple test try to delete it from the windows explorer
|
|
|
|
|
I can delete it form window explorer or use application project , but with webproject I can't delete it.
Login Failed
please help me!
Nho'c Ti`
|
|
|
|
|
somebodys can help me do that?
web project: why i'm try delete it but occur an error "access denied" so that folder i had shared with full control for everyone
thanks!!!
Nho'c Ti`
|
|
|
|
|
to solve this problem you have to stop the IIS service or remove the project from the IIS (Internet Information Service) then you can delete it whithout any error
|
|
|
|
|
|
Having considerable problems in storing and retreiving data from an Access memo field into a windows form richtext control. Have seached the web for a simple answer and so far haven't fount anything. Anyone have any insight to this problem? All help appreciated.
Thanks...
|
|
|
|
|
Is the memo field storing plain text? html-formatted text? rtf-formatted text?
|
|
|
|
|
Hi Mike,
I'm using richtext. I'm sure there's a way since I've done this in Delphi. I'm new to C# and just can't seem to figure it out.
Thanks,
Bob
|
|
|
|
|
Hi NG,
how can i browse the WMI Class schema on my local maschine. I would like to fill a tree view with WMI class types registered on my local machine.
i used the following code to get the namespaces:
ManagementClass nsClass = new ManagementClass(
parentNode.ManagementScope,
new ManagementPath("__namespace"),
null );
foreach(ManagementObject ns in nsClass.GetInstances()){}
the fetched namespaces are ok, but if i try to fetch the class types with
ManagementObjectSearcher searcher = new ManagementObjectSearcher(
parentNode.ManagementObject.Scope,
new WqlObjectQuery("select * from meta_class"),
null);
foreach (ManagementClass wmiClass in searcher.Get()){}
there are only __XXXX class types, the Win32_LogicalDisk for instance is missing. Seems like i read the wrong data
Any Idea what it needs to show the display names for each class like Win32_LogicalDisk etc.?
.:[Greetz from Jerry Maguire]:.
|
|
|
|
|
Jerry,
If I understand your question correctly, the code below will grab the class names for a given namespace. Note the use of the "deep" option to force a traversal of all the classes in the namespace, not just the top-level ones. Hope this helps.
Jerry
ManagementPath nsPath = new ManagementPath();
nsPath.NamespacePath = <whatever namespace="" you="" want="">;
ManagementClass nsMgmtClass = new ManagementClass(nsPath);
System.Management.EnumerationOptions enumOpts = new EnumerationOptions();
enumOpts.EnumerateDeep = true;
string clsName = "";
foreach (ManagementObject obj in nsMgmtClass.GetSubclasses(enumOpts)) {
clsName = obj.ToString();
CbxClassName.Items.Add(clsName);
}
|
|
|
|
|
Hi NG,
i try to load and save some configuration data at startup/shutdown in my vs.net 2003 addin.
But i can't create a IsolatedStorageFileStream. The exception message is
{"Unable to determine identity of assembly." }
If i run the UserControl which is nested in a ToolWindow standalone everything works fine.
Any Idea?
.:[Greetz from Jerry Maguire]:.
|
|
|
|
|
I am building a multi-threaded application with numerous amount of threads ---- The thing is for each thread it has to be a random name and I do not know howto to create and start random named threads ----
help is greatly appreciated Thanks
|
|
|
|