|
Yes, I have tried that. Although that works when I use dialer.exe (with WinXP), it doesn't work when I use my application to dial with.
Thanks for the response anyway.
|
|
|
|
|
how would i go about creating an editable menu like the way you create menu/s in .NET IDE ?
want to have a small app where user can modify menu on a per user basis. was just going to have a form where they selected the parent menu, the action and the menuitem text but thought i may give this a try
kind regards,
g00fy
|
|
|
|
|
Hi!
I'm looking for information about secure remoting. I hope someone out there could help me with some good links to such information.
Thank you!
|
|
|
|
|
Our trusty friend Google: clickety
Especially the first hit.
|
|
|
|
|
couple of days ago I came across an article on CP about the open source Lucene search engine ported to c#. I was impressed with the article and I wondered how many people are using Lucene in their application ? How powerful is it compared to commercial search engines such ISYS etc.
I would be most interested in reading other folks experiences with Lucene
cheers
|
|
|
|
|
I use the Rectangle to hold up the Dimension of area...
But i can't access the Left, Right,Top,Bottom properties in it...
It Says, that they are read-only...
Where the problem?
Point p = (Point)(m_Points[0]);<br />
Dimension.Left = Dimension.Right = p.X;<br />
Dimension.Top = Dimension.Bottom = p.Y;
|
|
|
|
|
There is no problem. If the compiler tells you the properties are read-only, then it's probably right.
Modifying the corners of a Rectangle can be achieved by modifying its Size and Location properties.
Regards,
mav
|
|
|
|
|
can ne1 tell me ho i'm going to do this...in an
MDI Interface, by selecting an item from the menu twice , it will mean that the system will open two instances of the item (its a form for enterin details). Even i should be able to swap between these forms at root level using the ALT TAB key. Also, i should not be able to open multiple child forms under a main form. If a main form is closed then all the child forms should also be closed...
how can i implement such thing in my code???...ne help will be appreciated...
|
|
|
|
|
1)If you don't want to show same form more than once, then try to check the instance of required form before showing.
eg:
private ChildFrm1 insChildFrm1;<br />
<br />
private void Open_Frm_Click(object sender, System.EventArgs e)<br />
{<br />
if(insChildFrm1!=null)<br />
insChildFrm1.Activate();<br />
else<br />
{<br />
insChildFrm1=new ChildFrm1();<br />
insChildFrm1.Show();<br />
}<br />
}
the above functionality can also be achived through Singleton implimentation of your child form class.
2) Insted of Show() use ShowDialog() of form class to make only one form active.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
What object has the behavior like a vector of STL?
I'd like to access the objects like this:
a[3], a[4], and i'd like to have a dinamic array, that can grow up...
|
|
|
|
|
ArrayList
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I'm new to programming and I can't find a sample of OleDb Transactions that can rollback BOTH ExecuteNonQuery() and myDataAdapter.Update all in one try/catch statement.
I found this link that shows the ExecuteNonQuery...
http://msdn2.microsoft.com/library/h8459s0c(en-us,vs.80).aspx
Is it possible to have both ExecuteNonQuery and DataAdapter.Update in the same rollback transaction?
thanks,
Ron
|
|
|
|
|
Hello,
We are trying to marshal a simple C structure within our C# code. All values are coming across except for doubles (bolded below). A double comes across as junk. Any help you can provide would be appreciated.
Here is our C structure:
<br />
struct other_earn {<br />
short o_id;<br />
char o_desc[12];<br />
char o_tpind[2];<br />
char o_payee[31];<br />
char o_addr1[31];<br />
char o_addr2[31];<br />
char o_addr3[31];<br />
char o_hours[2];<br />
double o_amt1;<br />
short o_dept;<br />
char o_txficas[2];<br />
char o_txficam[2];<br />
char o_txfit[2];<br />
char o_txfuta[2];<br />
char o_txsit[2];<br />
char o_txsuta[2];<br />
char o_txloc[2];<br />
short o_mdt;<br />
char o_wcexempt[2];<br />
}<br />
And here is how we marshal the struct. Note that all fields except the double are marshalled without issue. We have the same problem with all our other structs:
<br />
[StructLayout(LayoutKind.Sequential)]<br />
public struct ROtherEarn<br />
{<br />
public Int16 o_id;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 12)]<br />
public String o_desc;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]<br />
public String o_tpind;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 31)]<br />
public String o_payee;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 31)]<br />
public String o_addr1;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 31)]<br />
public String o_addr2;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 31)]<br />
public String o_addr3;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]<br />
public String o_hours;<br />
public Double o_amt1;<br />
public Int16 o_dept;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]<br />
public String o_txficas;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]<br />
public String o_txficam;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]<br />
public String o_txfit;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]<br />
public String o_txfuta;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]<br />
public String o_txsit;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]<br />
public String o_txsuta;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]<br />
public String o_txloc;<br />
public Int16 o_mdt;<br />
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 2)]<br />
public String o_wcexempt;<br />
}<br />
Thanks,
Josh Lindenmuth
|
|
|
|
|
What do you mean it's not being marshaled correctly?
As in it won't compile?
As in when you try to use the structure it behaves unexpectedly?
Did you try using the MasrhalAs(UnmanagedType.R4) or MarshalAs(UnmanagedType.R8) properties? As I recall, a C double is smaller than a C# double or something to that effect. (The reason I think this is because for some reason I think that a C long is actually 4 bytes while a C# long is 8 bytes)
So try adding a MarshalAs(UnmanagedType.R4) to your Double. (R4 and R8 marshal floating-point numbers, I2, I4, and I8 marshal integers)
|
|
|
|
|
Can i create a function template in c#.if so how to do it?
Nithya
|
|
|
|
|
Only in VS.NET 2005, which is currently in beta 2.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
In C# code I declared like this:
[DllImport("mydll.dll")]
public static extern int SearchString(out double x);
And I called the function:
double m_vo2Max=1;
SearchString(out m_vo2Max);
The SearchString function is on the mydll.dll. This dll is written in VC++ and the description is here:
#include "stdafx.h"
#include <stdio.h>
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
int WINAPI SearchString (double &X)
{
FILE *F;
char szString[255];
F= fopen("C:\\ParaLimit1.tbf", "rt");
fgets(szString, 255, F);
fclose(F);
return 1;
}
I always have an error : System.NullReferenceException
Additional Information : Object reference not set to an instance of an object.
I checked and found out that the error in the code below:
fgets(szString, 255, F);
Can you help me to solve this error.
Thank you,
|
|
|
|
|
Why are you using C file handling instead of C++ ?
You should check if F is NULL, perhaps that's where the real problem is.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a console application and let's say I have another console application (native c++ and I don't have the source) and I want to run that native application with my app like I would start it in cmd.exe.
For example, say my app was named ant.bat, to run it in the console I would type the C:\antroot\ant and it would run and display it's text in that console window.
Now I want to start ant.bat (Process.Start()???) and but have it run in my console window that my managed app is running in. Because if I just use Process.Start() it runs ant.bat in a new console window and closes when execution is complete.
Any ideas?
/\ |_ E X E GG
|
|
|
|
|
Try this:
public static void launch( string name, string workingDir )
{
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = name;
process.StartInfo.WorkingDirectory = workingDir;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.Start();
System.Console.Write(process.StandardOutput.ReadToEnd());
}
You could also throw in process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; , but I don't think it's necessary.
By the way, this also answers the gcc question below.
Matt Gerrans
|
|
|
|
|
Thanks that works just as I like.
I have another question though. If, for example, I wanted to set an environmental variable with my computer I would go like this in the command prompt....
<br />
set JAVA_HOME=C:\jdk1.3.1_16
How would I do this programmicly in C#?
Thank you for your time.
/\ |_ E X E GG
|
|
|
|
|
|
|
How can I FullRowSelect in DataGrid using C#?
Jassim Rahma
|
|
|
|
|
You can use DataGrid.CurrentRowIndex = index
Hugo Migneron
|
|
|
|