|
Thanks Josh again.
I really need this to work, I'm on a urge.
Sorry if I'm abusing you but could you please, try my scenario, it's quite simple and quick to set up (see my first post), and try the two paths that are leading me to this 2 different errors?. Maybe you can figure something out.
The 2nd suggestion you made sounds like a lot of work to have something that should be quite simple since all I'm trying to use is a built-in editor: the DataGridView Columns Editor.
I really appreciate your help so far, and I understand if you can go any further.
thank you and than anyone else who can give some light.
F.
|
|
|
|
|
I looked into this issue and discovered that you need to use attribute redirection to accomplish your goal (well, partly at least).
[AttributeProvider( "System.Windows.Forms.Design.DataGridView", "Columns" )]
public DataGridViewColumnCollection Columns
{
get { return this.dataGridView1.Columns; }
}
In case you're curious where to find out more about this topic, check out this[^]
Unfortunately, it still does not work correctly. When you try to add a column, it throws another error message. But, at least the dialog is showing now...
Good luck,
Josh
-- modified at 21:05 Monday 24th April, 2006
|
|
|
|
|
Hey Josh, thanks a lot.
I've just tried your code and it works just like you said, as long as I remove the
[Editor("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
that I had in my code (taken from the DataGridView metadata). If not, the error persists.
At least with your suggestion the Columns can be edited in Design time. It's weird what's happening, maybe it's a bug in the IDE, I don't know. But I need this to work. Hopefully somebody will come out with a final solution, meanwhile you made my day man. Thank you a lot.
Hey MS guys overthere! Any idea about this?
Thanks Josh.
F.
|
|
|
|
|
Oh Man! This is FRUSTRATING!!!!
My smile was gone with a wink of my eye!!!
Damn it!
Your suggestion works since it makes the Edit Columns dialog appears, but, NOTHING is saved, any changes made to the columns (e.g. Header text) is gone as soon as you build the project!
Nothing is being persisted.
So, there's no point in having the dialog to make any change.
Gee, is really frustrating that something so simple is being such a pain in the "neck"!!!
What the heck is going on here? Please MS Guys, say something about this. It's quite simple and common what I'm trying to achieve here, and the thing is not working. Please.
Thanks Josh for all your help, I really appreciate it. Don't hesitate to go further if you have the time, this is war now
F.
|
|
|
|
|
Hi everybuddy,
I wana ask in your opinion how a 'Middleware' relates to or differs from an 'Application Server' such as ASP.NET?
Can we say one of these concepts contains the other? or they are different tools that help achieveing a similar goal?
Thank you,
- Den2Fly
---
"Art happens when you least expect it."
|
|
|
|
|
My understanding is that the term "Middleware" is some technology that sits between a front-end GUI and a back-end Database. Most notibly, this term used to be applied to MM Flash applications, where the swf would be the GUI, and a database used (eg/ MySQL or MSSQL) - as flash has no native ability to connect to a DB, "middleware" (eg/ asp, php, perl) was used to translate HTTP requests from flash to database calls & vice-versa.
ASP.NET can be used as this middleware, although these days flash has much more ability, such as Remoting which negates the use for such "middleware" solutions.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Yes, useful comment. Thank you for your note.
---
"Art happens when you least expect it."
|
|
|
|
|
Has found one library which allows to send without Outlook Security.
But here the problem Who used to it, help me...
I try to send together with MAPI
<br />
oSession = new MAPI.Session();<br />
oSession.Logon(Missing.Value, Missing.Value, true, true, Missing.Value, Missing.Value, Missing.Value);<br />
<br />
MAPI.Folder oFolder = (MAPI.Folder)oSession.Outbox;<br />
MAPI.Messages oMessages = (MAPI.Messages)oFolder.Messages;<br />
MAPI.Message oMsg = (MAPI.Message)oMessages.Add(Missing.Value, Missing.Value, Missing.Value, Missing.Value);<br />
<br />
SafeMailItem SafeItem = new SafeMailItemClass();<br />
<br />
oMsg.Subject = "Hello!";<br />
oMsg.Text = "Hello!";<br />
<br />
SafeItem.Item = oMsg;<br />
SafeItem.Recipients.Add("xxx@xxx.xxx");<br />
SafeItem.Recipients.ResolveAll();<br />
SafeItem.Send();<br />
<br />
oSession.Logoff();<br />
there Was one question: How to make what letters automatically sent, and that they are kept in folder Outbox and do not send yet will not start itself Outlook?
|
|
|
|
|
Im not really understanding exactly what you are needing... but if you are asking if Outlook has to be running for redemption to work, then I would say yes. It has been my experience that the mail will never go through if outlook is not running. I suggest checking for Outlook, and if it is not running, starting the process. When all mail has been sent, then kill the process, or simply leave it open, whichever you prefer. Also, on some versions of Outlook, the mail will stay in the Drafts folder and will not send until the next Send/Receive, despite the solution that the Redemption people give you (SendNow()). Hope that helped
Aaron
|
|
|
|
|
Hello Aaron.
I send the letter by means of CDO. It's impossible to use Outlook COM Library for me.. (restriction in a technical project)
What i do:
<br />
MAPI.Session oSession = new MAPI.Session();<br />
oSession.Logon(Missing.Value, Missing.Value, true, true, Missing.Value, Missing.Value, Missing.Value);<br />
<br />
MAPI.Folder oFolder = (MAPI.Folder)oSession.Outbox;<br />
MAPI.Messages oMessages = (MAPI.Messages)oFolder.Messages;<br />
MAPI.Message oMsg = (MAPI.Message)oMessages.Add(Missing.Value, Missing.Value, Missing.Value, Missing.Value);<br />
<br />
SafeMailItem SafeItem = new SafeMailItemClass();<br />
<br />
oMsg.Subject = "Hello!";<br />
oMsg.Text = "Hello!";<br />
<br />
SafeItem.Item = oMsg;<br />
SafeItem.Recipients.Add("xxx@xxx.xxx");<br />
SafeItem.Recipients.ResolveAll();<br />
<br />
oSession.DeliverNow();<br />
<br />
MAPIUtils ut = new MAPIUtilsClass();<br />
ut.DeliverNow((int)rdoFlagIcon.olRedFlagIcon, (int)this.Handle);<br />
<br />
SafeItem.Send();<br />
<br />
oSession.Logoff();<br />
Letters remain in a folder Proceeding...
And how to make that they have automatically gone and have got in folder Sent?
I can not understand in what a problem.
!!! - this code don't help...
|
|
|
|
|
Hello there to all:
I m new to C#. I have a question that what's the difference between a variable scope and a variable life time?
Plz give me a detailed answer to clear my concept.
Hope to hear!
|
|
|
|
|
Pretty much the same thing. The variable's lifetime is from when it is created (strictly I believe its when the block containing the variable definition is opened) to when it goes 'out of scope'. When this happens, the stack is unwound and all the variables and references get wiped out. The scope is usually the area within the innermost set of braces { } which contain the variable.
Regards,
Rob Philpott.
|
|
|
|
|
For value types the lifetime is the entire method where it's declared, but the scope might be smaller, for instance inside a loop. Outside the scope, the room allocated on the stack for the variable is simply unused.
For reference types the lifetime is from when the object is created until it's garbage collected. When all references to the object go out of scope (or rather the lifetime ends, I believe), it can be garbage collected.
---
b { font-weight: normal; }
|
|
|
|
|
I have a MDI parent form with a main menu. I need to catch the click event in the child form and depending on the checked state of the menu Item in the main menu do some actions.
How can i do this?
Denis
|
|
|
|
|
You can hook the Click event of a menu item on the MDI parent form via the MdiParent property on the child form. It then exposes the Menu property, which is the MainMenu on the MDI parent.
private void MDIChildForm_Load(object sender, System.EventArgs e)
{
this.MdiParent.Menu.MenuItems[0].MenuItems[0].Click += new EventHandler(MDIParentMenuItem_Click);
}
private void MDIParentMenuItem_Click(object sender, EventArgs e)
{
MessageBox.Show( "Hello" );
}
In the Click event handler, cast sender to a MenuItem to inspect the Checked property of the item that was clicked.
Josh
-- modified at 11:26 Monday 24th April, 2006
|
|
|
|
|
Thanks a lot.
But I have some trouble. Although the MDIparent property is set in the parent form as follows:
newMDIChild.MdiParent = this;
for the code:
this.MdiParent.Menu...
i got the message: "Object reference not set..."
and in the watch window i see that the MDIparent property has the value undefined.
|
|
|
|
|
As far as I understand that happens when i use this line:
this.MdiParent.Menu.MenuItems[0].MenuItems[0].Click += new EventHandler(MDIParentMenuItem_Click);
not in the MDIChildForm_Load method.
But do you know why the MDIparent value is then undefined?
I got the message "Object reference not set..." when I used the line:
this.MdiParent.Menu.MenuItems[0].MenuItems[0].Click += new EventHandler(MDIParentMenuItem_Click);
in the constructor of the child form.
|
|
|
|
|
Oh, I see. If you are accessing the MdiParent property in the child form's constructor, then the parent form would not have yet had a chance to set the MdiParent property on the child. Try attaching your event handlers in the ChildForm's Load event handler. At that point the MdiParent will have been specified by the parent.
Josh
|
|
|
|
|
Hmmm...that's odd. Without seeing the code, I can't help any further.
Josh
|
|
|
|
|
Hi community!
I've created a simple test application to test data transfer rates when spooling files via remoting and get very strange results.
The client can either fetch a file from the server by calling a remote method
int ReadBuffer(int transferID, ref byte[] buf); until the file has been spooled completely or upload a file to the server by calling the remote method
void WriteBuffer(int transferID, int len, byte[] buf); until all blocks have been tranferred.
Basically what you have to do to spool a file in one direction or the other - can't get any easier, can it?
When I try this in a LAN environment, transfer is as fast as one would expect, but when used over the internet, the results are completely different.
One PC (client) has an ADSL connection: 3072kbit/s download, 384kbit/s upload, the other one (server) has a 2Mbit line up- and downstream.
I had expected the real transfer rates to reflect the asymmetric transfer rates, but upload AND download give me about 30KB/sec, although download should be a lot faster.
The weird thing is:
When I run the server program on the client PC and the client program on the server PC, then the transfer rate server PC -> client PC is up to 74KB/sec!
Copying files with Explorer is as fast as one would expect: ~35KB/sec upload and ~107KB/sec download...
Has someone experienced something similar and knows what the reason could be - or even better - what can I do to get the maximum transfer rates?
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Are you doing any synchronous updates to your UI after reading the buffer? Make sure your reading thread is doing reading only, delegating any other work to other threads.
How many bytes are you transferring per-call? The fewer the bytes, the more calls required, the more overhead, the slower the speed. This would be more apparent in a WAN environment.
mav.northwind wrote: int ReadBuffer(int transferID, ref byte[] buf);
Is that your exact code? I know that some remoting channels don't allow ref and out parameters. Typically when I do things like this, I prefer streams. But that's just a comment, shouldn't have anything to do with your speed problem, I can't imagine.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Is Jesus the Jewish Messiah?
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Thanks for your reply, Judah!
The test program isn't doing any UI updates at all while the transfer is in progress, so that can't be the reason.
I've also tried different block sizes, ranging from 4KB to 256KB. Larger blocks give a little performance increase, but only a few percent - what one would expect if you take the usual remoting overhead into consideration.
I've tried with an out byte[] , but the result was the same. All these results come from a TCP channel with a binary formatter, btw.
I even tried getting the FileStream from the remote server object and then read the bytes directly from this Stream, but to no avail. The download is always slow, even slower than the upload, although the upload bandwidth is approx. 10 times smaller than the download bandwidth.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
|
Seems I've found a workaround, at least.
Instead of using ref byte[] or out byte[] I've tried using byte[] as method return value. This requires a little array copying but gives full speed to the caller.
By adjusting the maximum buffer size I was able to get transfer rates very close to what you can achive when copying a file with Explorer.
Nevertheless, I don't understand why the framework has such poor performance with out or ref byte[] parameters...
But thanks for taking your time!
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Hi guys,
I would like an exe without any GUI, no forms, no consoles except when I'm in debug mode.
I've tried with using this.Visible = false (true respectively), but it doesn't work. (windows app template) I've also looked into the properties, but couldn't find it (class library template).
Is it possible to have an exe without a GUI?
tnx!
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|