cannot get control's type

Class library usage, coding and language questions.
cherry
Posts: 5
Joined: Wed Jun 06, 2007 3:15 am

cannot get control's type

Post by cherry » Wed Jun 06, 2007 1:36 pm

I want to test a menustrip on the GUI. I ran the code I attached, the program could not find the type of the control. I mean, it did find a control which text is "MenuStrip", but it didn't tell me it's a menustrip. Is there any problem? Thanks.

[STAThread]
static void Main()
{

Application.Start("C:\\000virginroot\\software\\source\\MiniTof\\MiniView\\bin\\Debug\\MiniView.exe");
Form form = Application.FindFormTitle("MiniView");
Control menuStrip = form.FindChildText("MenuStrip");
}

admin
Site Admin
Site Admin
Posts: 350
Joined: Wed Jul 05, 2006 7:44 pm

Post by admin » Thu Jun 07, 2007 3:42 pm

Please check the control name of the menu with RanorexSpy. If the control name is not empty then you should find the control with the method FindControlName().

Is your menu a .Net2.0 MenuStrip Control or a 3rd party control?

Best Regards

Gabor
Ranorex Team