|
Hi,I want to dynamic increase some column for table of RDLC!i'm not sure how many column in the Table.
|
|
|
|
|
|
Hello,
How to detect if the computer has Pixel Shader? (in VB.NET or C#)
Regards.
Mehdi Ghiasi
|
|
|
|
|
Just curious. I have a master form with a DataGridView on it showing me the records of a DataTable. The same form also holds 3 buttons. (An "Insert", "Update" and "Delete" button).
Clicking "Insert" I do :
CustomerForm Form = new CustomerForm(m_CustomerDT.NewCustomerRow());
:
if (Form.ShowDialog() == DialogResult.OK)
m_CustomerDT.AddCustomerRow(Form.CustomerRow);
Clicking "Update" I do :
CustomerForm Form = new CustomerForm(m_CustomerDT[DataGrdVw.SelectedRows[0].Index]);
:
Form.ShowDialog();
In the CustomerForm_Load handler I initialize my CustomerForm controls like :
if (!m_CustomerRow.IsNull("LastName"))
{
LastNameTxtBx.Text = m_CustomerRow.LastName;
:
}
In the OKButton_Click handler I do the opposite, saving the values back in the DataRow.
Everything works fine that way, but is it the correct way to go ??
Shouldn't I use DataBindings, BindingContext's, CurrencyManagers etc ... If so, why and how should that translate for my context ?
|
|
|
|
|
I'd say in a Windows Forms project that is perfectly acceptable and gives you the control you need to validate the data entered.
In WPF however you really want to take advantage of the binding model within WPF and MVVM.
I have heard that people are successfully implementing MVVM in Windows Forms which would be a nice way to go.
"You get that on the big jobs."
|
|
|
|
|
I am developing a numerical modeling package for Geophysical applications, and need a well log chart control. I have tried using MSChart, but it does not even come close to the look of a well log. I know of at least one commercial product, but the license fees are prohibitive.
As an example, a typical well log has a logarithmic Y axis from 0.2 - 2000, with major ticks at 1, 10 100, and 1000. If I use MSChart my major ticks are on 0.2, 2, 200 2000, and the labels read 0.199999999, 1.9999999, etc.
Also in a well log the Y scale is actually part of the legend, with each curve getting is own scale.
There are other differences, so the question is can I derive my own control from MSChart, so I can get more control over the chart behavoir? I have never created a control, so I would need a pointer to some book or tutorial. I got nothing from a google search. Thanks.
|
|
|
|
|
spainchaud wrote: tried using MSChart, but it does not even come close to the look of a well log.
Given this then why do you want to derive from it? I would say you would be better of creating your own control.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
There are several reasons I don't make my own control:
1.) MSChart has a lot of nice functionality I would like to reuse.
2.) It is not in my job decription. If I spend too much time making a chart control I will be looking for a new job. I need to pick my battles carefully, and make sure I can win them quickly. As a scientist, I have some discretion on what I work on, but I must justify it in the end.
|
|
|
|
|
OK, so yes, derive from it and create your own functionality. Use Reflector to explore what it does if necessary and override where needed.
spainchaud wrote: It is not in my job decription.
Not to be rude, but what the hell are you doing here then?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Learning something, I hope.
Where I work the scientists typically hand poorly written and undocumented Fortran code to the application engineer, and say "it's your problem to make it work".
I am trying to change that by wrapping the Fortran in properly documented and tested C# classes, before the software engineer gets it. Then work with that engineer to integrate my library with his application.
A really good plotting package will help me with my testing. The software engineers get licenses for fancy commercial plotting packages, the scientists have to scrounge around.
|
|
|
|
|
spainchaud wrote: I am trying to change that by wrapping the Fortran in properly documented and tested C# classes, before the software engineer gets it.
I understand your goal, yet from the perspective of a professional software developer, I would rather the time be spent on improving the process of gather and documenting the requirements. I don't want code from some novice that will most likely be thrown away and never used anyway. You understand the problem you need solved, it is the job of the software engineer to know and use his tools, skills and experience to meet your requirements.
How would you feel if one of the engineers started mucking about in the lab and making suggestions to you on how to do your work?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I does not bother me if they throw my code away, since I know it would be used as a starting point to write even better code, and I would learn from that process. I throw my own code away often, and replace it with better code.
But I know that wont happen. The software engineers were very happy to hear that I was making a library that would be readily integrated into there application, be under source control from the start, and my responsibility to debug. They are also happy to give this novice pointers on design and organization.
The end product will see lots of inflexible undocumented Fortran replaced with a flexible class library in C#. The only Fortran left will be the core Fortran calculations, that very few understand. If the software engineers really wanted to do this job I would have been glad to help define requirements and test their code, but there we no volunteers, except me.
This is also a good project to get me started in C#, after 30 years of Fortran a change of pace is nice.
|
|
|
|
|
spainchaud wrote: so the question is can I derive my own control from MSChart, s
Yes technically this should be possible to do.
The question for you however would be, how useful would it be for you to do that.
Too much of heaven can bring you underground
Heaven can always turn around
Too much of heaven, our life is all hell bound
Heaven, the kill that makes no sound
|
|
|
|
|
It probably wont be necessary. I found out my company has an ActiveX control that will do the log plotting. I think I will still need MSChart to control some user input, but the fancy plotting will be done by something else.
|
|
|
|
|
I am trying to send the fax from my windows service which is written in vb.net. I am facing problem with windows 7 and windows 2008 Server. It works fine with Windows XP
Fax is not getting visible in fax console's outbox. I saw three files in "C:\ProgramData\Microsoft\Windows NT\MSFax\Queue" for every sent fax but this is not visible in fax queue.
I also observed that, when i am trying to send the fax from windows application then it works but anyhow it is getting failed when i am trying to send that from windows service.
I have following code :
Dim oFaxSvrType As Type = Type.GetTypeFromProgID("FaxcomEx.FaxServer")
Dim oFaxSvr As Object = Activator.CreateInstance(oFaxSvrType)
Dim oFaxDocType As Type = Type.GetTypeFromProgID("FaxcomEx.FaxDocument")
Dim sFaxServerName As String
Try
sFaxServerName = Environment.MachineName.Trim
oFaxSvr.Connect(sFaxServerName)
oFaxSvr.Connect(sFaxServerName)
Dim oFaxDoc As Object = Activator.CreateInstance(oFaxDocType)
With oFaxDoc
.Sender.FaxNumber = "1112223333"
.Body = asfilename
.Sender.Name = "test recipient"
.Sender.OfficePhone = "123456789"
.Recipients.add("1113332222")
End With
Dim sFaxJobIds() As String = oFaxDoc.ConnectedSubmit(oFaxSvr)
oFaxDoc = Nothing
Catch ex As Exception
Throw New Exception(ex.Message)
Finally
' clean up com components
Try
oFaxSvr.Disconnect()
Catch ex As Exception
End Try
oFaxSvr = Nothing
End Try
I observed that in task manager, rundll32.exe is getting started when i tried to run this code from windows application but this rundll32.exe is not getting started when i am trying to run this code from windows service.
I am not getting any exception after executing this code but not able to see the fax on outbox.
I ensured that allow service to interact with desktop in service console is checked for fax service and my own windows service.
I need this little bit urgent. Any help ?
|
|
|
|
|
Have you tried logging on as the same user as the service runs under and sending a fax?
Tosch
|
|
|
|
|
Change the account the service is running under to your own. Then you should be able to see the fax in your outbox.
|
|
|
|
|
I have just struck the identical problem.
ConnectedSubmit works fine in a harness app, but becomes a black hole in a Windows Service.
EventLog statements sprinkled through code before the submit are visible, nothing after. No exceptions caught. Service responds to stop.
A threading issue? (My code was kicked off by a timer.) Issue with unmanaged underlying COM?
Have you a solution?
|
|
|
|
|
Have any of you got into this problem?
I've got a .Net 2.0 Winform app for tracking days off and resource management, I'm using Microsoft Application Blocks to connect to an Access db, providing connection string and everything works just fine! Issue is, some of my users have been required in their projects to install Teradata(v 12) which has caused that the application cannot open the Access db. I know, for the type of company and customer they have, that their machine conf is exactly the same, the pc's are configured the same with software installed from the same image, and none of the have admin rights, so I know that it's because they had Teradata installed that they are facing the problem. People that has not required yet to install it are working happily with my app.
Any insights or ideas will be very much appreciated!
"Whether you think you can, or you think you can't--either way, you are right." — Henry Ford
"When I waste my time, I only use the best, Code Project...don't leave home without it." — Slacker007
|
|
|
|
|
Just a SWAG, but the only thing I can imagine that might be affecting this is that the Teradata package has installed a different version of the Jet engine, one that isn't compatible with your software. Can you get a copy of the Teradata stuff and install it on one of your own machines for testing?
Will Rogers never met me.
|
|
|
|
|
Compare the Jet Database engine version if your Dev PC and in the PC where your app doesn't work, most probably, your Jet engine DLLs must have been overriden with different versions. Here's a link that tells your how to check the Jet DB version: http://support.microsoft.com/kb/141796[^]
|
|
|
|
|
|
Collin Jasnoch wrote: <layer>Say I have an object (Poster) with an event, and another object (Listener) is listening to that event (i.e. a Weak Reference) and has the delegate locally.
Unless you code it up that way explicitly, an event hook is a strong reference, not a weak one.
As for hooking the delegate itself, yes, as long as object A has a reference to object B, it'll keep object B alive.
You can avoid this by using a WeakReference in the variable behind the DoStuff property. You'll just have to verify that the reference is still alive before attempting to call it.
|
|
|
|
|
Ian Shlasko wrote: You'll just have to verify that the reference is still alive before attempting
to call it
(which you should do anyway)
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
The .NET garbage collector is actually quite good. It can clean up objects that are holding links to each other (keeping each other alive via A holds a reference to B and B holds a reference to A again).
When this pair gets orphaned from the memory root(s) (i.e. there is no path of references from the base-objects of the program to the A-B pair) then the garbage collector will see that this pair is cut off from the rest of the program and thus clean it up (as always, when this clean up is done is not predictable).
|
|
|
|