|
apferreira wrote:
Inside C# you have the topmost property.
The topmost window makes the window be always-on-top, and is equivalent to:
SetWindowPos(this.Handle, HWND_TOPMOST,0,0,0,0,
SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
It does NOT tell you whether your form is top in the ZOrder.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Use the GetWindow() API:
bool IsTopWindow=(GetWindow((IntPtr)0,GW_HWNDFIRST)==this.Handle);
The API is declared like this:
[DllImport("user32.dll")]
private static extern IntPtr GetWindow(IntPtr hwnd,
int flags);
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
You're welcome.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Hi everyone. Well, I was looking for something to do tonight, and thought why not see what to do with exchange. By this I mean, we use Exchange 2000 at work, and it works. But it is very slow, and has loads of extra functions that a lot of people would not use. So I wanted to see if I could make my own.
Anyway, the problem is this. Where do you get started trying to make an app that uses Exchange? I could not find much on MSDN, it seems to all be about Exchange 2003. If you have any ideas, or know a good tutorial, please let me know.
|
|
|
|
|
|
Ok. I've been learning C# and I'm starting an aplication that uses a Listview in Detail view. I want to make the columns re-orderable and be able to save the order for the next time the form is loaded. But I dont know how to get the column order. The indexes dont change, so the columns are not rearanged in the collection.
Can anyone help? Thanks!
Scott Kelly
|
|
|
|
|
|
I've created a number of overdrawn controls (status bar, group box) and they drawn fine, and as i want. However if you move another window over the window with these controls, you get odd kinda painting on the controls, kinda like window borders left over, etc. I would guess by getting all the controls to redraw themeselves would work, but I can't seem to get this sorted. i tried overidding the OnGotFocus in the main form on which these controls reside to call Invalidate(true), but it doesn't seem to work.
Any ideas??
[Edit]
I've managed to solve this by calling the Invalidate in the Frosm Activate event. However I still the same problem when say a drop down box (an owner drawn one) drops the list over the owner drawn controls. is there anyway of solving this short of calling invalidate alot, which. All the owner drawing is done by overriding the OnPaint in the pretty standard way.
[/Edit]
|
|
|
|
|
You need to do this in the constructor:
this.SetStyle(ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.DoubleBuffer,true);
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
There all ready set in the constructor. Thats why it's puzzling me a little.
|
|
|
|
|
You don't know how many times I've gone through owner draw problems like this. That's why I'm glad we're now re-implementing all Windows controls from scratch[^], with full owner draw/skinning capabilities. I've been named design leader for the project.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Sounds like a good idea. I'll be sure to follow the project. Will you guys be posting your progress? if you want testers in the future let me know.
|
|
|
|
|
I used Erik's tutorial to build a Toolbar (a .dll file) and now that I've created the DLL Toolbar, I don't know how to insert it into Internet Explorer.
How do I do that?
10X!
|
|
|
|
|
You also have to register it in Internet Explorer's toolband list in the registry. This article[^] shows how to do it.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
I have this text file "demo.txt" that's just straight 1 and 0s, no formatting or anything...
I need to format the file like this...
28 columns with a space between each, and with 2 characters in each... like this...
00 00 00 00 00 00 00 01 01 01 C1 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0D 20
and after 28 columns start a new line, continue to the end of the file, "demo.txt"
How can I do this?
/\ |_ E X E GG
|
|
|
|
|
give you a hint
type this at the top
using System.IO;
and when you type something like System.IO.
wow file streams appear.
Your creating a binary file so yes you would use to binary writer/reader.
Now as your professor told you, read a book. Or look up a file writing article on here. I did.
good luck
|
|
|
|
|
Bravo
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|
|
If you get stuck ask a question, but try the binary writer
hit f2 and search for BinaryReader
myBinaryReader.GetByte() and the like
its not a good link, but a link all the same
http://www.c-sharpcorner.com/database/SharpHSQL.asp
|
|
|
|
|
i want to create a dynamic collection / array of string or any
other object type and by that avoid casting.
how can i do that?
-- Directly From Zion --
------ Haimon15 ------
|
|
|
|
|
haimon15 wrote:
i want to create a dynamic collection / array of string or any
other object type and by that avoid casting.
I have written an addin for vs.net 2003, you can look at:
http://www.thecodeproject.com/csharp/CollectionBuilderAddin.asp
It uses a template that is available in the .NET Magic library. If you find this helpfull you can vote for it on the addin competion:
http://www.thecodeproject.com/script/survey/survey.asp?survey=297
Be sure to look at the other addins as well, besides mine, my favourites are LineCounter and Code Store.
Cheers
ES
|
|
|
|
|
I'm using a datagrid to display information from a dataset.
I added a "delete button" and wish to delete the selected cell in the datagrid. But I have the following problems..
1.- If I rearrange the rows by clicking on the column header of the datagrid, I can no longer find the correct row corresponding to the database using the currentcell.row #.. the currentcell.row would say something like it's row #3 which does not correspond to row #3 in the dataset since I rearranged the rows in the datagrid.
2.- I cannot either manually look for the corresponding row in the database using the currentcell info, because when I displayed the information on the datagrid I ommited the primary key.. So I cannot retrieve this primary key from the currentcell..
Does anyone know of a workaround or a way to actually save the dataset row object with each row of the datagrid??
As always I thank you for any help!!
|
|
|
|
|
Current row in DataGrid (from WinForm) is a row number from DataView, not from DataTable. You can get DataView object from DataGrid object protected(!) property:
(DataView)(myDataGrid.ListManager.List)
Hi,
AW
|
|
|
|
|
Hello,
In my application, I am trying to find the duration of a video clip (IWMPMedia interface) that I loaded into a Playlist object. However, the duration attribute is not defined. If I load an .mp3 (as the WMSDK (version 9) C# example does), the duration element is defined. Is this a limitation of the windows media SDK, or is there something else I need to do?
Thanks,
Brad
|
|
|
|
|
For anyone interest, a temporary solution is to use the AudioVideoPlayback component of managed directx. All you have to to is make a new instance of a Video and examine the duration property for the time in seconds.
|
|
|
|
|
Hello All,
I would like to create an assembly which will pickup a list of (10) printer info. and then install those (10) printers into a server. This server has one purpose -- printers. I will have the IP addresses, the ports, (maybe permissions- roles, users etc.), and the printer names. Additionally , I am going to install the printer driver.
What .NET Framework objects will I need to do this?
I am not a systems guy, so I am not sure if there is more than one scenerio for setting up the operating system . I am hoping it will be an "Active Directory" environment. If you are knowledgeable about these options I would also appreciate it if you could tell me what are the environment options.
Any bits of code in C# which show me the ,(.NET Framework Objects), "objects of my desire" would be great!!
Thank You in advance for Your Help
Ken
|
|
|
|