|
you're welcome
David
|
|
|
|
|
keep a lookout for a dictionary builder article on here in a while,
funcitonality will (initially) include:
* recursively follow links from a starting URI, (to a limit)
* build dictionary based on words from the browsed pages, word and several meanings
* generate word files for MS Word and the like
* build thesarus from generated dictionary
* merged dictionary database table to recursivley build bigger dictioanry with meaning comparisons
* multilingual translations, for word and meaning
* run from desktop client or login to web frontend
* print a formatted dictionary by word prefix
all this will hopefully be achieved using online dictionaries and translators that are already in place.
also, does anyone know how MS query string looks like for searching clip art from within office, i have a clip art library builder, using similar concept and i would like to access the clipart from microsoft. im not sure they do licence checking on there clipart as you can search them from thier webpage. perhaps i will start another thread on this soon
regs
g00fy
|
|
|
|
|
Hy,
I'm trying to create a class which sends files (common file formats - xls, pdf, txt, jpg) to
a specified printer and a specified paper slot.
My problems are:
- Doing it with Process.Start (verb "print" or "printto") is a good and quick method,
but i have to set the paper slot for each document. (Is there another possibility?)
- The function should be dynamic for all file types, that means, I do not want to make a class
for every file type (PDFDocument, TXTDocument etc...)
The best solution for me would be a function like this:
public void PrintFile(string FileName, string PrinterName, string PaperSlot)
{
...
}
Maybe there's a component or something else which is solving my problem. I'm already sick of searching...
I'm thankful for every answer.
Greez && Thx
DukeII
|
|
|
|
|
Hello,
When l got to update my database l get this error message "Missing the datacolumn 'DepartmentName' in the DataTable 'Employee' for the sourceColumn 'DepartmentName' ".
I have a database application. 2 tables. Department and Employee.
Department -> DepartmentCode (PK)
DepartmentName
Employee -> EmployeeID (PK)
Name
Surname
DepartmentCode (FK)
I have create this relationship in code using relationships in the form load event. see below:
<br />
private void frmEmployees_Load(object sender, System.EventArgs e)<br />
{<br />
try<br />
{<br />
cnn.Open();<br />
OleDbCommand cmd = cnn.CreateCommand();<br />
cmd.CommandType = CommandType.Text;<br />
cmd.CommandText = "SELECT * FROM Employee";<br />
da.SelectCommand = cmd;<br />
da.FillSchema(ds,SchemaType.Source,"Employee");<br />
da.Fill(ds,"Employee");<br />
<br />
cmd.CommandText = "SELECT * FROM Department";<br />
da.SelectCommand = cmd;<br />
da.FillSchema(ds,SchemaType.Source,"Department");<br />
da.Fill(ds,"Department");<br />
<br />
DataColumn parentColumn = ds.Tables["Department"].Columns["DepartmentCode"];<br />
DataColumn childColumn = ds.Tables["Employee"].Columns["DepartmentCode"];<br />
<br />
ds.Relations.Clear();<br />
drEmployees = new DataRelation("EmployeeDetails",parentColumn,childColumn);<br />
ds.Relations.Add(drEmployees);<br />
<br />
txtEmployeeID.Text = ds.Tables["Employee"].Rows[0]["EmployeeNumber"].ToString();<br />
txtFirstName.Text = ds.Tables["Employee"].Rows[0]["FirstName"].ToString();<br />
txtSurname.Text = ds.Tables["Employee"].Rows[0]["Surname"].ToString();<br />
txtDateOfBirth.Text = ds.Tables["Employee"].Rows[0]["DateOfBirth"].ToString();<br />
txtAddress1.Text = ds.Tables["Employee"].Rows[0]["Address1"].ToString();<br />
txtAddress2.Text = ds.Tables["Employee"].Rows[0]["Address2"].ToString();<br />
cboDepartment.Text = ds.Tables["Employee"].Rows[0]["DepartmentCode"].ToString();<br />
<br />
string departmentCode = ds.Tables["Employee"].Rows[0]["DepartmentCode"].ToString();<br />
DataRow[] departmentRow = ds.Tables["Department"].Select("DepartmentCode = '" + departmentCode + "' ");<br />
string departmentName = departmentRow[0]["DepartmentName"].ToString();<br />
<br />
<br />
this.UpdateDepartments();
} <br />
catch ( OleDbException ex )<br />
{<br />
MessageBox.Show(ex.Message);<br />
}<br />
catch ( Exception ex )<br />
{<br />
MessageBox.Show(ex.Message);<br />
}<br />
}<br />
When l click the update button, l run this code and get an error on the update.
<br />
ds.Tables["Employee"].Rows[0]["FirstName"] = txtFirstName.Text;<br />
ds.Tables["Employee"].Rows[0]["Surname"] = txtSurname.Text;<br />
ds.Tables["Employee"].Rows[0]["DepartmentCode"] = departmentCode;<br />
<br />
da.Update(ds,"Employee");
I hope someone can help me with this question. very important.
Thanks in advance,
Steve
|
|
|
|
|
I would like to know how can I design MS Money like software in C#?
|
|
|
|
|
|
Make this into a patent and you could make billions....
|
|
|
|
|
|
|
how do i populate a treeview with data from the dataset.
i dont want to populate it by writing an xml file n then populating...
just refreh the treeview everytime i enter the details in the database..how to do it?
|
|
|
|
|
Well... If I understand this correct. You have a SQL Server that can be updated with data, and a exe that sould update its treeview when something has happend in the database?
I assume your using a MS SQL server of some flaour. I would have made a insert/update trigger in the database that executes a "extended stored procedure" written in C++. The extended stored procedure could contact your application over Eg. a socket connection, pinging the exe to do a refresh against the SQL Server.
If your using MS SQL Server 2005 beta2 I'm sure you can make use of the .NET framework and do something cool with Remoting.NET from the SQL server to your app.
|
|
|
|
|
Hi can anyone tell me that how i program's My server to output as Music/Audio to Clients Like (Radio programs). in C#.NET
Sheharyar_JH
|
|
|
|
|
You can send the audio file as binaries and then save it in the client pc by the client program ...
I am not sure but try...
|
|
|
|
|
hi all,
I want to load a Windows Form1 to a panel which is in a another form2.Can I do it?.Can I set child property to form1 and do it?
thanks in advance.
|
|
|
|
|
You can not put a top level control on a control. Please use "user controls" insted. They can be added to a panel.
|
|
|
|
|
I did something like this for a tab control. I think the same thing would work for a panel control.
Dim frm As New Form1
frm.TopMost = False 'Note this line
Me.TabPage1.Controls(0).Controls.Add(frm)
frm.Dock = DockStyle.Fill
frm.Show()
Good Luck!
Have a great day!
j2associates_NO_SPAM_@yahoo.com
|
|
|
|
|
I had a simple .NET application successfully developed and deployed to a production environment.
Out client required another application, which is slightly different from the first application.
So I basically use the first application to develop the second application. I have successfully deployed the second application in my development PC, and it works absolutely fine. So I decided to deploy the application in the production.
First I deployed the application, in a PC that the login user has the administrative rights, The application was successfully deployed and it worked perfectly.
Then I try to install the application in the work stations that the login users do not have administrative rights to their PCs. When I double click my MSI, I ended up with the following error message.
“This advertised application would not be installed because it might be Unsafe. Contact your administrator to change the installation user interface option of the package to basic.”
I tried the following options
-------------------------------
- Change the Group Policies UI option to basic.
- Tried login as an administrator that PC, and tried deploying it.
- Workstations use the Active directory, and I changed the active directory UI option to basic.
I still have the same error. Please help me this pretty urgent.
|
|
|
|
|
Hello All,
We have a custom control which inherits from ComboBox, call it CC1. It also raises a custom event. We have a second custom control which inherits from CC1, call it CC2. CC2 traps the custom event raised by CC1.
If I drag 4 of the CC2 controls onto a windows form, the CC2 custom event sub gets called 4 times instead of once. The custom event CC1 is firing 1 time for each control that exists on the form. However, it is receiving the correct CC1 object as a sender argument. What am I missing here? Thanks in advance!
Have a great day!
j2associates_NO_SPAM_@yahoo.com
|
|
|
|
|
What you are describing is correct behaviour. Each instance attaches it's own sub to it's event, and since there are four instances, four events are fired.
What exactly are you trying to do?
|
|
|
|
|
Thanks Adam! Please feel free to correct me if my terminology is not accurate, but I need an "Instance" event, not a class or type event.
As an example, if I have 5 standard comboboxes on a form and I write code to trap CombBox3's click event, I only get one event firing, right?
Is this issue because my inherited Class2 has no design surface upon which Class1 resides?
What I am trying to do is set a timer which is fired when the user clears the textbox portion of a combobox. If the timer expires and the user hasn't typed anything into the textbox portion, it is reset. I raise my custom event just before resetting the text in case I want to supply some alternate text to use.
If combobox3 was cleared, combobox3 is the object passed into the event every time it fires (I pass it as a Sender object into the Custom event). If I cannot restrict the event to only the object that actually raised it, is there any way to account for it so I don't run the same code over and over for no reason?
I really appreciate your response, this project is pushing me into some areas in which I have not worked before. Thanks!
Have a great day!
j2associates_NO_SPAM_@yahoo.com
|
|
|
|
|
Hi,
As an example, if I have 5 standard comboboxes on a form and I write code to trap CombBox3's click event, I only get one event firing, right?
Correct. You clicked ComboBox3, so ComboBox3's Click event fired - you only wired one method up to the ComboBox3.Click event.
If combobox3 was cleared, combobox3 is the object passed into the event every time it fires (I pass it as a Sender object into the Custom event). If I cannot restrict the event to only the object that actually raised it, is there any way to account for it so I don't run the same code over and over for no reason?
There's one thing that's confusing me: what do you mean by "restrict the event to only the object that raised it"? When you raise the event in your custom subclass, you pass in the current instance that raised the event ("this") as the Sender argument to your event handler. Or do you want to ensure that only one method can attach itself to an event?
|
|
|
|
|
Hello Adam,
Sorry for the delay in responding. I have been sick as a dog all week and am finally recovered enough to get back on my computer.
What is happening to me is that the custom event is being raised once for each custom object. The sender object in each case is correct, it is the object that fired the event. It just fires multiple times instead of once.
Now that I am feeling a bit better, I plan to do some more testing later today. Thanks again for your help!
|
|
|
|
|
Hi!
Sorry to hear that you've been crook - hope you're feeling better!
Because of the way objects work your custom event will be fired once for each object. This is expected and normal behaviour. If I'm not mistaken, you would like to ensure that the event only fires once - across all instances of your custom combo box no matter how many there are.
If that's the case, you could create a static private boolean variable at the class level (call it, say, "fEventFired") and whenever you need to fire your custom event perform a check on that variable. Only fire the event if it's false. Once you've fired the event once, set fEventFired = true and that will ensure it never fires again:
protected void OnCustomEvent(EventArgs e)
{
if (!fEventFired)
{
CustomEvent(this, e);
fEventFired = true;
}
}
Because the variable is static it'll be shared across all instances of your class. Bear in mind that this will mean that you won't be able to fire that event again for the duration of your application. If you needed to customize this you could always create an internal static property that get/sets the flag.
Hope this is of some use to you!
Regards,
-Adam.
|
|
|
|
|
Hello Adam,
Sorry, I apperently did not communicate too well. What I want is for the event to fire once per instance. In other words, say I have 5 custom controls on the form and the event should be raised by instance3 due to some user action with instance3. I want the event to fire once for instance3.
What is happening in the above scenario is that the event is appearing 5 times (once for each control) when it is raised by instance3.
As an example, if you have 5 standard comboboxes on a form and you are reacting to the DropDown event, if the user clicks the arrow on combobox3, the DropDown event is only fired once and only by combobox3. Even though the others have DropDown events wired, nothing happens with them.
If the above worked the same way my custom control is working, the DropDown event for combobox3 would actually happen 5 times, once for each combobox on the form.
Thanks for your continued interest and discussion!
Have a great day!
j2associates_NO_SPAM_@yahoo.com
|
|
|
|
|
Hi!
Ok, that makes perfect sense now (honest! ). To raise the event on ONLY instace 3, and it fires not only for instance 3, but 1, 2 and 4 as well (for example), when you've only manipulated instance 3.
I can now conclusively say that is quite bizarre behaviour. . Can we see some code? Specifically the code for the custom implementation of ComboBox? If it's quite long, perhaps just the event definition and the code that calls the event.
Off the top of my head I can't think of a logical explanation for this. It doesn't make sense how firing one event on one particular control causes the same event to be fired by ALL instances of that control.
-Adam.
|
|
|
|
|