|
This is pretty vague. What region? Do you mean you've masked the window frame, thus creating a non-rectangular region? Please be more specific.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Yes, sorry. That is exactly what I meant. I've basically masked the original form such that the form now has rounded corners. Nothing amazing I know but i'm just learning. The form has border style set to none and then rounded. The only problem is that if this form is on top of another one then it all just blends in and looks as one. I thought if I could draw a border around the rounded form then it would make things look more separate. Ta.
|
|
|
|
|
You would have to draw them yourself. The only APIs for helping you draw rectangular regions (see the ControlPaint class - even the Windows APIs only help you do the same).
Typically, you make a non-rectangular client area using an image. You could do the same here. Either use or generate an image (if you generated an image, you could use the SystemColors read-only properties to generate an image using the system colors) with an alpha channel and rounded edges. You set that to the Form.BackgroundImage property and set the TransparencyKey if you want to clip a certain color. You could also use an image without an alpha channel (or even with, it just wouldn't make any difference in this case) and use the same region to clip (not mask) the area you want, having rounded, 3D corners within that region. This would work on all .NET-supported Windows platforms, perhaps even some Mono platforms (depending on what window manager / toolkit is used for Windows Forms). Using the alpha channel or color key only works in Windows 2000 and newer.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
hi, I use the crystal report in .net environment.
I have 2 questions:
1)If a report has many detailed records so that they go beyond one page. I want the header (Group By section) to show on the top of both pages. How can I do it?
2)I want each group to start a new page, so I checked New page after choice + Suppress blank section choice in the group footer section, but emputy page will still be there at the end of the report, how can I eliminate the emputy page?
|
|
|
|
|
Chris# wrote:
1)If a report has many detailed records so that they go beyond one page. I want the header (Group By section) to show on the top of both pages. How can I do it?
This content should go in the "Page Header" section.
Chris# wrote:
I want each group to start a new page, so I checked New page after choice + Suppress blank section choice in the group footer section, but emputy page will still be there at the end of the report, how can I eliminate the emputy page?
Experiment with "New Page Before", try it in different sections, I think it will give you the desired effect.
HTH
R.Bischoff .NET, Kommst du mit?
Great Freeware -> Abilon - Rss Reader | Zip Genius | SmartFTP
|
|
|
|
|
create a fillschema a dataset
I create a SYBASECOMMANDBUILDER (from DDTEK Sybase Driver)
I create a row from the dataset
I fill the row with data
I add the row back to the datatable
[rowstate is now UNCHANGED]
I make a change to the newly added row
[rowstate is still UNCHANGED]
Of course the following update command returns zero, since there are no rows that do not have a status of "UNCHANGED". Can someone explain to me what I did wrong? datarow adds and changes should change the rowstate to Added and Modified respectively. Thanks in advance
Have a blessed day in Messiah EYAWHOOSHUA!
|
|
|
|
|
Make sure you don't call AcceptChanges on either the DataSet or the DataTable . To note, a DataAdapter will call this after updating your data store (ex: database).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Also the rowstate changes as soon as I create the commandbuilder. If I call the command builder before adding the row(as in my example), then the rowstate stays Unchanged.
Have a blessed day in Messiah EYAWHOOSHUA!
|
|
|
|
|
|
|
|
A quick FYI for ya: Microsoft is considering deprecating, changing the name of, or possibly removing the ICloneable interface in version 2 of the .NET framework. This is due to the ambiguity of whether ICloneable objects implement deep or shallow copies. Microsoft is recommending that library designers do not implement ICloneable.
#include "witty_sig.h"
|
|
|
|
|
That's not surprising. Thanks for the info.
BTW, are they going to deprecate overloading operator == for the same reason?
|
|
|
|
|
No, or at least I've not heard anything as such. Whether some object "equals" something is up to the object designer. That differs from ICloneable because of the ambiguity of the type of cloning. So I'd say they'll probably keep it.
#include "witty_sig.h"
|
|
|
|
|
Hi,
I'm wondering if there can be any problem related to using a datadrig bounded to a dataset that is updated by temporary methods called from different timers:
<br />
OnTimer1 () { put data into data set table 1}<br />
<br />
OnTimer2 () { put data into dataset table 2 }<br />
<br />
Datagrid uses dataset to show data inserted by the two timers.<br />
After a few updates on the dataset, de application throws a System.NullReferenceException in system.windows.forms.dll (Object reference not set to an instance of an object).
Could it be that I'm using DataView's to search for records to update in the timers? Well this as proved to be a great headache to me, I appreciate your atention.
Best Regards,
Anfernius
|
|
|
|
|
Using a DataView is not a problem. With a lack of more detailed information, it's impossible to help you. You need to debug your code: step through your code and find where the NullReferenceException is being thrown.
Also, when a NullReferenceException is thrown, this often points to badly written code. There is no excuse for this exception - always check your variables to make sure they're not null before calling methods on them. If you're expecting data in a particular DataTable within your DataSet , for example, and no data was returned, that DataTable reference could be null (depending on whether or not the DataSet was filled with schema information). Calling a method on that DataTable without checking for a null reference would throw a NullReferenceException . Checking the return value, using a typed DataSet , and programmatically adding a new DataTable with the appropriate name would get rid of this problem.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
This Exception may be thrown when you try to change data in the same time as DataGrid reads them. Try to suspend binding before changing data from timer thread, or try to use Invoke method of the datagrid and then call your changing methods.
I am less sure the 2nd method, but it may work.
h.
|
|
|
|
|
Hi,
I have a text box on my form . I want to move the text box to the position where the user clicks. So I kept the location in variables and I am getting the coordinates of mouse click. How do I repaint the form so that the text box appears at the mouse click position.
Karteek
|
|
|
|
|
So, what is your problem? Just set the new X and Y values of the textbox and call the Refresh () method of the form if required.
Don't forget, that's Persian Gulf not Arabian gulf!
Murphy: Click Here![^] I'm thirsty like sun, more landless than wind...
|
|
|
|
|
|
Setting TextBox.Location will move the textbox to the new position, no calls to refresh required; the form will refresh itself automatically.
#include "witty_sig.h"
|
|
|
|
|
hi all
can anybody tell me about functions in c# like _inp & _outp in VC++
or can u tell me how can I access 378,379,37A (parallel port) using API functions or C#
thanks for all
|
|
|
|
|
|
just search NTPort in google.
/\ |_ E X E GG
|
|
|
|
|
Hi,
I've noticed that when you load a second Form (set to TopMost=true), that the cursor does not activate (show up) in the textbox set to TabIndex=0. Click back to the first Form and then back to the second Form, the cursor shows blinking away. Any ideas on how to fix this?
thanks,
Ron
|
|
|
|