|
Righteous. That's exactly what I was looking for, the proper thing to do, which appears to be a User Control! Now I can go look up how to do that! Thank you very much I really appreciate you taking a few moments to help me out.
|
|
|
|
|
no worries, glad to help.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I agree this is my approach as well, one main application view which has a panel or any sort of container to hold other possible views, this makes for the best possible approach as far as i know to allow as much extensionability or maintainability as possible.
|
|
|
|
|
Hey,
I'm programming a little app, and I need a code in order to search a web page for a word, and clicking on it or copying it etc.
Or if that is hard, maybe extract all the links into a file and then searching the file..
Any of these will do it.
Obviously C#..
Thanks
|
|
|
|
|
|
Are you asking for a suggestion on where to start researching, what design pattern you should use for this type of application, whether it should be web based or forms based?
I don't see the question.
|
|
|
|
|
I thought that I could ask for the code in here..
So I was asking for the code if anyone can do it.
|
|
|
|
|
p3rson wrote: I thought that I could ask for the code in here..
You can, but like everywhere else in the world if you want something done for you, you pay for it.
|
|
|
|
|
Free source code is available in most of the articles. Search them and see if any do what you require, check the applicable licence and away you go.
If you want to write the code yourself, then have a go and if you get stuck, ask in the forums and we will help if we can with specific problems.
If you want code writing, then this is the wrong place. You will have to pay for that and use somewhere else - such as the site that was linked to in an earlier reply.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
I think the other posts burned you well enough.
At Codeproject, learning is encouraged over seeking free work. You can try and we can help, but we will not construct an entire project for you without payment.
|
|
|
|
|
ok i understood..
thx anywayz
|
|
|
|
|
Hi
i use this article to reading excel 2007 via c# :
Loading and reading the Microsoft Excel file contents using C#[^]
but the following error display me :
Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))
this error ocuured in this line :
Workbook workbook = app.Workbooks.Open(path,
0,
true,
5,
"",
"",
true,
XlPlatform.xlWindows,
"\t",
false,
false,
0,
true,
1,
0);
how to solve this problem ?
thanks
|
|
|
|
|
Hey guys!
I have two datagridview's. Both have the same datasource (a datatable).
Now the datatable contains an email address in every row. I have a function to validate an email address.
I want to display the rows with malformed email-addresses in the second datagridview without loosing the connection to the datatable, so that if I delete a row in the second datagridview, it should also appear in the first datagridview.
Is it somehow possible to filter the rows in the second datagridview?
How would you solve this problem?
Thank you guys!
Skyline
|
|
|
|
|
Provide a separate BindingSource for the second DataGridView. then use the filter mechanism of this BindingSource. See A Detailed Data Binding Tutorial[^] for more detail.
skyline92 wrote: so that if I delete a row in the second datagridview, it should also appear in the first datagridview.
I'm not sure if I correctly understand this part of your question. But unless you do some trick handling for the delete in the second DataGridView, any rows deleted will be removed from the DataTable on commit and will therefore be deleted in the first DataGridView as well.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hey!
Thank you for your answer!
That helped me a lot!
My current solution looks as follows:
frmMailBatchMalformedMails frm_malformedMails = new frmMailBatchMalformedMails();
frm_malformedMails.GridViewDataSource = this._boMailbatch.GetMalformedAddressesView();
frm_malformedMails.Show();
-----------------------
public DataView GetMalformedAddressesView()
{
EnumerableRowCollection<DataRow> malformedMailsQuery =
from addressRow in AddressTable.AsEnumerable()
where !ValidateMailAddress(addressRow[MailColumnIndex].ToString())
select addressRow;
return malformedMailsQuery.AsDataView();
}
I think that is a good solution (also includes LINQ for filtering the malformed mail addresses in the rows).
Is it possible to save the changes in the second datagridview temporary and show the changes in the first datagridview only then, when the user clicks the save-button?
How would you solve that?
Thank you very much!
modified on Tuesday, June 30, 2009 12:57 PM
|
|
|
|
|
skyline92 wrote: Is it possible to save the changes in the second datagridview temporary and show the changes in the first datagridview only then, when the user clicks the save-button?
I do not think that it is, not while both grids are bound to the same datatable.
Perhaps someone else might know a method.
Good Luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
This is what I get when I try to open a WPA form. The design view will not open it said it's not there and the install will not work. All I get is the code windows. What can I do?
THIS IS THE ERROR!
There is no editor available FOR WAP FORM Make sure the application for the file type (.xaml) is installed this is the error! If it's not why did not setup do it? What do I look for? And the form designer work why don't this?
I tried to reinstall VS.NET but that did not help, where or what file is the C# editor so I can make sure it's there. I can not uses WAP forms untill I find out why it do not open.
|
|
|
|
|
Here the same error
Using Visual Basic 2005 Express Edition for several months and build an application that still works,
but needed on some parts an apdate.
Starting the View Design editor, I got the following error.
There is no editor available for: C:\ ?.vb
Make sure the application for the file type .vb is installed.
There are more errors.
The properties window isn’t accessible and also
the application properties window.
Under
Tools/Options.
Windows Form Designer.
An error occurred loading this property page.
Under
Tools/ Import and Export Settings Wizard
The operation cold not completed.
Under
Tools/ A new item apeared Create GUID.
Reinstalled Visual Basic 2005 Express Edition
Reinstalled Framework 1.1
Reinstalled Framework 2.0
Surfed several hours on the Internet but didn't find a solution.
Please help.
Henk van Andel
you can see
http://social.msdn.microsoft.com/Forums/en-US/Vsexpressinstall/thread/546def3d-9f8c-4057-8775-c8b16873d9a3/[^]
|
|
|
|
|
Whenever I use CancelEventArgs I iterate over the invocation list and check the Cancel state for each subscriber and break if true, so if any subscriber cancels the process, it is sure to be cancelled and further subscribers will not get called.
I'm needing to customise the BackgroundWorker, so had a quick look at the source code for it and was suprised to find that it doesn't use this policy. If there is more than one subscriber, then only the last one in the invocation list is able to properly set the Cancel that is carried through to the RunWorkerCompletedEventArgs . If the first subscriber sets Cancel to true, the second will still get called and can set it to false!
What would you say is the best practice - my way, or Microsoft's, or is there some in between method that would be better?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Talking to myself here
On reflection, although there's no way to enforce it, all subscribers should probably be called, but each one should check Cancel first to determine whether they should proceed, so MS's way would be the correct method.
Edit: Just came accross this[^] which seems like a perfectly good way of handling it, so cancel can only be changed from false to true - could be done just as easily in the property's setter.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
modified on Tuesday, June 30, 2009 5:06 AM
|
|
|
|
|
Hello
I have a C# desktop application in which one thread that I create continously gets an image from a
source(it's a digital camera actually) and puts it on a panel(panel.Image = img) in the GUI(which
must be another thread as it is the code-behind of a control.
The application works but on some machines I get the following error at random time
intervals(unpredictable)
<br />
<br />
************** Exception Text **************<br />
System.InvalidOperationException: The object is currently in use elsewhere.<br />
<br />
Then the panel turns into a red cross, red X - i think this is the invalid picture icon that is
editable from the properties. The application keeps working but the panel is never updated
From what I can tell this error comes from the control's onpaint event where I draw something else
on the picture
I tried using a lock there but no luck
The way I call the function that puts the image on the panel is as follows:
<br />
if (this.ReceivedFrame != null)<br />
{<br />
Delegate[] clients = this.ReceivedFrame.GetInvocationList();<br />
foreach (Delegate del in clients)<br />
{<br />
try<br />
{<br />
del.DynamicInvoke(new object[] { this, new StreamEventArgs(frame) });<br />
}<br />
catch { }<br />
}<br />
}<br />
this is the delegate:
<br />
public delegate void ReceivedFrameEventHandler(object sender, StreamEventArgs e);<br />
public event ReceivedFrameEventHandler ReceivedFrame;<br />
and this is how the function inside the control code-behind registers to it:
<br />
Camera.ReceivedFrame += new Camera.ReceivedFrameEventHandler(camera_ReceivedFrame);<br />
I also tried
<br />
del.Method.Invoke(del.Target, new object[] { this, new StreamEventArgs(b) });<br />
instead of
<br />
del.DynamicInvoke(new object[] { this, new StreamEventArgs(frame) });<br />
but no luck
Does anyone know how I could fix this error or at least catch the error somehow and make the thread put the images on the panel once again?
Can anyone help please? I am really stuck
Thank you in advance
hello
|
|
|
|
|
Once this happens, it never comes back ? Where's the code that sets the image ? Is it being set from a file, or from a memory stream ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
well once this happens a red X appears on the panel and the thread stops - I think - I don't really know this only happens in Release mode I cAnnot attach a debugger I tried - so no it doesn't come back but neither does the feature work any more
The image comes from the other thread this other thread calls the function camera_ReceivedFrame as specified above and this function receives the image as a parameter
then it just replaces the panel's current image
<br />
void camera_ReceivedFrame(object sender, StreamEventArgs e)<br />
{<br />
pbPreviewCamera.Image = e.frame;<br />
}<br />
hello
|
|
|
|
|
OK, well, this looks like code I wrote with then Canon camera, is that what you're using ? I seem to recall having an issue like this, once. I wonder if you can put this code in a try/catch, if that would stop an exception that is currently killing the thread ?
You can also then write logging code, to see when the error occurs, or to log what's going on, in release mode.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hello,
Yes I am using parts of the code from the Cannon SDK Wrapper class that I found here on code project because my application also has to receive input from a Cannon G9 camera.
No try-catch doesn't stop anything
How can I write logging code to see when the error occurs?
hello
|
|
|
|