|
Sorry, This code is Managed C++. Just replace the -> with . and remove the * and its c#.
|
|
|
|
|
I have a windows application called X, I build it, and evidently I can run the executable X.exe.
But now, I build this application to a X.dll; and I want to load that X.dll from another application YYY.EXE, and start the X-application.
I tried in Y:
Assembly assemblyX = Assembly.Load("X"); // works
Type typeX = assemblyX.GetType("namespace + classname"); // works
MethodInfo methodinfoCOnstructor = typePlannet.GetMethod("?"); // ?
How can I start application X?
Thanks!
|
|
|
|
|
I just found it myself:
Assembly assPlannet = Assembly.Load("Plannet");
Type typePlannet = assPlannet.GetType("Conseur.Plannet.PlannetClient");
MethodInfo methodinfoMain = typePlannet.GetMethod("Main");
Object obj = Activator.CreateInstance(typePlannet);
Object[] args = new Object[1];
methodinfoMain.Invoke(obj, null);
|
|
|
|
|
I'm using ODBC to connect to an AS400 DB2 tables. I need also to get full information of each table, e.g. created date, last modified date, modified user Id, table actual size, etc?
Jassim Rahma
|
|
|
|
|
Can I have multi columns in a comboBox?
Jassim Rahma
|
|
|
|
|
Nope. You'd have to make a new class and then inherit from ComboBox. Then do OwnerDraw.
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
If I have the following string :
CCCAABAAABC
and I neet to loop to replace all A to Z, all B to Y and all C to X. How can do it? can I have a sample code please?
Jassim Rahma
|
|
|
|
|
StringBuilder str = new StringBuilder();
str.Replace("A","Z");
str.Replace("B","Y");
str.Replace("C","X");
Hope that helps.
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
Hi,
Our police department want to use the Win CE to allow the police me outside to check the status of a card or drivng license without calling the traffic department. I need to know the following please (note: this can be win or web application):
1. Do I have to connect to the Win CE to internet to get the data or I can connect to the police department network?
2. Any one can give his suggesstions on this plan?
Jassim Rahma
|
|
|
|
|
Several Police Departments are already doing this. I know at least one in Maryland, USA is - you'll have to search the net to find information on it but if you find an article I bet it would save you a lot of design work
As far as hooking to internet - that's probably the easiest way since so many 3rd pary hardware & wireless solutions exist. You can then send private Packets to the police dept servers. Not sure what you mean by or I can connect to the police department network?, if you mean private dial up into secure network, forget it I'd say - too slow & error prone. Just go through internet using secure sockets.
Good luck, and let us know how the project is coming along...
|
|
|
|
|
|
I'd say use the internet (using GSM or whatever the US mobile equivalent is), you'd need a big transmitter on you handheld otherwise - local wireless solutions are not powerful enough for city use.
secure sockets obviously and also make sure that it can't be abused eg - lunatic checking the name of good looking girl in car going by - so test test test and no real data available until you are satisfied.
Technically speaking the dictionary would define Visual Basic users as programmers. But here again, a very generalized, liberal definition is being employed and it's wrong - just plain wrong - Tom Archer 5/12/02
|
|
|
|
|
How can check the screen resolution of a system to make sure it's 800X600 and if not change it to 800X600 but change it back when closing without prompting the user to confirm?
Jassim Rahma
|
|
|
|
|
I don't know about changing the resolution, but to check it use Screen.
|
|
|
|
|
I have a Windows Form application that helps build a XML file which has a menu item to make it perform a translation to another format (MC in my case).
I would like this application to be usable at the command line, like in a batch file, so it can be included in a build process. Obviously, I don't want any windowing when run from the command line. To achieve this trick, I simply check if there is some command line parameters. If there is no command line parameter, I start the Windows form.
I modified the main fuction from:
static void Main()
{
Application.Run(new MsgEditorMainForm());
}
to
static void Main()
{
string[] cmdLine = Environment.GetCommandLineArgs();
if (cmdLine.Length > 1)
{
Console.Out.WriteLine("MessageEditor: Translation from <" + cmdLine[2] + "> to <" + cmdLine[3] + ">");
}
else
{
Application.Run(new MsgEditorMainForm());
}
}
(error handling stripped for clarity)
The problem is that the Console.Out.WriteLine... don't produce any output, even if I start the application from a command prompt.
What is wrong?
|
|
|
|
|
|
I have found the solution: change your project settings from "Windows application" to "Console application". There is one drawback though: There will be a command window even when the application is in the "Windows Form" mode.
|
|
|
|
|
|
oops sorry leppie. 
|
|
|
|
|
Is there a way to synchronize the vertical scrollbars between two controls, so that as you scroll up and down in one you also scroll up and down in the other? For example, a ListView and a DataGrid sitting side-by-side, or two ListViews.
Thanks
Maureen
|
|
|
|
|
I am having a great deal of trouble with what on the surface seems simple. I am writing a Component (not a Control) which needs to access the Form on which it is contained,
<br />
public class Resizer : System.ComponentModel.Component<br />
{ <br />
public Resizer(System.ComponentModel.IContainer container)<br />
{ <br />
container.Add(this);<br />
InitializeComponent(); <br />
<br />
Need to get the form ......<br />
I need no designer interface hence the inheritance from Component. Does anyone have any ideas of how to get the Form? I have looked at ISite and tried
<br />
<br />
Form c = (Form)this.Site.GetService(typeof(Form)); <br />
<br />
I wish to emulate the design time appearance of the timer component so explictly don't want to inherit from Control and set Visible to false

|
|
|
|
|
Yeah, I had this problem too. But I never found a solution, I got round it another way that isn't applicable to you unfortunatly.
Come on everyone! Someone out there must know how to do this *very* useful thing.
Pete
Insert Sig. Here!
|
|
|
|
|
Pete,
Thanks for the reply......The damn thing must be possible!!!!
I'm not glad, but you know what I mean, that others have hit the same brick wall and I'm not just incapable of reading MSDN etc..
It was a pain in ATL but at least it was a pain. I expect the feature is not documented, but is present. I have tried reflection but there is so must to reflect upon that mist starts to fall!!!
Do you know of a way to contact Microsoft or any articles on the component/site/container architecture. MSDN seems only to have a very sparse collection and any info on querying the IContainer via the ISite is simply lacking.
Charles
|
|
|
|
|
|