|
Message Closed
modified 27-Apr-15 11:21am.
|
|
|
|
|
You can add new column in this way..
ALTER TABLE Student ADD Age NVARCHAR(20) NULL
|
|
|
|
|
Hi
In my project i need to implement icon overlay for selected files and folders in a file system.When u right click on a file/folder and select a context menu the icon of the file/folder must be overlayed with a small icon.
I am new to windows shell programming and dont have enough time to do R&D.Searched the net but couldn't find any solution.Found one solution in DotNet247.com but it's not complete code.
can anyone help me.If possible post the code.
Regards
Krishna Choudary
|
|
|
|
|
I know it's a stupid newbee question, but I have looked everywhere and can't find the answer....
I know how I get data from a dataset to a datagridview but how do I get data from a dataset to a textfield?
My code:
private void loadFakturaVis()
{
try
{
//create a connection string to the access database
OleDbConnection cn = new
OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;
User Id=;Password=;
Data Source=" + myDB);
// Create the DataSet
ds = new DataSet("FakturaOrdre");
// Fill the Dataset with Kunder, map Default Tablename
// "Table" to "Kunder".
da = new OleDbDataAdapter("SELECT Kunder.KundeId,
Kunder.Navn,Faktura.FakturaID, Faktura.KundeID, Ordre.OrdreID,
Ordre.FakturaNr, Ordre.Antal, Ordre.VareNr, Produkter.Varenavn,
Produkter.PrisExMoms FROM Produkter INNER JOIN ((Kunder INNER JOIN Faktura
ON Kunder.KundeId = Faktura.KundeID) INNER JOIN Ordre ON Faktura.FakturaID =
Ordre.FakturaNr) ON Produkter.VareNr = Ordre.VareNr WHERE FakturaID=@fakid",
cn);
da.SelectCommand.Parameters.Add("@fakid", OleDbType.Integer);
da.SelectCommand.Parameters["@fakid"].Value = fakid;
da.TableMappings.Add("Table", "Ordre");
da.Fill(ds);
// The DataViewManager returned by the DefaultViewManager
// property allows you to create custom settings for each
// DataTable in the DataSet.
dsView = ds.DefaultViewManager;
// Databinding for the Grid's
dgrOrdre.DataSource = dsView;
dgrOrdre.DataMember = "Ordre";
}
catch (Exception ex)
{
MessageBox.Show("Exception" + ex);
}
}
Now I want to do following:
Nu vil jeg så gerne lave følgende i min kode:
//Databinding for the fields
txtNavn.Text = ????????
Now I want to get the FakturaID from the dataset and put into the the textfield txtNavn.Text - but I don't know what I shal put in the place of my questions.
Kind regards,
simsen
|
|
|
|
|
try
txtNavn.Text = ds.Tables[0].Rows[0]["FakturaID"].ToString();
rahul
|
|
|
|
|
Thank you very much. That was exactly what I needed
Kind regards,
simsen
|
|
|
|
|
Can any body tell me how to delete text from a PDF file?
Regards,
Prati
|
|
|
|
|
The reason documents are published as PDF files is to guarantee the sanctity of the document. Especially when publishing something that has legal implecations (like an employment application) over the internet. You must have the Adobe Acrobat 7.0 and you probably need to be recognized as an authorized author of the document.
|
|
|
|
|
Thank you very much for the reply.
The following is the c# code where I'm trying to delete the text. Can you please tell me, what code to put in, in order to delete the text. I need this immediately.
Acrobat.CAcroPDDoc pdfPDDoc;
Acrobat.CAcroAVDoc m_objAVDoc;
Acrobat.CAcroPDTextSelect txtSelect;
Acrobat.CAcroHiliteList highlistList;
Acrobat.CAcroPDPage page;
pdfPDDoc = (Acrobat.CAcroPDDoc) Microsoft.VisualBasic.Interaction.CreateObject("AcroExch.PDDoc", "");;
m_objAVDoc = (Acrobat.CAcroAVDoc)Microsoft.VisualBasic.Interaction.CreateObject("AcroExch.avdoc", "");;
highlistList = (Acrobat.CAcroHiliteList)Microsoft.VisualBasic.Interaction.CreateObject("AcroExch.HiliteList","");;
private void cmdSetText_Click(object sender, System.EventArgs e)
{
m_objAVDoc.Open(@"D:\PDF\landscape_page.pdf","TEST");
pdfPDDoc.Open(@"D:\PDF\landscape_page.pdf");
bool existedtext=m_objAVDoc.FindText("3.2.S.1.3 General Properties",1,1,1);
if (existedtext== true)
{
//pdfPDDoc.DeletePages(0,0);
pdfPDDoc = (Acrobat.CAcroPDDoc)m_objAVDoc.GetPDDoc();
page = (Acrobat.CAcroPDPage)pdfPDDoc.AcquirePage(0);
highlistList.Add(12,28);
txtSelect = (Acrobat.CAcroPDTextSelect)page.CreatePageHilite
(highlistList);
m_objAVDoc.SetTextSelection(txtSelect);
m_objAVDoc.ShowTextSelect();
}
pdfPDDoc.Save(1,@"D:\PDF\landscape_page.pdf");
m_objAVDoc.Close(0);
}
}
|
|
|
|
|
Hi all!
I would like to detect that a form has stopped moving. Detecting a move start is very easy, simply the first enter in Form.onMove indicates the starting of the moving Form.
But how do i detect that the Form has stopped moving, onMove isn't called a final time when the Form has stopped moving. Can someone help me out?
Cheers, Richard
|
|
|
|
|
I'm using VS2003 and the event Move comes at the end of moving.
|
|
|
|
|
I tried it out, but it is not exactly what i'm looking for.
I'm trying to detect when the user releases this mouse button and drops the Form.
|
|
|
|
|
Hello,
Maybe you should set a flag if the Movement is done.
Then you should watch MouseUp Event. If the flag was set before then you should know that movement is finished.
Hope I helped you
All the best,
Martin
|
|
|
|
|
That is also a sollution i thought up. The problem is that i'm using one Form to draw another. So i have to pass the MouseUp event from one Form to the other Form, looks like a new quest... any hints on how to do that?
|
|
|
|
|
Oooooooook,
Is this next asumption correct?
Form1 is your main Form.
Form1 creates an instance of Form2 during runtime.
So which is now the Form to move?
Should there be an effect on the "not moved Form" by the "moved Form"?
|
|
|
|
|
Yes, your assumption is correct.
Form1 is a with with some transparency and layered window effects. It creates Form2 that has some ordinairy controls. Form2's location is linked to Form1, so when Form1 moves Form2 also moves. When moving Form1, the OnMove event of Form2 is launched so that goed allright. The problem is that is can't seem to get a OnmouseUp/Down/Click event on either Form1 or Form2
The reason for trying to detect the starting en stopping of the Form movement is that i'm trying to emulate the transparency of a Listview. The Listview has a backgroundimage of the underlying desktop. When the Forms start to move i'll set the backgroundimage to none. When the Forms stop moving i'll recreate the underlying background image of the Listview.
-- modified at 7:17 Wednesday 26th July, 2006
I just noticed that the OnMouseUp/Down/Click event only fires when clicked inside the form area and not when clicking on the titlebar area.
|
|
|
|
|
Maybe "LocationChanged" makes it easier for you?
<code> private Form Form2;
private bool block;
/// <summary>
/// Constructor
/// </summary>
public Form1()
{
InitializeComponent();
CreateForm2();
}
private void CreateForm2()
{
Form2 = new Form();
Form2.LocationChanged+=new EventHandler(Form2_LocationChanged);
}
protected override void OnLocationChanged(EventArgs e)
{
DoSomething(true);
base.OnLocationChanged (e);
}
private void Form2_LocationChanged(object sender, EventArgs e)
{
DoSomething(false);
}
private void DoSomething(bool flag)
{
if(block == false)
{
block = true;
if(flag)
{
Form2.Location = Form1.Location;
}
else
{
Form1.Location = Form2.Location;
}
}
else
{
block = false;
}
}</code>
Hope I got it now.
All the best,
Martin
-- modified at 7:25 Wednesday 26th July, 2006
|
|
|
|
|
Well actually the linking of the two forms goes allright, here's the code i use:
<br />
Form2.Location = new System.Drawing.Point(this.Location.X + 15, this.Location.Y + 32);<br />
It's the detection of final stop of the Forms movement when the user releases the right mouse button and the Forms settle on the desktop.
|
|
|
|
|
Hello,
I think System.Windows.Forms.Form.DragDrop should do it.
Arrives at end of dragdrop action.
All the best,
Martin
|
|
|
|
|
I've tried it and i think dat the dragdrop event only works for controls being dragged or dropped. It doesn't fire an event for Forms that are being dragged.
There has to be some sort of simple sollution, i'm thinking of creating a thread that watches the position of the Forms and generates a custom event... But i prefer a more simple sollution.
|
|
|
|
|
I want to create a tab menu - horizontal with all the tabs left justified
except for the last one which I want right justified.
|------------| |----------| |---------| |---------|
|---------| |---------|
|------------|--|----------|--|---------|--|---------|
|---------|
Thanks
bijaya
|
|
|
|
|
Hello all,
I created setup and deployed it in target machine. My main GUI application referenced several dll with CopyLocal=false at design time; Now the those dlls are placed in different folder on the target machine. when i run the application(EXE) on target machine it throws me the err "Cannot find the file(DLLNAME )". How can i tell the CLR to look the specified dll's paths.
I don't want my dlls to be installed in GAC. since it needs stuff like Strong Name,versioning. i don't want these features.
Here i have tried 2 things.
1) i have added the dlls path in Environment variable Path
2) I tried to use GUIs app.config like this
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="Common;Shared;Group"/>
</assemblyBinding>
</runtime>
</configuration>
BUT NOTHING WORKS for me . Any suggestion
Thanks and Regards,
Srini
-- modified at 3:05 Wednesday 26th July, 2006
|
|
|
|
|
You can get some information on finding your DLL here[^]. However you have a hardcoded set of paths. If you have the dll's located in any possible folder, then they should be registered in the GAC. This will also improve the performance of the load since the GAC is the first place the framework looks when it goes to load an assembly.
Personally, I'd register those DLL's in the GAC and leave it at that.
|
|
|
|
|
I am working on project in c#.net that requires desktop dialing.
Requirement: We want to connect EPABX with the Computer Server machine(which is connected to other Client machines by Local Area Network-LAN). When user initiate a event on the client machine for dialing(etc) the request goes to server machine and then server machine sends request to EPABX.
Question:
1. How we can connect EPABX with computer server.
2. How server machine send request to EPABX.
Please guide.
Ashwani
|
|
|
|
|
HI,
Anyone can tell me how to to save the doc files in C.
arun
|
|
|
|