|
|
|
The application created with Portable .NET runs under OSX, but the compiler runs only under Linux. Is it true?
|
|
|
|
|
|
My datagrid is binded to a table in database but I don't want that all column shown in datagrid.How can I do it?
Mazy
No sig. available now.
|
|
|
|
|
Uncheck 'Auto generate columns' and then manualy add bound columns using the property builder.
HTH
Ryan
|
|
|
|
|
Hi
I want to create a custom edit box, but because it is not allowed to overwrite
its OnPaint() method I cannot derive my class from edit box class and I have to write it from scratch, but the problem is how I can make a custom control
editable.
Thanks in advance
S
|
|
|
|
|
Hi,
I have the following question:
May I have areas with different opacity on a form (I read about the transparency key but it makes the areas completely transparent and need some opacity, not transparency)
Because when you specify the opacity for a form - let's say 0.5 (50%) all the controls have the same transparency level.
Also I don't want to use API calls like UpdateLayeredWindow, SelecteObject, DeleteObject, GetWindowDC, etc.
Thanks in advance,
Georgi
|
|
|
|
|
how could be saved PrinterSettings: first time the user make his choises, after that I want to use the same settings (page size, orientation, ...)
|
|
|
|
|
I have a dataset which fill with two tables whith two oledbdataadapter and create oledbcommandbuilder for each dataadapter. Now when I want to update my dataset tables with oledbdataadapter.update() I can only update first table and insertcommand,updatecommand and deletecommand for second oledbdataadapter is null. According to MSDN oledbcommandbuilder only create those command for a single table in dataset,so how can I update second one? I set insertcommand for dataadapter manually but nothing happend when I call oledbdataadapter.update() for second table. Any idea?
Mazy
No sig. available now.
|
|
|
|
|
If I inherit a class B from class A virtually, like this:
class B : virtual A{
};
then I presume, instance of B will contain a vbptr. My question is, where this vbptr will point to, or in other words, what is assigned to vbptr ?
Will it be pointing to the base class object A / to a virtual table ??
Can anyone tell me how vbptrs are implemented under the scenes.
|
|
|
|
|
Answer from a non-guru: Classes in C# can not inherit from other classes using the keyword "virtual". Virtual can only be used for methods and properties, which in turn will create a vtable (or similar construct) behind the scenes.
|
|
|
|
|
Does anybody can help me???
While working my programm throw an Exception which i couldn't catch. The details are following:
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.ChildWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
after pushing Continue all working as well as erlier...
Was anybody cross with it???
|
|
|
|
|
I've had the same exception, and I think is something related with threads, but can't find a solution...
Free your mind...
|
|
|
|
|
I have tried in vain to try to navigate through a word table using C# and try to retrieve the style associated with each cell in the table.
I am writing a program that searches each table in a Huge word document for cells of a particular style: "Table: Recording List", but no matter what I try I cannot isolate the cell style.
Any help would be appreciated.
Thanks
|
|
|
|
|
There is no style property for a cell inside a table.
Instead, try using Cell(x,y).Range.Style which will return the style of the Cell.
Otherwise you can select the cell and use Selection.Style.
Either the Selection or Range object will give you the style.
Hope it helps!
|
|
|
|
|
Is it possible and how to realize it?
|
|
|
|
|
Print it out, then staple it together (all 20, very important), then scan it into a single page pdf.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
|
I am writing a print option in a project, and the coding of printpreviewdialog, pagesetupdialog, etc are done. However, I don't know how I can get the current and total page number. Can someone please give me some ideas? (I tried '%p', but it doesn't seem right.)
Also, the printout needs to add certain headers and footers automatically (but not from user input). Can someone please give me a clue how I can get started? It's like the URL, date, etc on a printout from a web browser, but my project is not web application.
Thanks so much for any help!
|
|
|
|
|
Hi. I am in a uni course, and so far, have only been taught the bubble sort. Is there a more effient sort? And if so, what is the syntax? You dont have to give me exact code, just anything I can understand.
|
|
|
|
|
there are a lot different types of sorting and there are trede-offs like memory and time. here is the link which has the description of some popular sorting algorithms:
http://linux.wku.edu/~lamonml/algor/sort/sort.html
|
|
|
|
|
Most sorting operations are implemented using the quick-sort algorithm. Take a look at the Array.Sort() method, which most likely is implemented this way.
|
|
|
|
|
I've been digging deep into research for a couple days (roughly) on this and could use some help. Basically, I need to implement overlays in a ListView. The SysListVew32 (common control) supports it, but they didn't wrap this functionality in .NET so I plan on deriving my own (adding a few more things along the way) and I want to expose this functionality in a ".NET-like" manner.
The problem is that the docs are cryptic and there literally is NOT much help when googling. Seriously, try searching for "ListView LVIS_OVERLAYMASK" and you get 3 pages of hits, with only a couple hits containing any use of the mask (others are just needlessly defined constants).
So, the docs say to use ImageList_SetOverlayImage. What exactly is this doing? I give it a handle to the ImageList (no problem there), a 0-based index to an image (?) and a 1-based index to an overlay mask (?). The docs also state that both large and small image lists can contain overlays. With these two "helpful" tidbits in mind, can I infer that the overlay icons are in the ImageList itself? Where (at what index)? I've dug into the ImageList_SetOverlayImage function but it doesn't help.
Has anyone worked with overlay icons in a ListView? Can anyone else interpret the docs for said methods / constants? I mean, I've been working with the PSDK (and whatever it was called before) since the early 90's and I've never scratched so much hair off my head!
Anyway, I post this here because I want to do this in C# (extending our current class library). TIA
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Heath Stewart wrote:
I want to expose this functionality in a ".NET-like" manner.
You can derive the ListView class, or the ListViewItem class. I would also consider implementing IExtenderProvider instead since winforms are by design a bit cloaked. Nice article from Esposito in this month's MSDN mag.
Heath Stewart wrote:
So, the docs say to use ImageList_SetOverlayImage. What exactly is this doing? I give it a handle to the ImageList (no problem there), a 0-based index to an image (?) and a 1-based index to an overlay mask (?).
Looks odd but you don't have to mind. The function creates a new image in the image list by taking the passed image index, applying transparent background to it and have that image ready to use. Any time this masked image has to be used, you need to pass his index to the ImageList_Draw method (which you don't actually do if you are using a listview where you have already attached an image list ; things would be nicely taken care of in due time), and since you don't know the index of this masked image, you have to use a macro : INDEXTOOVERLAYMASK(i), where i is the index of the original non-masked image.
From your point of view, you end up creating a list view, attaching an image list to it, and then explicitely setting an overlay image to an arbitrary list view item by setting the item state. Basically with C# you would use the ListView.SetItemState(int nIndex, int nState) method, unfortunately it's internal. I think you are better off sending a Windows message instead, which is anyway what ListView.SetItemState does in the end.
// sequential layout
struct LVITEM
{
... // TODO : setup the struct
}
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern int SendMessage(IntPtr hWnd, int msg, int wParam, int lParam);
public const int LVM_SETITEMSTATE = 4139;
// in listview report mode only
SendMessage(listview1.Handle, LVM_SETITEMSTATE, nIndex, lvitem);
To set the overlay image, you need to appropriately fill the state field in the LVITEM structure. Only bits 8-11 are useful for the overlay. Again, the INDEXTOOVERLAYMASK macro found in commctrl.h does all this dirty bit work.
Finally, regarding overlay images, they are images that are drawn on top of item images. They differ with item images in that overlay images are masked images, i.e. a mask is applied to filter out all background color first (the color is defined when the imagelist is created).
Hope this helps.
RSS feed
|
|
|
|