|
Wouldn't a neat and cool stored procedure that handles the Insert/Update/Deletes be more cool, elegant and robust, since you particularly mentioned about multi tables?
|
|
|
|
|
Hi All
I have a problem. I have a field that holds a country code and a combobox that has a list of of all countries. I would like to search for the country code from the combo box list of countries, get its index and display it in the combo box as the default item.
Any suggestions will be greatly appreciated.
Thanks
|
|
|
|
|
Does this help?
int nIndex = combo.FindString (field.Text);
if (nIndex != -1) {
combo.SelectedIndex = nIndex;
combo.Text = combo.SelectedItem.ToString();
} /ravi
|
|
|
|
|
Thanks Ravi it worked
Below is the final code:
private void pnlDriverAddress_Enter(object sender, EventArgs e)
{
if (Mode == eMode.Add || Mode == eMode.Edit)
{
if (cmbDACountry.SelectedIndex == -1)
{
int nIndex = cmbDACountry.FindString(MDI.Country.ToString());
if (nIndex != -1)
{
cmbDACountry.SelectedIndex = nIndex;
cmbDACountry.Text = cmbDACountry.SelectedItem.ToString();
}
}
}
}
|
|
|
|
|
Hello everyone,
I have a WebBrowser control in my Windows Application. If I am not mistaken the WebBrowser control is just the parsing engine of the browser.
I would like to transform the WebBrowser control into a full-fledged browser like Microsoft® Internet Explorer, and like to add a custom tool bar with new feateures (buttons) for the custom built tool bar. If I am not mistaken that sould be done using Browser Helper Objects (BHO).
I was wondering if anyone canbe kind enough to point me to the right direction for this project.
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
Khoramdin wrote: If I am not mistaken the WebBrowser control is just the parsing engine of the browser.
No, it's also a full-fledged renderer and controller.
/ravi
|
|
|
|
|
how i can connected to USB barcode scanner ?
And read barcode from this device programming
123
|
|
|
|
|
Most barcode scanners act just like a keyboard and will send the data scanned directly to the control that has the focus without any programming. If yours is different, consult the manufacturer's documentation.
|
|
|
|
|
thanks. but i meaning my programm read from scanner by timer.because some time lost focus of control
then barcode can't send data to control(Textbox)
123
|
|
|
|
|
|
i have big probelm when you used Localiztion
these my code:
public Form1()
{
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("ar-eg");
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ar-eg");
InitializeComponent();
}
Form2 f;
private void Form1_Load(object sender, EventArgs e)
{
f = new Form2();
f.MdiParent = this;
f.Show();
f.BringToFront();
}
when Maximized Form(f) then Minimized and
then Maximized Form(f) send to back and i can't see my form2(f)
123
|
|
|
|
|
Hi there.
I urgently want to have my c# app running in a firefox session as a
plug-in. There is this one article describing how to implement an
OpenGL sample as a firefox plugin[^] but that one is for C++ only.
How to achieve the very same for some C# app ?
|
|
|
|
|
The plug-in itself will have to be in native code. From there, have your plugin load a control from your .NET app and display it in the window.
|
|
|
|
|
Yes, that's what i thought myself so far.
I'm just installing my old dust-bitten copy of MSVC++ 6.0 to do this.
So there is no easier way to achieve what i'm asking for ?
As i wish to have my app running as a plug-in for FF and IE as well,
i suppose i'll end up having THREE projects:
The main app itself, written in C#,
the app compiled as ActiveX user control, so it can be plugged into IE,
the app compiled as dll, wrapped into C++ code, so it can be plugged into FF.
Correct ?
|
|
|
|
|
I'd have 4 projects:
1. Your main code containing the controls you want to display in .exe/IE/FF. This is a dll.
2. A main application that runs your app as a standalone program by loading the above dll into a Windows Form. This is an exe.
3. The Firefox plugin that loads your dll into Firefox.
4. The IE plugin that loads your dll into Internet Explorer.
gordon24 wrote: I'm just installing my old dust-bitten copy of MSVC++ 6.0 to do this.
I don't think that's necessary; the latest Visual C++ 2005 should work fine.
|
|
|
|
|
Of course, you're completely right about having FOUR projects,
also i regonized, but too late, that the OpenGL FF plugin sample
was done using VC++ 2005 ...
Well, let's see, if i'm now finally able to get things working ...
|
|
|
|
|
I don't know how to do that or even if it is possible. If I did need to know I would go to the Mozilla Developer Center for Plug Ins and read the documentation to acquire the knowledge.
|
|
|
|
|
Hi,
How can i get whether a selected node in a treeview with to levels, a child or a parent node is?
|
|
|
|
|
The ChildNodes property tells you if the node has any children. Does this help?
/ravi
|
|
|
|
|
You can also go upward:
<br />
System.Windows.Forms.TreeNode node = theTree.SelectedNode;<br />
System.Windows.Forms.TreeNode nodeParent = node.Parent;<br />
if (nodeParent.Parent == null)<br />
return;<br />
|
|
|
|
|
I am writing a small application to open windows (Internet Explorer in this case) from within the application. I am using the System.Diagnostics.Process to do this. My question is, is there a way to either open the application on a secondary monitor, or move it once it is open. I would assume this is done with a call to some windows api functions. Would anyone care to shine some light on this for me.
|
|
|
|
|
In case anyone is interested, I am working with lazy managers and on bootup they want the machine to open 2 ie windows in full screen on 2 seperate monitors (we use some pages to monitor production).
|
|
|
|
|
This[^] may help get you on the right track.
|
|
|
|
|
Hi,
I have a form with some textbox controls.I am using a bindingsource to bind data to these controls.
For Example, i use
txtbx.DataBindings.Add("text", bindingSourceName, "Ds_Column_name") to bind data to the control.
This works fine and i could see the data.
Now, i have one more form with a datagrid and in the Grid_DoubleClickCell event i am taking the value of a column of the activerow.Here in this Doubleclick event i have declared an object of form1 and passing the activerow value to the constructor in form1.
Following is the one i am talking about:
string wrNumber = Grid1.ActiveRow.Cells["WR_NUMBER"].Value.ToString();
uiJobs uiJobsObject = new uiJobs(wrNumber);
Now, in form1 constructor i have written this:
public uiJobs(string wrNumber)
{
LoadDataSet(....);
BindControls();
}
private void BindControls()
{
bindingSource.DataMember = ".....";
bindingSource.DataSource = ds;
txtbx.DataBindings.Add("text", bindingSourceName, "Ds_Column_name");
}
Now, here the i am getting nothing..I am unable to bind data.....
Could please anyone help me out.
Thanks,
Pavan.
|
|
|
|
|
Hi everyone,
I have a little problem and I feel like the solution is in front of me but I just can't make it happen.
I haven't googled it yet, just because i don't know how to search it, but I'm looking for it in the MSDN Forums (Searched MDI in forums and reading the topics whichever looks close to solution.) and I was unable to find something for the problem.
The problem is I have an MDI form and I show a dialog which offers you some options and when the user clicks the button a new dialog appears.But I couldn't find a way to set the MDIParent property for the form that is called from the child.So the new form appears independent from the MDIParent.
What I've tried is:
I tried overloading the Form.Show(this.MDIParent)
I've created an instance of the MDI form in the Grandchild(?) form. I've tried to set the this.MDIParent = MDIMain but it just didn't work.
I've tried this.AddOwnedForm(Form)
So, surprisingly, none of them worked.
It'd be really nice if you could help me through or hold my hand and take me to the neverland. =)
Thanks.
|
|
|
|