|
you just build an simple SELECT sql query...For this, you can refer from SQL Book Online which installed along with MS SQL.
<< >>
|
|
|
|
|
In one project,i have some forms,some form need send message to some others,so i need other forms' Hnadle,Thank you for you help!
Hello World!
|
|
|
|
|
Hi there,
This Win API might be what you need...
Hope it helps
<< >>
|
|
|
|
|
That is correct.First declare a pointer and initialize it:
IntPtr FormHwnd=IntPtr.Zero;
Then get the form handle you are looking for by using the following winapi function:
[DllImport ("coredll.dll", EntryPoint="FindWindowW")]
public static extern IntPtr FindWindow (string Class, string Title);
Hope this helps.
|
|
|
|
|
Hi there,
You should answer his thread, 'cause if you answer my thread, he'll not receive your answer
<< >>
|
|
|
|
|
Hello,
I am writing the application in the .NET Windows application using C#. I want to insert a drop down box in a column of the datagrid. So, can anyone suggest me, how can I do this?
With Regards,
Sheshadrinath.R
|
|
|
|
|
|
I have opened a Excel spreadsheet with c# by using the Excel.Application class. After I have closed the excel file in windows by clicking on the X in the upper right hand corner, the process EXCEL.EXE stil remains.???
|
|
|
|
|
Did you click on X of the main form or just close a document ?
<< >>
|
|
|
|
|
Yes, basically the user does...
|
|
|
|
|
Sorry! I've clicked on X of the main form.
|
|
|
|
|
lol, OK ... Happy Coding
<< >>
|
|
|
|
|
Sorry! I've clicked on X of the main form.
|
|
|
|
|
Hello,
Please try to do this in Closing event of the main form.
if(excelApplication != null && excelApplication.Workbooks.Count > 0)<br />
{<br />
foreach(Workbook wb in excelApplication.Workbooks)<br />
{<br />
wb.Close(false,Type.Missing,Type.Missing); <br />
}<br />
excelApplication.Quit();<br />
excelApplication.Visible = false;<br />
}
where excelApplication is an Excel.ApplicationClass object.
HTH. Cheers
Maqsood Ahmed - MCAD.net
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
Hi everyone, i have a problem indatagrid.Here is the code below and my problem is i want to retrieve the data from database on to the datagrid based on the selection of dropdowlist. After me selecting the dropdownlist option, datagrid is not displayed. Please help me where am i doing wrong.
private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
try
{
connectdb();
Cmd.CommandText = "Select * from emp order by Empno where Dept='" + DropDownList1.SelectedItem.Value.ToString() + "'";
da.SelectCommand = Cmd;
da.Fill(ds,"Emp");
DataGrid1.DataSource = ds;
DataGrid1.DataMember = "Emp";
DataGrid1.DataBind();
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
Con.Close();
}
thanx in advance
yamini
|
|
|
|
|
try this
private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
try
{
SqlConnection con = new SqlConnection("ur connection string");
con.Open();
SqlDataAdapter da = new SqlDataAdapter("Select * from emp order by Empno where Dept='" + DropDownList1.Value.ToString() + "'",SqlConnection);
//connectdb();
//Cmd.CommandText =
//da.SelectCommand = Cmd;
DataSet ds = new DataSet();
da.Fill(ds,"Emp");
DataGrid1.DataSource = ds.Tables["emp"];
//DataGrid1.DataMember = "Emp";
DataGrid1.DataBind();
}
catch (Exception ex)
{
Response.Write(ex.Message);
Con.Close();
}
|
|
|
|
|
Alright, I'm trying to integerate an IR remote control into one of my apps. I used Spy++ to try to figure out what messages were being sent to the app. The WM_APPCOMMAND message is begin sent. But this message is being sent for the every media key. i read somewhere that you ahve to use GET_APPCOMMAND_LPARAM(lparam) to get the unique media key but i dont know how to implement this in C#. I am currently overloading the WndProc(ref Message m) even and attempting to do something when the message == WM_APPCOMMAND...but again i dont know how to differentiate between the different WM_APPCOMMAND's.... Play...Stop....Next Track....Previous Track....are all the same message...help guys.
-- modified at 0:30 Thursday 22nd December, 2005
|
|
|
|
|
The Message[^] structure that gets passed to the WndProc method has LParam and WParam properties. You need to look into how GET_APPCOMMAND_LPARAM(lparam) is implemented to get the value out of the LParam property.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
figured it out, there is a lparam property in the message structure that i have to interperet AFTER i catch on the wparam property of app_command....a long int get returned. simple switch statement and i got it all working. thanks for your help
|
|
|
|
|
hi
Does anyone here can give me good sites or book recommendations for the customs controls in C#
I want to create custom control for the radio button in the datagrid where I want give the user only one option to select the items from the database
Is custom control for radiobuttonlist in datagrid is possible or not??
thanks in advance
kal13na13
|
|
|
|
|
Hello
I think it's impossible and you should choose your field as boolean and datagrid shows that as CheckBox.
for this in Datagrid TableStyle you should define DataGridBoolColumn.
for additional goto :
Styling with the DataGridColumnStyle, Part 2
Is it usefull ?
|
|
|
|
|
Hi,
I am able to draw line between two points during MouseDown and MouseUp events...
But i ve two problems over it...
1.when i handle the mouse events,the lines arenot drwan immediately...It displays the line only after i chang the focus and return back to the form..
2.The line which i ve drawn should vanish when i draw another line...
How can i do these..
Am new to this graphics section...So kindly help me...
Thanx
|
|
|
|
|
Do you draw your line in OnPaint ? That's the only place to do it. Call Invalidate() in your mouseup to trigger OnPaint.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ya i did...
Here's the code...
<br />
public void OnPaint(object sender,PaintEventArgs e)<br />
{<br />
Graphics g=e.Graphics; <br />
Pen pen=new Pen(Color.Magenta);<br />
Point p1=new Point(index1,index2);<br />
Point p2=new Point(index3,index4);<br />
g.DrawLine(pen,p1,p2); <br />
} <br />
<br />
public void mouseUp(object sender,MouseEventArgs e)<br />
{<br />
index3=e.X;index4=e.Y; <br />
this.Paint+=new PaintEventHandler(this.OnPaint); <br />
Invalidate();<br />
}<br />
public void mouseDown(object sender,MouseEventArgs e)<br />
{<br />
index1=e.X;index2=e.Y; <br />
}<br />
Kindly help me...
Its very urgent
Thanx
|
|
|
|
|
fyi. i already replied to your other post.
|
|
|
|