|
hey google it and you will find it and some apps already done that
|
|
|
|
|
Hey I see you fixed the misspelled Doclet in the subject of your first post but see how it shows up in the replies anyway? That's sort of like a Docklet hu? And that's why I did find anything but a Java reference when I googled "doclet" instead of "Docklet". Like did you notice how the C++ compiler produces an error when you omit those semicolons?
So basically you want to create a Windows Application that has similar features to this ObjectDock application? Go to the Visual C++/MFC forum and read the first post in the forum titled "How to get an answer to your question", pay attention to item #2.
See you around.
led mike
|
|
|
|
|
yes i am sorry for misspelling the word and thank you for paying my attention to the "How to get an answer to your question".
thanks
|
|
|
|
|
I am trying to use put datatable in Dataset so athat I can manuplate it .But its giving a Null Ref Exception the problem may be in lines with (-->) marked please look into it
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;
namespace Thomson.Financial.WebQA
{
public partial class frmLicenseGroups : Form
{
private SqlDataAdapter daLicGrp;
private BindingSource bsLicGrp;
private DataSet dset;
private SqlDataAdapter dLGrp1;
private SqlDataAdapter dLGrp2;
public frmLicenseGroups()
{
InitializeComponent();
this.Load += new EventHandler(frmLicenseGroups_Load);
this.btnSaveLicenseGrps.Click +=new EventHandler(btnSaveLicenseGrps_Click);
}
void LoadLicGrpDataGrid()
{
DataTable dt = new DataTable();
SqlCommand cmd = new SqlCommand("SELECT * FROM webqa_state.dbo.METADATA_LicenseGroups");
cmd.CommandType = CommandType.Text;
cmd.Connection = DBConnection.getConnection();
daLicGrp = new SqlDataAdapter(cmd);
SqlCommandBuilder cmdBuilder = new SqlCommandBuilder(daLicGrp);
daLicGrp.Fill(dt);
bsLicGrp = new BindingSource();
bsLicGrp.DataSource = dt;
dgLicenseGroups.DataSource = bsLicGrp;
dgLicenseGroups.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.AllCellsExceptHeader);
}
void frmLicenseGroups_Load(object sender, EventArgs e)
{
--> dset = new DataSet("LicenseMap");
--> DataTable dt = getLtable();
--> DataTable dn = getDtable();
--> dset.Tables.Add(dt);
--> dset.Tables.Add(dn);
for (int i = 0; i < dset.Tables.Count; i++)
{
string myMessage = i.ToString() + " " + dset.Tables[i].ToString() + " ";
}
this.LoadLicGrpDataGrid();
this.treeLicencegrpView.AllowDrop = true;
this.treeLicencegrpView.DragEnter += new System.Windows.Forms.DragEventHandler(this.treeView_DragEnter);
this.treeLicencegrpView.DragDrop += new System.Windows.Forms.DragEventHandler(this.treeView_DragDrop);
this.dgDataItemgrp.MultiSelect = true;
this.dgDataItemgrp.MouseDown += new System.Windows.Forms.MouseEventHandler(dgview1_MouseDown);
DataRelation relLicData;
DataColumn colMaster1;
DataColumn colDetail1;
--> colMaster1 = dset.Tables["webqa_state.dbo.METADATA_LicenseGroups"].Columns["LicensegroupID"];
--> colDetail1 = dset.Tables["webqa_state.dbo.METADATA_Data_Items_LicenseGroups"].Columns["LicensegroupID"];
--> relLicData = new DataRelation("RelLicData", colMaster1, colDetail1);
--> dset.Relations.Add(relLicData);
TreeNode rootNode = new TreeNode();
rootNode.Text = "LicenseGroups";
this.treeLicencegrpView.Nodes.Add(rootNode);
foreach (DataRow row in treeViewlicencegrpID().Rows)
{
TreeNode newnode = new TreeNode();
newnode.Text = "[" + row["LicenseGroupID"].ToString() + "] " + row["Name"].ToString();
newnode.Tag = (int)row["LicensegroupID"];
treeLicencegrpView.Nodes[0].Nodes.Add(newnode);
}
TreeNode parentNode = new TreeNode();
parentNode.Text = "LicenseGroupID";
this.LicgrpTreeView.Nodes.Add(parentNode);
foreach (DataRow row in treeViewlicencegrpID().Rows)
{
TreeNode newNode = new TreeNode();
newNode.Text = "[" + row["LicenseGroupID"].ToString() + "] " + row["Name"].ToString();
LicgrpTreeView.Nodes[0].Nodes.Add(newNode);
}
TreeNode mainNode = new TreeNode();
mainNode.Text = "Eserver";
this.eserverTreeview.Nodes.Add(mainNode);
foreach (DataRow row in getEserverEtitlementSetID().Rows)
{
TreeNode newNode = new TreeNode();
newNode.Text = row["FullDeatilsESet"].ToString();
this.eserverTreeview.Nodes[0].Nodes.Add(newNode);
}
}
--> public DataTable getLtable()
{
DataTable Ltable = new DataTable("myTable");
SqlCommand cmd = new SqlCommand("SELECT * FROM webqa_state.dbo.METADATA_LicenseGroups");
cmd.CommandType = CommandType.Text;
cmd.Connection = DBConnection.getConnection();
dLGrp1 = new SqlDataAdapter(cmd);
dLGrp1.TableMappings.Add("webqa_state.dbo.METADATA_LicenseGroups","myTable");
dLGrp1.Fill(Ltable);
return(Ltable);
}
--> public DataTable getDtable()
{
DataTable Dtable = new DataTable("myTable1");
SqlCommand cmd = new SqlCommand("select *FROM webqa_state.dbo.METADATA_Data_Items_LicenseGroups");
cmd.CommandType = CommandType.Text;
cmd.Connection = DBConnection.getConnection();
dLGrp2 = new SqlDataAdapter(cmd);
dLGrp2.TableMappings.Add("webqa_state.dbo.METADATA_Data_Items_LicenseGroups","myTable1");
dLGrp2.Fill(Dtable);
return (Dtable);
}
public DataTable getEserverEtitlementSetID()
{
string cmd = "SELECT EntitlementSetID, '['+ CAST(EntitlementSetID As varchar(20))+ ']'+Name AS FullDeatilsESet from webqa_registration.dbo.ESERVER_Entitlement";
return DBConnection.getDataTable(cmd);
}
public DataTable treeViewlicencegrpID()
{
string cmd = "SELECT Name,LicenseGroupID FROM webqa_state.dbo.METADATA_LicenseGroups";
return DBConnection.getDataTable(cmd);
}
private void treeView_DragEnter(object sender, System.Windows.Forms.DragEventArgs e)
{
e.Effect = DragDropEffects.Copy;
}
private void treeView_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{
if (e.Data.GetDataPresent("System.Windows.Forms.DataGridViewSelectedRowCollection", false))
{
Point pt = ((TreeView)sender).PointToClient(new Point(e.X, e.Y));
TreeNode DestinationNode = ((TreeView)sender).GetNodeAt(pt);
DataGridViewSelectedRowCollection rowCollection = (DataGridViewSelectedRowCollection)e.Data.GetData("System.Windows.Forms.DataGridViewSelectedRowCollection", false);
foreach (DataGridViewRow drv in rowCollection)
{
string nodeName = ((DataRowView)drv.DataBoundItem).Row[1].ToString() + " [" + ((DataRowView)drv.DataBoundItem).Row[0].ToString() + "]";
//DestinationNode.Tag = (int)
DestinationNode.Nodes.Add(new TreeNode(nodeName));
DestinationNode.Expand();
}
}
}
private void dgview1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
DataGridView.HitTestInfo info = dgDataItemgrp.HitTest(e.X, e.Y);
if (info.RowIndex >= 0)
{
DataGridViewSelectedRowCollection rowCollection = dgDataItemgrp.SelectedRows;
if (rowCollection != null)
{
dgDataItemgrp.DoDragDrop(rowCollection, DragDropEffects.Copy);
}
}
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
LoadLicGrpDataGrid();
}
private void btnSaveLicenseGrps_Click(object sender, EventArgs e)
{
SaveLicenseGroups();
}
public void SaveLicenseGroups()
{
daLicGrp.Update((DataTable)bsLicGrp.DataSource);
}
}
}
|
|
|
|
|
I suggest you break point these lines then find out which one is the problem, and what is null. We can't possibly solve it for you better than that. Once you know the line, we can make suggestions, obviously.
F9 sets a breakpoint, then F5 starts debugging.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
I got the mistake Thanks anyways
|
|
|
|
|
Hi All,
I am facing One Deployment Problem,
My Project Architecture is Presentation Layer Communicates with Web Services and Web Services Communicates with Data Acess Layer and DAL Communicates with Data Base.How to Deploy These Layers Individuly and Give the Connection while Installing.
Thanks
|
|
|
|
|
Why would you deploy them individually ? What use is the web service without the presentation layer ? I assume the DAL is not deployed ? If it is, of what use is a web service ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Thanks Christian Graus,
BUT,
Reason for Deploy Individully is,Clients are at One location (ex : Location 1),Web Services are at Web Server(ex: Location 2) and DAL,DataBase at DB Server(ex: Location 3).
Is this Correct approach to Proceed? Can u give me suitable Solution for this.
Thanks,
|
|
|
|
|
see the bellow code which i have
const url = "E:\\ThunderBirdApplication\\Application.exe" "%1"
var uri = Components .classes["@mozilla.org/network/simple-uri;1"] .getService(Components.interfaces.nsIURI)
uri.spec = url
Components .classes["@mozilla.org/uriloader/external-protocol-service;1"] .getService(Components.interfaces.nsIExternalProtocolService) .loadUrl(uri)
if it is correct the above code to pass parameter then, how to call those parameters from windows application(Application.exe)
|
|
|
|
|
They are passed in to the main method of the app as a collection.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi,
I have a DataGridView on a window form. I want to implement a functionality where user can edit any of the record in the DataGridView & click on Edit button. When the Edit button is clicked, the record should be updated in the database.
Also, I want user to add new records to the DataGridView from the data entry screen.
Can any one please help me on both? I don't have any code written for the same so not posting it here.
Thanks,
HR
|
|
|
|
|
Hi,
Please try the following code snippet to update Grid and underlying database simultaneously.
BEGIN CODE
dgv1.Update()
ds1.AcceptChange()
dgv1.Refresh()
END CODE
Regadirding the other issue I would suggest you to take a look at following sample. It show how we can show a newly added row (via Form) in DataGradView and other ADO.Net features.
http://www.speedyshare.com/193952422.html[^]
Hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
Dear Sir,
1.we are developing one project. in that we are using "CODEC"
com object for video recording & displaying.
2.Coder records the video. Decoder Disply the video.
3.We used Windows Media Encoder 9 series SDK.
4.we used WME-Interfaces(we used WMEncoder & IWMensouce Interfaces,... )
for recordig video,displying video etc....
5.In this i have option to merge the existing videoo with recording video.
6.i can merge video or images to the recording video.
7.FOR RECORDING WE ARE USING " WINDOWS MEDIA VIDEO 8 FOR LOCAL AREA NETWORK
384 kbps
8.FOR MERGING WE ARE USING " WINDOWS MEDIA VIDEO 8 FOR LOCAL AREA NETWORK
256 kbps.
9. afetr merging the video we can see the whole video in the preview.
10. THE PROBLEM we facing is: in the preview recorded video is disply
clearly, but that inserted video, which we insert to merge with the recording
video, has not diplyed clearly.
11. blurring occrs in the inserted video.
12 we find this blurring clearly in the previewing the whole video.
Expecting from you:
please try to help me, what should i do, to avoid the blurring.
|
|
|
|
|
Sounds like you're using a third party control and should be talking to them.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Hi,
I am currently working on a demo winforms project which has DataGridView control. I have hardcoded the data (using string arrays) & populated in the DataGridView control.
The DataGridView has first column that contains checkbox.
For deleting, I have taken button control & user needs to check the checkboxes to select the rows & then press delete button.
I have found that when first two rows are selected & then delete button is pressed, only first row gets deleted. Also, I am not able to delete any two consecutive rows properly.
I think when a row is deleted, the index of the remaining rows gets changed & this seems to be the problem. But I am not able to find any solution for the same.
Can any one help me for the same? The code for delete button click is as follows:
<code> private void btnDelete_Click(object sender, EventArgs e)
{
int rowCount = 0;
for (int counter = 0; counter < dgDemoGrid.Rows.Count; counter++)
{
if ((bool)dgDemoGrid.Rows[counter].Cells["colSelect"].FormattedValue)
{
rowCount++;
}
}
if (rowCount > 0)
{
DialogResult response = MessageBox.Show("Are you sure you want to delete selected row(s)?",
"Confirm Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question,
MessageBoxDefaultButton.Button2);
if (response == DialogResult.Yes)
{
for (int counter = 0; counter < dgDemoGrid.Rows.Count; counter++)
{
if ((bool)dgDemoGrid.Rows[counter].Cells["colSelect"].FormattedValue)
{
dgDemoGrid.Rows.Remove(dgDemoGrid.Rows[counter]);
}
}
}
}
else
{
MessageBox.Show("Please select row(s) to delete", "Delete Row(s)", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
</code>
HR
|
|
|
|
|
Change your counter to go backwards when doing the remove, then the relative position remains the same, i.e. don't start at zero and add, start at dgDemoGrid.Rows.Count and subtract.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
thanks to response,
I want close the parent window immediatly, when i open the child window using windows application. Please help me to solve this problem ASAP.
|
|
|
|
|
Declare a delegate on your child form, let parent form hook on this delegate instance. When child form's load finishes, invoke this delegate. Parent form will get notification and in the event handler close it.
|
|
|
|
|
Hi,
I've made a Web Crawler in C#.Net and it crawls a given url in the textbox for all the url's on the page and stores in database.
Then taking one url at a time it again crawls all the urls for email addresses on the contact page of the website.
Now what i want is that when i open my web browser and open google.com search for anything and the results which come out, i mean it gives all the links n urls so i want my tool to work there.
I want my web crawler to work with the google.com results... right now i'm manually providing one url in the textbox for the whole crawling procedures.
I hope i can get good advice and suggestion to solve my problem.
Thanks
Paritosh Tripathi
B.Tech. (C.S.)
|
|
|
|
|
If you look at how google forms the search URL, you can do this. You can form a URL for a search criteria and supply that URL to your crawler.
|
|
|
|
|
Hi Guys,
I am populating a treeview. I am able to populate the initial treenodes correctly with LicenseGroupID and Name ...BUT now I have to populate the childnodes according to the Parent node. The code below is populating all the DataitemID and Name in all the LicenseGroupID ,Instead of only the one which belong to that license Group ID ...
For example
If there is a licenseGroupID = 0 and its name is Everything now it should only display DataitemID and Name which belong to the LicenseGroupID...while right now its fillling up the childnode with all the DataitemID
foreach (DataRow row in treeViewlicencegrpID().Rows)///////Able to populate treeview with [ LicensegroupID ]+ Name
{
int LicensegrpID = 0;
LicensegrpID = (int)row["LicensegroupID"];
TreeNode newnode = new TreeNode();
foreach (DataRow rowchild in getLicDataMap().Rows)//////GetLicDataMap() conatins a string cmd seen below
{
TreeNode childnode = new TreeNode();
childnode.Text = "[" + rowchild["DataitemID"].ToString() + "] " + rowchild["Name"].ToString();
childnode.Tag = (int)rowchild["DataitemID"];
//childnode
newnode.Nodes.Add(childnode);
//break;
}
newnode.Text = "[" + row["LicenseGroupID"].ToString() + "] " + row["Name"].ToString();
newnode.Tag = (int)row["LicensegroupID"];
treeLicencegrpView.Nodes[0].Nodes.Add(newnode);
}
/////GetLicDataMap()
SELECT REVERSE(LocalNamespaceReversed) + c.LocalName as 'Name',a.DataItemID AS DataItemID FROM
webqa_state.dbo.METADATA_Data_Items_LicenseGroups a INNER JOIN
webqa_state.dbo.METADATA_Data_Items_English b ON a.dataItemID = b.dataItemID INNER JOIN
webqa_state.dbo.METADATA_LicenseGroups d ON d.LicenseGroupID = a.LicenseGroupID INNER JOIN
webqa_state.dbo.METADATA_Functions_English_Flat c ON c.BaseDataItemCode = b.localName
ORDER BY REVERSE(LocalNamespaceReversed), c.LocalName ASC
///////
OUTPUT
TF.CompanyCountryCode 13289
TF.CompanyCountryName 13290
TF.CompanyName 13288
TF.CompanyPermID 13287
///////////// LicensegroupID
SELECT Name,LicenseGroupID FROM webqa_state.dbo.METADATA_LicenseGroups
Everything 0
Filings-SECFilingsAll 1000
Filings-GlobalFilingsAll 1001
Financial-ExtelAsReportedFinancials 1002
Please If you can let me know how to go about it Thanks
|
|
|
|
|
I am data binding a DataGridView to a BindingList<t> where the type of the list's items "T" is an interface. Ex:
public class TowerList : BindingList< ITower >
The "ITower" interface descends from a base interface called "IModule" which has two properties, "PartNumber" & "PartDescription".
public interface IModule
{
string PartNumber { get; }
string PartDescription{ get; }
}
public interface ITower : IModule
{
double Height { get; }
}
When I data bind a TowerList object to a DataGridView, and set the "DataPropertyName" of a column to "PartNumber" or "PartDescription", it seems that the data binding mechanism does NOT see the "PartNumber" and "PartDescription" properties which are inherited from the base "IModule" interface. The result is that the part number and part description strings do not show up in the grid.
If I "redeclare" the "PartNumber" and "PartDescription" properties directly in the "ITower" interface itself, then the data binding works and the part number and part description strings show up in the grid. Here is the new "ITower" interface:
public interface ITower : IModule
{
double Height { get; }
new string PartNumber { get; }
new string PartDescription{ get; }
}
I know that if the list contained a set of regular object references (such as a "Tower" object) and not a list of "ITower" interfaces that the data binding would work and the inherited "PartNumber" and "PartDescription" properties would been "seen" by the data binding infrastructure. But.... I'm not sure why the "PartNumber" and "PartDescription" properties are not seen when the items in the list are interfaces. Any advice? Thank you for your help. Joby
|
|
|
|
|
Any chance the IModule was in a different assembly? I seems to encountered a similar situation before.
|
|
|
|
|
Thanks for your response, but no the ITower and IModule interfaces are in the same module. One thing that is different is that the TowerList class and the ITower interface ARE in different modules. I have all my common interfaces in a module that is used by many other modules, and I have a separate "business objects" module that contains the actual Tower class and TowerList class which use the ITower interface. Do you think that would make a difference? It doesn't seem like it should, but you never know. Thanks again.
|
|
|
|