|
You can <a href="http://msdn.microsoft.com/en-us/library/ms143368.aspx">File.ReadAllText</a>[<a href="http://msdn.microsoft.com/en-us/library/ms143368.aspx" target="_blank" title="New Window">^</a>] to read in such an IE export file. There's an example on the bottom of that page. One could also <a href="http://msdn.microsoft.com/en-us/library/s2tte0y1.aspx">File.ReadAllLines</a>[<a href="http://msdn.microsoft.com/en-us/library/s2tte0y1.aspx" target="_blank" title="New Window">^</a>] , if that's easier with manipulating strings.
Lastly, (you can almost guess it), there's also a <a href="http://msdn.microsoft.com/en-us/library/system.io.file.writealltext.aspx">File.WriteAllText</a>[<a href="http://msdn.microsoft.com/en-us/library/system.io.file.writealltext.aspx" target="_blank" title="New Window">^</a>] method available. You'll find them all in the System.IO namespace[^], which you'll need to add to your "usings".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi all,
I have searched the web for articles on using Opensource API. to convert word documents to other formats but have yet to find any. I would stick with Office Interop but I cannot install it on the web server I'm currently using unless I signup for a dedicated server. Please point me to a site if you know of one, thanks in advance.
|
|
|
|
|
|
Hi
For multiple employees (one or more), I have to generate report
--Report will be same for all employees
--Each page of report viewer will contain a single report for a single employe.
For example, for 10 employees ten report will be in ten pages of a single report viewer.
I am making report with RDLC
How i will do it??
Please help me
Thanks
modified 2-Apr-13 0:14am.
|
|
|
|
|
currently am build a Dialog like Microsoft OpenDialog, and I want to implement methods like
ShowDialog(IWin32Window owner)
but I have no idea how to use (IWin32Window).
any Suggestions, or help plzz
Mhd_MAMCO
|
|
|
|
|
Every form implements the interface IWin32Window ; that way the modal dialog will be "owned" by your parent-form. As an example;
void Button1_Click(object sender, EventArgs e)
{
using (Form f = new Form())
{
f.ShowDialog(this);
}
}
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
thankx, but my dialog implement method like this
ShowDialog(IWin32Window Owner)
{
}
that exactly what i don't know
i googled it be no answer.
|
|
|
|
|
I am guessing from the name of the method that you want to open a Form as a modal dialog. If that is the case then the code would be almost identical to that already presented by Eddy.
void ShowDialog(IWin32Window owner)
{
using (Form f = new Form())
{
f.ShowDialog(owner);
}
}
If this isn't the correct answer then you will need to say what you actually want your method to do.
Alan.
|
|
|
|
|
thank you,
i solved like this:
public DialogResult ShowDialog(IWin32Window owner)
{
base.ShowDialog(owner);
}
|
|
|
|
|
The ShowDialog-method is already implemented on each form; you'd call it and pass the owner. What class are you calling it from, and why would you need to implement it anew?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
Hey
I've a custom TabControl that inherites Forms.UserControl, not Forms.TabControl. This shall behave just as a normal TabControl codewice. The issue is that TabPages beeing added in the wrong order by the designer. At first it is ok, 2 pages beeing added as expected, #1 and then #2, but when I make any changes to a Page #2, the Text for example - Page #2 beeing added as #1 in designer (the order is now incorrect):
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage1);
Pages beeing added like this in my control:
protected override void OnControlAdded(ControlEventArgs e)
{
base.OnControlAdded(e);
m_Pages.Add(e.Control as TabPage);
}
And the control designer looks like this:
public class TabControlDesigner : ParentControlDesigner
{
private DesignerVerbCollection m_Verbs;
public override void InitializeNewComponent(IDictionary defaultValues)
{
base.InitializeNewComponent(defaultValues);
OnAddTabPage(this, EventArgs.Empty);
OnAddTabPage(this, EventArgs.Empty);
}
public override DesignerVerbCollection Verbs
{
get
{
return m_Verbs != null ? m_Verbs : m_Verbs = new DesignerVerbCollection(new DesignerVerb[] { new DesignerVerb("Add Tab", OnAddTabPage) });
}
}
protected void OnAddTabPage(Object sender, EventArgs e)
{
IDesignerHost Host = (IDesignerHost)GetService(typeof(IDesignerHost));
if (Host == null)
return;
TabControl Control = Component as TabControl;
if (Control == null)
return;
TabPage newPage = Host.CreateComponent(typeof(TabPage)) as TabPage;
MemberDescriptor Descriptor = TypeDescriptor.GetProperties(Control)["Controls"];
RaiseComponentChanging(Descriptor);
newPage.Text = newPage.Name;
newPage.Owner = Component as TabControl;
newPage.BackColor = Color.White;
Control.Controls.Add(newPage);
RaiseComponentChanged(Descriptor, null, null);
}
public override bool CanParent(Control c)
{
if (c is TabPage)
return !Control.Contains(c);
else
return false;
}
protected override void WndProc(ref Message m)
{
if (m.Msg == 0x201 )
{
TabControl c = Component as TabControl;
int lParam = m.LParam.ToInt32();
Point p = new Point(lParam & 0xffff, lParam >> 0x10);
for (int i = 0; i < c.Controls.Count; i++)
{
if (c.GetTabRect(i).Contains(p))
{
c.SelectedIndex = i;
return;
}
}
}
base.WndProc(ref m);
}
protected override void OnDragDrop(DragEventArgs e)
{
((IDropTarget)((TabControl)Component).SelectedPage).OnDragDrop(e);
}
protected override void OnDragEnter(DragEventArgs e)
{
((IDropTarget)((TabControl)Component).SelectedPage).OnDragEnter(e);
}
protected override void OnDragLeave(EventArgs e)
{
((IDropTarget)((TabControl)Component).SelectedPage).OnDragLeave(e);
}
protected override void OnDragOver(DragEventArgs e)
{
((IDropTarget)((TabControl)Component).SelectedPage).OnDragOver(e);
}
}
modified 31-Mar-13 16:58pm.
|
|
|
|
|
I was using BringToFront() on the TabPage that was selected. This changed the controlcollection order.
|
|
|
|
|
كيف البحث عن ملفات محرر التسجيل
|
|
|
|
|
Im sorry but I think youd find it much easyer to get an answer if you stuck with English on this site, as it is an english speaking site.
|
|
|
|
|
How to search for files registry editor
You need to give more details about your problem.
تحتاج إلى إعطاء مزيد من التفاصيل حول المشكلة.
Use the best guess
|
|
|
|
|
I'm working on desktop application on c#.net...I'm using mssql server 2008r2 for backend. After the completion of my project,when i deploy it to make setup file,will i need to install on a client computer or there is any way to deploy sqlserver along with my project while making a setup file so that i won't need to install sql server on client computer for using my application......
|
|
|
|
|
As the client would be expected to pay for SQL Server, you shouldn't be attempting to install it.
|
|
|
|
|
You dont need to install Sql Server on the client computer.
|
|
|
|
|
I am working with MS SQL Server. I need to realize this:
When one client of db changes some record of the table, this changes must be sent to all clients that subscribed with SqlDependency.
But event onNotificationChange from SqlDependency brings me
OnNotificationChange(object caller,SqlNotificationEventArgs e)
caller thet in fact is object of SqlDependency class and contains
Id = "c333b019-ff09-4d62-9584-074b009d56ba;70e64cf4-465f-4e54-937b-024432e6b2ca" ,
and e that contains discribes changes in db like this:
info: insert
source: data
type: change
But i need to receive changed record directly. Because in my variant i need to exequte new query and then search for changes.
Many clients will be do much load to the server.
|
|
|
|
|
Member 9955006 wrote: But i need to receive changed record directly. Because in my variant i need to exequte new query and then search for changes.
Many clients will be do much load to the server.
Your client will have to update it's cached version of the record. Fetching the record again would indeed cause a lot of traffic, so the framework doesn't do that. I assume you have a DataTable in memory?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Quote: Your client will have to update it's cached version of the record. Fetching the record again would indeed cause a lot of traffic, so the framework doesn't do that. I assume you have a DataTable in memory?
i dont use dataTable.. But if it wold be work...
What you mean "to update it's cached version of the record"?
to update all the dataTable using Select query? Or there is another way?
|
|
|
|
|
Jeka Developer wrote: What you mean "to update it's cached version of the record"? You have a record "somewhere" in memory, otherwise it'd be impossible to display it. Whether it be a list, a datatable or raw values, you'll have fetched the data once.
You'll need to update that information, and update the display. How that'll be done will depend on your architecture and the way you "load" data.
Jeka Developer wrote: to update all the dataTable using Select query? You already have the data, and the changes. Why would you want to select what you already have? That'd cause every client to load the table again, causing a lot of needless traffic.
Your best bet it to write a small prototype, and work from there.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: You'll need to update that information
okay, tell pls how i can to update my row(one row that was changed) in DataTable if i already have 10 rows here or 10k.
And how i would know which row from those 10 i need to update?
my SqlDependency onChange event only informs me when data was changed and type of those changes(insert, delete, update).
|
|
|
|
|
Jeka Developer wrote: okay, tell pls how i can to update my row(one row that was changed) in DataTable if i already have 10 rows here or 10k.
And how i would know which row from those 10 i need to update?
It was not designed for use in client applications, where hundreds or thousands of client computers would have SqlDependency objects set up for a single database server. Source: MSDN[^]
You'd know by having a "changes" queue where each client post his/her changes. Fetching the "changes" only would keep traffic low. You could also execute your query and refetch 10k rows on every "HasChanges"-event, but if 100 clients go fetch the complete table every time someone updates a row - you'll be killing the server
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|