|
|
How can i build a Binary Tree in C#
Pls tell me
Thanks
|
|
|
|
|
There is no binary tree class. You have to implement it on your own or look for a class in the web.
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
Hello!
Is there a way to get the desktop dpi in c# ?
I have searched the web, but got no significant informations.
Thanks,
Sovann
|
|
|
|
|
Every Graphics Object has the DpiX, DpiY properties. These allow you to get the dpi of the screen / desktop. Use the Forms Graphics Object to read them.
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
Hi,
am new to C# and .NET environ.
Any info on how to create an array of objects in C# ?
Thanks!
|
|
|
|
|
object[] arr = new object[] { foo, new object(), "111", 1, 4.5 } ;
|
|
|
|
|
I am trying to use this code to call windows API from c#.net
using System;
[sysimport(dll="user32.dll")]
public static extern int MessageBoxA(int h, string m, string c, int type);
public static int Main()
{
return MessageBoxA(0, "Hello World!", "Caption", 0);
}
But i am getting an error,
The type or namespace name 'sysimport' could not be found (are you missing a using directive or an assembly reference?)
Am i missing something?
Thanks
Leela
|
|
|
|
|
|
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern uint MessageBox(IntPtr hWnd, String text, String caption, uint type);
|
|
|
|
|
Thank You somanova.
This command is working good
|
|
|
|
|
Hi.
I’ve searched for articles of how to implement my new .NET dll in my old MFC application. Firs of all – Is It possible. If I am really glad for tips on how to do it.
All tips are welcomed!
_____________________________
...and justice for all
APe
|
|
|
|
|
Hi all,
I have created setup program and C# program for conditionally creating shortcut in Desktop and Quick Launch. I could run many forms from that shorcut icon. I want to run a new application file from that icon. How is it possible? I have added that exe file in setup file's folder, but it is not run from that icon. How can i refer that exe? Pls help me to solve this.
Lisa
|
|
|
|
|
Check whether the shortcut points to the exact path of Your exe. Right click the shortcut - find target.
|
|
|
|
|
Thanks for your response Mr. Sathish.
Yes, i cheked the property of that shortcut. It shows the the C# program's exe's path.
1. I created Setup file for my application's exe.
2. I created C# application file for creating conditional shortcut for that setup file.
3. Now the shortcut is appeared in the desktop(if i select create destop in setup wizard during installation). But it doesnt run my application.
4. For running my application we need to know the path given by the user during installation. Because exe of the application and exe of the solution is stored in that path itself.
5. If i find that path by any C# method, i can run my application's exe.
Lisa
|
|
|
|
|
You could get the App installation path using these
Application.StartupPath or
Application.ExecutablePath
|
|
|
|
|
Hi all,
Is there any way to hide the Caption bar in a form?
I have seen a few applications who have removed the caption bar and or exchanged it with another bar, and was wondering on it can be done if at all?
cheers,
Mark
|
|
|
|
|
Set the property FormBorderStyle to none. This should remove the caption bar. Then you can create one on your own.
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
I have this problem I have been stuck on for ages!Can anyone help me out please??
I have a treeview. The nodes of this treeview are paths to a file that is to be showed in a webbrowser. When I click the link/node an html page is showen in the browser. Within this html-document there are internal links that are identified by the # sign. When the link is clicked the path will look like this:
file:///C:/Documents%20and%20Settings/froy/My%20Documents/Visual%20Studio%202005/Projects/TabHelp/TabHelp/bin/Debug/Teknisk.htm#lagring
You can see on the last part that "lagring" is a headline further down in the document Teknisk.htm. This means that when the root node is clicked the main document will be displayed (Teknisk.htm) and when the childnode is clicked it will jump down to the headline "lagring" using internal linking.
How is it possible to interpret the path including the # sign?
I get the path using the GetFullPath()- method, but when I include the # transform it to %23 (the hex) which is not interpretable by the browser.
Is there any possibility to get the full path including the last fragment and pass it to the browser?
Pleeeaasee help me.. this has tormented me for so long.
Thanks in advantage
Freya
|
|
|
|
|
The URL will work perfectly fine with the # sign. If for some reason the # is changed to %23, can't you change back %23 to the hash sign?
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
No.. unfortunately it doesn't.. it just stays as the %23 even if I hardcode the # using hex, ascii and whatever.. I have no more ideas left
Freya
|
|
|
|
|
I'm trying to create an instance of an object in a DLL dynamically and invoke a method on it, but an exception is thrown at the call a = Assembly.Load(absolutePath);
Assembly a = null;
string relativePath = @"..\..\MathHelper.dll";
string absolutePath = Path.GetFullPath(relativePath);
try
{
a = Assembly.Load(absolutePath);
Type mathHelperType = a.GetType("Vikram.MathHelper");
object mathHelper = Activator.CreateInstance(mathHelperType);
The exception message is
Could not load file or assembly 'c:\\vikram\\dotnet\\TypeReflection\\TypeReflect
ion\\MathHelper.dll' or one of its dependencies. The given assembly name or code
base was invalid. (Exception from HRESULT: 0x80131047)
The file is indeed there, and it is compiled under .NET 2.0, as is my code. From my VS command prompt, when I run ildasm c:\\vikram\\dotnet\\TypeReflection\\TypeReflection\\MathHelper.dll , it opens the DLL perfectly fine. What am I doing wrong?
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
Vikram A Punathambekar wrote: Assembly.Load(absolutePath);
Common mistake, dumb method naming. Use Assembly.LoadFile()
|
|
|
|
|
Thanks, leppie.
I feel like a dork - Only 10 minutes before I typed that code, I used the LoadFile() method. I either forgot, or it was a case of oversight - neither of which is good.
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
Same thing happened to me a week ago
|
|
|
|