|
Not having much luck creating messages and changing the sent date/time for archiving imported messages from Notes to Exchange.
I'm not having much luck getting hints on how to do this from any boards or newsgroups either.
Does anyone here at CP have any experience doing this in C# or with any other language for that matter?
Thanks bunches.
|
|
|
|
|
Hello,
How does a service control manager (or operating system) know that a windows service did not start successfully? Should I throw an exception in the overriden OnStart function? Or is there some other way? Thank you in advance!
Rado
|
|
|
|
|
Hi!
Do you remember "continuous form" in form view in MS Access form designer? I need something like that in C# - one data source supplies multiple data forms (or custom controls dynamically placed on the form). How can I make it?
thanks
Hubert
|
|
|
|
|
I'm not quite sure what you mean since I havent been forced to use Access for a long time. But, a DataSet should be usable for multiple data views.
The word abbreviation is awfully long for what it means.
|
|
|
|
|
I have meant the component which is multiplicated as many times on the form/panel as the number of records in database is, and all of these components displays data from just one datasource.
In special cases this may look similar to the DataGrid bounded to data table in dataset - each row of data from the table is represented as single row of controls (TextBoxes typically) in DG. I have much more complicated data to work/visualize (about 50 data columns represented as buttons, combo boxes, text fields) so DG fails ;-(
I hope this made my question more clear
thanks again
h.
|
|
|
|
|
Off hand, I'd say you have two options.
First, you can add customized columns to a datagrid on the fly as you read the data from the dataset. Or second, you can enumerate the dataset and add the controls to your form on the fly.
A nice sample on this site that does the second option and can be found here [^]
For the first option, take a look here [^], while it may not be exactly what you need, the code does show how to add custom column types to a datagrid.
Best of luck.
The word abbreviation is awfully long for what it means.
|
|
|
|
|
hm, well, both of the above articles/codes are pretty good (and useful for other parts of my project) but it is still not what I've meant.
But... in the meantime, i have made something which realizes my functionality - it is pretty simple now, but tomorrow I'm going to apply it to my project and test.
And maybe I'll write a little article about writing my own DataPanel...
Thanks very much for help and (again) for interesting links above
H.
|
|
|
|
|
In the Windows App world, is there a C# property that will tell me if my application is the currently active app; the application that currently has focus? I've experimented with checking the TopMost property, but that seems to be more for when I want my app to always be on top; even if it isn't active. Sorry if this is a stupid question...I'm still a C# novice.
Ron Ward
|
|
|
|
|
|
Try the following out. Why is the emailsettings element tree read <b><i>BEFORE</i></b> the othersettings element (its parent)! Am I blind?
while( settings.Read() )
{
string section = settings.Name;
switch( section.ToLower() )
{
case "pollagentsettings":
break;
case "profileragentsettings":
break;
case "othersettings":
break;
}
}
/* Use this as your settings.xml document - it is the output from the XmlTextWriter
<?xml version="1.0" encoding="utf-8" standalone="yes"?><Settings><PollAgentSettings><ExecOptions type="SP" procedure="asdfasdf" interval="10"><TSQL /></ExecOptions><Servers><Server name="qwer" enabled="True" /></Servers></PollAgentSettings> <OtherSettings><EmailSettings from="qwer" host="asdf" subject="zxcv" /></OtherSettings></Settings>*/
|
|
|
|
|
Holy crapper!
If you put a space between the opening OtherSettings element and the opening EmailSettings element, it works fine. Can anyone think of a real good reason that is a bug?
Modified: Sorry make that just before the opening OtherSettings element.
|
|
|
|
|
is there a way to point all try and catch statments to my own custom error handler by (going on a long shot here) a single property... or do i have to do what i have been doing and go through and point each individual try and catch to my error provider... thanks for the info.... i suspect that there isnt a way to do this...but hey you never know right?
Jesse M
The Code Project Is Your Friend...
|
|
|
|
|
No, each try and catch have to have their own code?
Why do you have a lot of try-catch blocks. You generally only want to be writing them if you have a specific recovery in mind. If not, it's better to just let the exception propagate up to the caller.
|
|
|
|
|
Is there any source of information and samples about using MIDI in
C# ? If not, where should I start to research if I want to program
an application that "talks" with my MIDI instruments?
Thx in advance.
C.N.
|
|
|
|
|
possible try looking into directx 9 it has support for midi i noticed...but then agian i havent tested it really so this is just a guess....but it does have full C# compatiblity...and playing audio with dx9 is super easy.....good luck
Jesse M
The Code Project Is Your Friend...
|
|
|
|
|
|
I need to be able to verify that a UserID (in the format DOMAIN\USERID) is a valid user on a domain. In VB6 I used API, but I was hoping that C# had a better way. Any help would be much appreciated. Thanks in advance.
-Andy
|
|
|
|
|
Hi,
How can I create Property Pages and Property sheets using the .net framework ?
Thanks in advance
Braulio
|
|
|
|
|
I have some data from DataTable to DataGrid.
I want to search data by some field and
display his record in a DataGrid, but the data in a
DataGrid is sorted by some column and order of records
in a DataSource and DataGrid is not same. After the
finding this record DataGrid not displays correct
record (reason is a sort).
Questio:
How can i to get data imediately from DataGrid cell (if
i know current row number and column number in a grid)
without his DataSource(DataTable)?
very thanks.
|
|
|
|
|
Getting data immediately from DataGrid (see Item in help; DataGrid (Win) Members):
object mydata=myDataGrid[rowNo,columnNo];
You can use DataView used by DataGrid. It's sorted in thesame way as displyed
in DataGrid, so You can use CurrentRowIndex property. This DataView You can get from:
1. DataSource (if it's a DataSet or DataTable) by DefaultView property of DataTable (it's not a good way I think ... I can't speak English well)
2. ListManager.List protected property of DataGrid (only in inherited class)
3. DataBinding (complicated way)
But if You can get DataView it's very pleasant object to use ...
Hi,
AW
|
|
|
|
|
I have a form that has several controls on it all in a panel. Sometimes, the user needs to have read-only access to this form. If I disable the panel, then indeed all controls get disabled. But you cannot tell by looking at the controls that they are disabled. I want to draw on top of the form a graphic that is translucent so everything on the form is dimmed. I might also like the graphic to have a big "X" on it, or perhaps even say the reason that the form is disabled.
I tried several things, but nothing really works. I would be happy if I could even just draw a big red "X" over the form inside a red circle to indicate what I want. But if I draw on the form, my lines fall behind the panel and controls. So I tried placing two panels on the form. This works good, but the panels cannot be rotated, so I end up with a big "Cross" insetad of an "X".
So my question is how can I put a translucent image or rectangle that covers the entire form and all of its panels and controls? Or, how can I draw a line on a form so the line is drawn on top of all other panels and controls on the form? Or how can I rotate a panel so I can draw an "X" on top of the form which will cover all panels and controls on the form.
Or can anyone suggest a better way to indicate to the user that a form is read-only while they are in a particular mode?
thanks
Bryan
|
|
|
|
|
First off I would say the big red X idea is a bad one and that you should leave the default UI behavouir as it is. If your frame has a title then it gets dimmed and that is how 99% of programmes leave it and most users understand this. A big red X may be a bit annoying.
But if you have a valid reason then how about using a transparent GIF (the picture control has a transparency colour setting) and overlaying. Just make it visible when the frame is disabled.
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
Want a job?
|
|
|
|
|
I understand your point. I am putting this together for a client who would like to see the "X" if I can make it work. I tried your idea with the picturebox. It almost works, but the image does not seem to support the transparency of the gif. I made the background transparent, and I made a gif with 50% transparency. But the picturebox still does not show through what is under it. It is as if it is showing through to the background image/color of the parent form, and so it is transparent, but all the way to the parent form. So none of my controls show through the picturebox object.
Perhaps you can be more specific on what you have in mind to allow my picture box to be transparent?
thanks
Bryan
|
|
|
|
|
bwells wrote:
Perhaps you can be more specific on what you have in mind to allow my picture box to be transparent?
To be honest I did it once right when I first tried C# out and then never used it after that. I don't know what you mean by a 50% transparent GIF. GIFs only have one channel for transparency meaning you assign a colour to them which is then transparent. Not a percentage based thing. So check your GIF.
Sorry I cannot be of much more help.
Would your client consider having the red circle X behind the form controls? i.e. As the background image of the frame? That would be much easier to do.
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
Want a job?
|
|
|
|
|
I am using Macromedia Fireworks. I draw my image, and I specify I want alpha transparency. When I draw a line, I set the opacity of the line to 50%. So what I should have said was opacity, not transparency.
I confirmed what I am seeing is that if I set the background color of the picture box to be transparent, then it shows through to the background of the parent form, in effect, blanking out the controls under the picture box so it looks like a "hole" in the form so you see the form background color where the transparent picturebox is located. It is almost what I want, but I need to have the controls be visible.
I was thinking as well that I could make the background color be red or some other "special" color so you can tell something is different about the dialog when it is up.
thanks
Bryan
|
|
|
|