|
Hi!I have event, which when clicked begin downloading data in datagridview.
I make so,but is wrong.Form2 must be in other thread.How make right?
private void downloadToolStripMenuItem_Click(object sender, EventArgs e)
{
Form2 frm = new Form2();
frm.Show();
string path = "test.xml";
DataSet ds = new DataSet();
ds.ReadXml(path);
dataGridView1.DataSource = ds;
dataGridView1.DataMember = "table1";
frm.Close();
}
Sorry for my english and thanks for advance.
|
|
|
|
|
|
I'm developing a MDI WinForm App using C#. I have a parent window with a splitContainer. Panel2 of the split container is used to used to display child forms while Panel1 is used for controls of the parent window. Child1 loads with parent form . However I have placed a button in Child1 that has to call child2 but I can't seem to find a way to close child1 and show child2 in panel2 of the Parent Split Container. I tried using the User Controls but I can't seem to pull through.. Please help.
|
|
|
|
|
I'm not sure I understand completely, but how about using that button to call a method in the parent that will close Child1 and replace it with Child2?
|
|
|
|
|
 Here are a few methods I use. Adapt as needed.
Public Function IsFormOpen(ByVal FormName As String) As Boolean
Dim rVal As Boolean = False
Dim frm As Form
For Each frm In Me.MdiChildren
If frm.Name = FormName Then
rVal = True
Exit For
End If
Next
Return rVal
End Function
Public Function ShowMdiChild(ByVal FormName As String) As Boolean
Dim rVal As Boolean = False
Dim frm As Form
For Each frm In Me.MdiChildren
If frm.Name = FormName Then
rVal = True
frm.Activate()
frm.WindowState = FormWindowState.Maximized
Exit For
End If
Next
Return rVal
End Function
Public Sub InvokeMdiChildMethod(ByVal MethodName As String)
Dim o As Object
o = Me.ActiveMdiChild
Try
o.GetType().GetMethod(MethodName).Invoke(o, Nothing)
Catch
End Try
End Sub
Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs) Handles NewToolStripMenuItem.Click, NewToolStripButton.Click, NewWindowToolStripMenuItem.Click
Dim ChildForm As New System.Windows.Forms.Form
ChildForm.MdiParent = Me
m_ChildFormNumber += 1
ChildForm.Text = "Window " & m_ChildFormNumber
ChildForm.Show()
End Sub
|
|
|
|
|
Why have you posted this message to me?
|
|
|
|
|
I am working on windows application where the sensitive data in app.config file is encrypted i followed [^http://ozkary.blogspot.in/2013/03/encrypting-aspnet-application-settings.html] these to encrypt app.config file. It works very well in my machine. How do i deploy this?
|
|
|
|
|
|
I have a UserControl (call it SpiffyCombo) that consists of a ComboBox and a Label. The SpiffyCombo has a property (call it "Code") that has TwoWay databinding specified for it.
My Form has a BindingSource and an associated ErrorProvider. A property of the BindingSource's DataSource is bound to the Code property SpiffyCombo.
In a normal control, when an error occurs on the DataSource's property the error icon would appear next to the control. I can't get this to happen with SpiffyCombo. Is there some sort of Interface I need in the it or something I need to override to receive the error from the ErrorProvider? I want to control how the error is displayed within SpiffyCombo rather than have is show in the default location.
Any suggestions are greatly appreciated.
|
|
|
|
|
I got the report using rdlc by the report wizard but i can't view anything by using this methode programmatically..
Here I just added a report file report2.rdlc and a report viewer reportViewer2 to the form. and no more process done with out the following code in a button click
My code in button click event
'''''''''''''''''''''''''''''
String get_results = "SELECT * FROM Employee";
SqlConnection con = new SqlConnection(@"Connection String");
con.Open();
SqlDataAdapter adp = new SqlDataAdapter(get_results, con);
DataSet ds = new DataSet();
adp.Fill(ds);
Microsoft.Reporting.WinForms.ReportDataSource repds = new Microsoft.Reporting.WinForms.ReportDataSource("Employee",ds.Tables[0]);
reportViewer2.ProcessingMode = ProcessingMode.Local;
String rPath = @"F:\report\report2.rdlc";
reportViewer2.LocalReport.ReportPath = rPath;
reportViewer2.LocalReport.DataSources.Clear();
reportViewer2.LocalReport.DataSources.Add(repds);
reportViewer2.Visible = true;
reportViewer2.RefreshReport();
... i don't get any result on my form... if it need to assign something to the rdlc file or reportviwer other than the above code, or should i insert a dataset or anything other than the code.. if it need please help me it in programmatically....
|
|
|
|
|
Can you try reportViewer2.LocalReport.ReportEmbeddedResource = "report.report2.rdlc"
Instead of reportViewer2.LocalReport.ReportPath = rPath;
|
|
|
|
|
Probably the name of dataset in your Report is different than "Employee". Open your report and in "Report Data" window, under the node "Datasets", check the name of your dataset, for example if dataset name is "Dataset1", your code should be:
Microsoft.Reporting.WinForms.ReportDataSource repds = new Microsoft.Reporting.WinForms.ReportDataSource("DataSet1", ds.Tables[0]);
|
|
|
|
|
I have one html document . I want to highlight text in html document but which text I want to highlight that is repeated text in html document . But I want to highlight only exact text according to my requirement then how can I determine the exact text which I want to highlight . Manually, I know that this text should have to highlight but how programmatically determine exact text to highlight between duplicates.
Please some one can help to me.
My exact scenario is giving below-
I want to explain my scenario I have some pdf and converting in epub file.After converting some text font name or font style missing then I have to compare with pdf and epub and highlight the exact text which font is missing.But because of duplicates I am not able to determine the text for highlight.
|
|
|
|
|
Your question is not very clear.
I have guessed that for a html page that you are displaying in the web browser control you want to be able to highlight a word or words.
If I am write I would have a look here[^]
There is also a lot of example from Google: c# webbrowser highlight text[^]
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
Hello ,
Thanks for your reply. Highlighting text is not a problem for me .My Problem is that while I am comparing epub to pdf , I am able to get text only not position of text. So I don't know the position of text and there is duplication of text which is making me uncomfortable to highlight text.
if I know position of text or there is not a duplication of text then it is easy to highlight.
|
|
|
|
|
This question was already asked here[^]. Please stick with one forum only.
|
|
|
|
|
Hello All,
I have a dotnet windows application in which i am using crystal reports, built using vs 2005, installed on a machine using click once setting. Till now the application is working fine. but when i am migrating my application from vs 2005 to 2010 and deploying it onto the test environment, at the time when client is opening the application through application shortcut ,the crystal report runtime for vs 2010 is not installing on the client machine. However i have mentioned it as a prerequisite and also the crystal report runtime setup is there in the Application deployed location.
Help really appreciated.
Regards,
Ashish
|
|
|
|
|
I have windows form application of employee salary management system. It has methods of login, AddnewRecord, Edit, ViewAll, Search and few more. can any one tell me how to apply equivalence partitioning method "category partitioning" ?
|
|
|
|
|
Due to my current work, I need to display a plain image in a WinForms control (based on a map, but not from Bing / Google / other APIs) such as a JPEG or PNG in which I need to define/show points of interest. It will also be good to allow showing/hiding these layers of information (e.g. basic plain JPEG map in one layer, points of interest in another layer and dangerous points in a third layer) based on the user's criteria independently as well as allow clicking on these points.
In the past, I have performed such a similar work on a web environment by using OpenLayers, which provides a functionality (I think via a plugin/trunk) to work with plain images instead of retrieving the data from a devoted server.
But now, I'm a bit lost. I have been taking a look at SharpMap + GdalRasterLayer, but I have not been able to find any good tutorial to perform something similar to what I pretend. Maybe too much complicated for what I pretend, and of course not the target of these gis-based libraries.
I hope someone can help me;
Thanks in advance.
|
|
|
|
|
I don't know of any 3rd. party library for this specific purpose, but, I think a lot of what you may do will depend on the nature of the whatever-objects you need to overlay on top of the map to define your "points of interest." Can you describe those objects further: are they icons ? graphic files ? Do they function as Controls, meaning: if you hover over them, click on them, etc., some action is performed ?
And, the solution will also depend on what facilities you provide for viewing the underlying map: will the user be able to pan, zoom ? I would guess you'd implement that which requires re-calculation of which overlay objects will appear, and where they will appear.
You can certainly create transparent Forms in WinForms and carefully position them over some base Form (or Panel, or other ContainerControl, in a base Form) that contains you map as a BackGroundImage. Those transparent Forms can, of course, have objects in them that are not transparent.
If you want to look further into doing this yourself in C#, then please post a more complete specification here.
good luck, Bill
"What Turing gave us for the first time (and without Turing you just couldn't do any of this) is he gave us a way of thinking about and taking seriously and thinking in a disciplined way about phenomena that have, as I like to say, trillions of moving parts.
Until the late 20th century, nobody knew how to take seriously a machine with a trillion moving parts. It's just mind-boggling." Daniel C. Dennett
|
|
|
|
|

Long time ago, I made an application near to your requirements. The main design was:
- An abstract base Shape class having some methods like a void Render(Graphics) and a method for hit testing,bool HitTest(Point).
- Shape classes for custom shapes that are needed on each layer; shapes like point, line, icon, path, etc that inherit from abstract Shape class.
- Each derived shape has its own properties and overrides Render method and renders itself on the graphics object; also overrides HitTest method to check if it contains a point.
- A Layer class that contains a List of Shapes and a void Render(Graphics) and calls render method of each shape. (You can restrict each layer to specific types of shapes, you can implement z-order management for shapes, etc)
- A Map class having and Image and a List<Shapes> and Save and Load to/from file. (You can handle Active layer and active shape easily.)
- A custom control that has a Map property. This control is responsible for rendering layers and handling user mouse interaction and update layers. This control overrides OnPaint and mouse events and enables double buffering.
Hope this idea helps you.
|
|
|
|
|
I recently came across a link to Nokia’s new developers program which goes by the name of DVLUP.. Have anybody else heard of it?
It is pretty exciting reward program as one has to complete challenges and earn cool badges nd reward points… Much more like an interesting game nd we can share it on our fb profiles too… Check it out: http://www.sercononline.com/track.asp?token=330
|
|
|
|
|
This reads and feels like Spam.
Anshu Kapoor wrote: It is pretty exciting reward program Woooah! Is it exciting?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Yes i think so.. Why sir?? what u think abt this?
|
|
|
|
|
Anshu Kapoor wrote: what u think abt this? Textspeak, buzzwords, and posted in a forum where one expects questions.
I think it's 'orrible.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|