|
Where i ll find this "axWebBrowser" class...Pls send the namespace.
Aur it's an coponent u r using...
Anuj
|
|
|
|
|
That's the variable name. The activeX browser could be found on your system. With .NET 1.1 the simplest way is that you should import that COM component from system32/shdocvw.dll. .NET 2.0 already have a web browser control for you by default from the toolbox.
-Good Luck
Jup
|
|
|
|
|
I need code to do the following in C#-
1. To display - The table of content from a pdf file in a pane on the left
side of the window
2. On clicking a topic in the table of content - It should diplay the
topic in a pane on the right side of the window.
Regards,
Prati
-- modified at 5:32 Friday 7th July, 2006
|
|
|
|
|
How to add text objects and others at run time. How to sort the fileds in report, choice of sorting field will be read from user.
Jey
|
|
|
|
|
hi all,
Sorry for posting this problem in the C# section aswell...
its just that i have been getting GREAT reply in the C# section
i have a xsl/xml Question.
<href>http://www.codeproject.com/script/comments/forums.asp?forumid=3421&select=1565540&df=100#xx1565540xx
He who laughs last...
|
|
|
|
|
Hi
I want to find out the server IP programmatically using vb or C#.
how can we do this?
My client wanted me to do a chat application where I have to specify the server IP automatically..
How can i do that?
Thanks
|
|
|
|
|
You must use the same method in MSN or Yahoo.
In your application, you must write the hostname (not host IP).
The hostname will be changed to IP automatically using DNS Server.
|
|
|
|
|
hi all,
i have some lines ine a txt file like these :
this.tabPage1.Text = "SPECIFICATIONS";
this.tabPage5.Text = "COMPANY";
this.button3.Text = " EXIT";
this.toolTip1.SetToolTip(this.button3, "Quit Application");
this.button2.Text = " DELETE";
this.toolTip1.SetToolTip(this.button2, "Delete Record");
this.button1.Text = " SAVE";
...
i read them line by line but i am not able to process them
> i mean if i read the line: this.button3.Text = " EXIT"; what should i make to change button3's text to EXIT ?
regards,
bye.
ps: its a turkish - english translation process first i copied all turkish texts in a file then copy all in another one and translated them into english.
now with a button i want to change the form language. can read anything from file but not dunno how to do the last step
|
|
|
|
|
Put each line in this method:
static string GetValue(string input)
{
string[] output = input.Split('=');
output[1] = output[1].Replace("\"", "").Replace(";", "").Trim();
return output[1];
}
For example :
input : this.tabPage1.Text = "SPECIFICATIONS";
output : SPECIFICATIONS
|
|
|
|
|
You can't execute code dynamically like that. If you were just writing scripts instead of using compiled code, it could be done.
If you split them up in texts and toolstips, you could locate the controls using the name and change them. Just save the names and texts in the file, there is no reason to have it in a code-like syntax.
---
b { font-weight: normal; }
|
|
|
|
|
Hello
You can parse and excute C# statements from text files but in your case it's not worth it. Instead you should store the names of your controls, and the the values. Then you might want to check them with if/else if statements. eg:
string MyReadLine = TextFile.ReadLine();
if(MyReadLine.StartWith("TabPage1"))
{
string temp = MyReadLine.SubString(8);
tabPage1.Text = temp;
}
else if(...
Another more advanced approach would be Reflection. Just type Reflection in your MSDN's index. Yet again I don't think it's worth it.
Regards
|
|
|
|
|
|
You could find some info on ResourceManager and Culture Classes.
I've found a living worth working for, but I haven't found work worth living for.
<marquee>
|
|
|
|
|
I made a simple report CrystalReport1.rpt which was added to my project (Add New Item => Crystal Report) I want to use the report in my project, but i don´t know how to create an instance of it...
I tried CrystalReport1 report = new CrystalReport1(); but that doesn´t work, i always get error: The type or namespace name 'CrystalReport1' could not be found (are you missing a using directive or an assembly reference?)
cellardoor
|
|
|
|
|
>Read up on how to use Crystal Reports in in VS.
You need to initialize the Crystal Reports Viewer and attach the report to it.
It's been a long time, but I remember looking that stuff up on MSDN[^].
there is an object model on there somewhere as well.
good luck.
I've found a living worth working for, but I haven't found work worth living for.
<marquee>
|
|
|
|
|
Hi,
I have applications that need to communicate with each other using HWND_BROADCAST
Here is the prototype for unmanged code function SendMessage
[DllImport("user32.dll")]<br />
extern static IntPtr SendMessage(IntPtr hWnd, int msg, MyClass myClass, IntPtr lParam);
where WParam is passed as an object reference.
In the overriden WndProc method on the other application, the WParam variable is marshaled back to the original object like this
protected override void WndProc(ref Message m)<br />
{<br />
if (m.Msg == CommonMessageID)<br />
{<br />
...<br />
MyClass myClass = (MyClass)Marshal.PtrToStructure(m.WParam, typeof(MyClass));<br />
...<br />
}<br />
base.WndProc(ref m);<br />
}
However, it does not hold the information that was initialized by the other app. What did I do wrong here?
Jup
|
|
|
|
|
Hi!
You cannot simply stuff an object into an arbitrary SendMessage call and expect it to appear unchanged at another application.
SendMessage is sending pointers as parameters (wPar, lPar), but these pointers point to an adress in the current process adress space!
You can transmit simple datatypes (int) that way but no objects. In Win32 there's a special message WM_COPYDATA that's used to transfer data from one process to another, but I strongly doubt that this will solve your problem.
For transfering objects (or rather object references) you should use .NET Remoting.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Thanks, you're right. I forgot about address space. Should I access other's process address space to read/write data?
Jup
|
|
|
|
|
i havea function in my app called CheckStatus. This take no prameters and returna a boolean value as the result. I am using it in a if..else statement like this:
if (CheckStatus() == true)<br />
else<br />
Now what happening is that CheckStatus function takes some time to process and due to this my UI becomes non responsive. How can i acheive the above functionality by putting it in a separate thread. I'm pretty new to using Threading so it'd be great if someone could explain in a bit of detail. Thaks in advance!
|
|
|
|
|
Create a new thread to process time-consuming tasks.
Here is a simple example
using System.Threading;
...
ThreadStart ts = new ThreadStart(DoWork);
Thread t = new Thread(ts);
t.Start();
...
void DoWork()
{
// do my work here
}
Check out more at at Threading articles on here or MSDN Lib.[^]
Jup
|
|
|
|
|
I use to do it like this:
class SomeClass<br />
{<br />
public Routine1()<br />
{<br />
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;<br />
<br />
workDone = false;<br />
<br />
ThreadStart ts = new ThreadStart(DoWorkWithStatusChecking);<br />
Thread t = new Thread(ts);<br />
t.Start();<br />
<br />
while( ! t.IsDone this.workDone )<br />
{<br />
System.Windows.Forms.Application.DoEvents();<br />
Sleep(0);<br />
}<br />
}<br />
<br />
bool workDone = false;<br />
<br />
void DoWorkWithStatusChecking()<br />
{<br />
if( this.Status )<br />
{<br />
}<br />
else<br />
{<br />
}<br />
<br />
this.workDone = true;<br />
}<br />
<br />
bool CheckStatus()<br />
{<br />
<br />
return ( true | false );<br />
}<br />
}
Note: routine1 is not reenterable and must be guarded by some sort of guard condition in the beginning!
got the idea?
Alexei.
|
|
|
|
|
hi, i want to creat a custom database which will read data from an unknown file format(made by me) and it will not use any database server...how will i do it? plz help me to solve that..
|
|
|
|
|
|
Hi,
I have the following problem.
When the dialog opens I set up a bunch of combos with database values. After loading them, I set a default value. This all works except for 1 combo (first value gets selected). The strange thing however, is that I have a reset button, which does the exact same thing and then suddenly that default value is set correct.
That combobox is loaded dependent on the contents of the previous one, but I'm sure he does not come in the selectedindex_changed event after the default value was set. (I checked this).
I also compared the properties of the different combo boxes. They are the same.
Can anybody help me on this issue?
Thanks !
I've found a living worth working for, but I haven't found work worth living for.
<marquee>
|
|
|
|
|
I have a function in cpp file returning int * array and taking int * array as a parameter. It is as:
int * funcArg(int *a ) {
int DLLArg [] = {100,200,300};
a=DLLArg;
return a;
};
I have exported this function in the dll (i have checked it with dumpbin.exe)
But I can not handle this function in c# client. My code in c# is as: ( ıt gives this error. "An unhandled exception of type 'System.Runtime.InteropServices.SafeArrayRankMismatchException' occurred in CSharpClient.exe
Additional information: Safe array of rank 51241 has been passed to a method expecting an array of rank 1."
What should I do? URGENT help!!!
namespace CSharpClient
{
class Class1
{
[DllImport("DenemeNonMfcDll.dll",EntryPoint="?Sub@DLLclass@@QAEHHH@Z")]
public extern static int Sub(int a, int b);
[DllImport("DenemeNonMfcDll.dll")]
[return: MarshalAs(UnmanagedType.SafeArray)]
public extern static int [] funcArg(int [] a);
public static int [] intArray = new int [3] {0,1,2} ;
static void Main(string[] args)
{
foreach (int num in funcArg(intArray) )
{
System.Console.WriteLine(num.ToString());
}
Console.WriteLine("Press any key to continue...");
Console.ReadLine();
}
}
}
|
|
|
|