|
It's working fine in Intenet explorer but it is not working in Mozilla firefox.If anybody knows this solution, Please help me.
function runApp(tel)
{
var shell = new ActiveXObject("WScript.shell");
shell.run("C:\call.exe "+tel, 1);
}
Now I need to do the same from out Firefox 2.0 ( Call call.exe file from javascript )
How do I get it done.
|
|
|
|
|
Hey
I am using a windows form in an XNA Game application. The form is displayed when the user clicks on buildings or people within the game world.
However, the game stutter's when the form is been displayed. What I mean by stutter is that it pauses for a brief moment. This is ok if the camera isn't moving, but is very noticeable when it is moving. It seems to only occur when setting the form to visible (i.e. it doesn't stutter when refreshing the form).
The way I display the forms is this. When the game is first loaded, the forms are created and set to be hidden. When the user clicks on an object, the form is set to be visible. Closing the form is in fact just hiding it. I have it this way as it would be faster then creating a new form and destroying it everytime the user clicks on an object.
So, is there anyway to get rid of this stutter or is the method in which I display the form causing the issue.
Any help is much appreciated, Thanks!
|
|
|
|
|
I can't tell you anything definitively so keep in mind that everything I am about to say is a pure guess.
Benzino wrote: or is the method in which I display the form causing the issue.
I doubt that is the cause. It is likely that DirectX rendering is maximizing use of the graphics system so when you attempt to also execute the .NET framework graphics system there is contention for the limited resources that a PC has.
I have spent zero time looking at XNA and not much more with DirectX. However I would guess that to avoid your scenario the DirectX/XNA systems have there own Window/Dialog mechanisms that you should use rather than a .NET Windows Form.
led mike
|
|
|
|
|
thanks for the help. I haven't seen anything other mechanism within xna but i'm sure there most be. thanks.
|
|
|
|
|
Hi, I have a project with 2 groups of buttons and I need assign to event on click to 1 group same piece of code and to 2 group another code. Solving it some component like GroupBox or someone?
|
|
|
|
|
Hi,
you can use the same Click handler for more than one Control.
And if need be, cast sender to the right Control type to find out which Control fired the Click event.
|
|
|
|
|
Can you write that in code please? I need something like this to more powerful code:
NOW:
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
}
private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) {
}
...
Future something like this:
button 1-10_Click
|
|
|
|
|
replace button2_Click by button1_Click everywhere;
replace button3_Click by button1_Click everywhere;
replace button4_Click by button1_Click everywhere;
replace button5_Click by button1_Click everywhere;
replace button6_Click by button1_Click everywhere;
replace button7_Click by button1_Click everywhere;
replace button8_Click by button1_Click everywhere;
replace button9_Click by button1_Click everywhere;
replace button10_Click by button1_Click everywhere;
everywhere also includes code autogenerated by Visual Studio.
|
|
|
|
|
Thank you, it works. But I have got still one little problem.
I need take Button1->Text, ..., Button10->Text so I have something like that
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
textBox1->AppendText(buttonX ->Text);
}
How to change X?
|
|
|
|
|
Hi,
as I told you before, you can
cast sender to the right Control type to find out which Control fired the Click event.
In your case, cast to Button, then use its Text property.
|
|
|
|
|
can you write it in code please?
|
|
|
|
|
if you show your code, and specify its symptoms, CP members will help and pinpoint the problem(s).
|
|
|
|
|
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
textBox1->AppendText(System::Windows::Forms::ButtonBase::Text);
}
I do this code, but it still needs System::Windows::Forms::ButtonBase::Text as a static.
I think I follow your definition - you can say that in values sender and e is everything what can we need.
|
|
|
|
|
you still need to take "sender", cast it to a Button and take its Text.
|
|
|
|
|
textBox1->AppendText(this->ActiveControl->Text);
Yipee! Fairness still exists Thank you so much
modified on Sunday, July 6, 2008 4:40 PM
|
|
|
|
|
The other answer posted to this thread will work perfectly. Another option would be to create a new usercontrol for the groupbox control collection.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Hello all
I have a TabControl which has some TabPages with controls
there... (DataGridView, TextBox, Label, DateTimePicker, ...etc).
in some point of navigating in rows and filtering binding sources
the program crash and the following exception occurs:
DataBinding cannot find a row that is suitable for all bindings.
Note: I have some DateTimePickers on the form which I think the problem in.
can anyone help? please...
|
|
|
|
|
Hi,
Iam new to c#.net.Iam using windows web browser which automatically loads url from the database.It is loading allthe urls from database but i cant able to do anything in between (for eg:i need to send some data to a particular site before it navigates to another site).I am using visual studio c#.net.
My code looks like this:
SqlConnection mycon = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\hm67951\Desktop\WebBrowser\WebBrowser\webbrowser.mdf;Integrated Security=True;User Instance=True");
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter("select * from urlnames", mycon);
da.Fill(ds, "urlnames");
cboURL.DataBindings.Add("Text", ds, "urlnames.url");
btnclick();
MessageBox.Show("pageloaded");
for (int i = 0; i < ds.Tables["urlnames"].Rows.Count; i++)
{
CurrencyManager cm = (CurrencyManager)this.BindingContext[ds, "urlnames"];
long rowposition = (long)cm.Position;
if (cm.Position < cm.Count - 1)
{
cm.Position++;
//this.BindingContext[ds, "urlnames"].Position++;
if (cboURL.DataBindings["Text"] != null)
{
cboURL.DataBindings.Remove(cboURL.DataBindings["Text"]);
}
cboURL.DataBindings.Add("Text", ds, "urlnames.url");
btnclick();
MessageBox.Show("pageloaded");
}
If i remove Messagebox.show option it is showing only the last url which is loaded from the database.
Thanks in advance.
|
|
|
|
|
Hello,
could anyone solve my problem. I have application working with MSSQL Server: there is one table "goods" (id, name) and another one - "info" (id, idgood1, idgood2, info), where idgood1 and idggod2 - foreign keys. That is an example of what I want.
"Goods" Table:
id | name
---------
23 | foo1
24 | foo2
25 | foo3
"Info" Table:
id | idgood1 | idgood2 | info
-----------------------------
10 | _____23 | _____24 | inf1
11 | _____23 | _____25 | inf2
12 | _____24 | _____25 | inf3
I want to see in DataGridView such structure (first row - row header, first column - column header):
____ | foo1 | foo2 | foo3
--------------------------
foo1 | ____ | inf1 | inf2
foo2 | ____ | ____ | inf3
foo3 | ____ | ____ | ____
I select data from two tables ("goods", "info") in appropriate DataTable instances: GoodsDataTable and InfoDataTable. Then I CREATE (dynamically) one more DataTable instance - VisualDataTable, which is filled according to my needs. Then I put VisualDataTable into DataSet, DataSet into BindingSource, and, finally, BindingSource into DataGridView. It's working. Until I want to update something!
I tried to call SqlAdapter's Update method as for InfoDataTable as DataSet. But nothing happens.
In general, how should I update data in case when "visual" part of DataGridView and database structure are different..?
Another words, I take data from database, and put data into database with one table, and I edit data with another table.
|
|
|
|
|
Hi,
I'm using listview control but i dont know,how to bind that list view control with database?
|
|
|
|
|
Listview doesn't support databinding.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
I found this[^] while trying to sort out my problem but it only explains how to do it with an SQL table.
Dave Henry
-----------------------------------------
evil mastermind or genius benefactor?
NEVER trust the bunny...
|
|
|
|
|
Hi everyone.
I'm building a application and i have a problem.
I want to build a form with a progress bar and a cancel button that can be called by every form every time a use a background worker and want to show the percentage of progress.
Could any one help me?
Thanks in advance.
|
|
|
|
|
hi...
i hve a mdi form and i added 4 buttons in the mdi form. these buttons are shortcuts of child forms. when i open the child forms , these buttons are showing front, ie, the child form is behind these buttons... can any one help to sortout this..
Tnks in advance..
|
|
|
|
|
Their is a chance that you can call SendToBack on the buttons to allow the forms to be in front, but I sort of doubt it just because of how the MDI form is used. Why not just a toolbar in the MDI parent for the form switching.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
modified on Monday, June 30, 2008 5:19 PM
|
|
|
|