|
Hi All,
How to read file into a structure? The file is created by VC++ 6.0.
For example:
VC++ Code:
struct MyStruct
{
short a;
int b;
char c[20];
short d;
};
CFile aFile;
...
MyStruct aStrcut;
aStruct.a = 1;
...
aFile.Write(&aStruct, sizeof(MyStruct));
I'd like to read the file into the following struct in C#, how? please advice.
[StructLayout(LayoutKind.Sequential, Pack=1)]
struct MyStruct
{
public short a;
public int b;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=20)]
public string c;
public short d;
};
|
|
|
|
|
I'm kind of new to C#, but would like to make at simple monitoring tool for my internet connection - upload/download.
Is it possible to get acces to the Sent/Received on the "Locale Area Conection Status" - dialog?
It would also be nice if I could get a value for the Sending/Receiving speed.
|
|
|
|
|
|
Yes, thank you very much
|
|
|
|
|
Anyone know how to make a control transparent. The TransparentKey property is not available in the control as it is on a form ?
|
|
|
|
|
|
Hi, I'm starting to use Active Directory and I have found many C# examples about the topic but I still cannot find something that helps me setup a development environment for Active Directory
At this point I have a vmware virtual machine running windows 2000 but the Active Directory configuration is causing me some troubles
Anyone knows about a whitepaper or any kind of material that helps me setup a development environment with Active Directory in my laptop?
Thanks
Isaac
|
|
|
|
|
|
Have a look at the latest Dwamish Sample on MSDN. They user AD and have some quite good guidelines and procedures for setting up common development/test/production environments.
HTH
Shaun
-----------------------------------------------------------------------
Shaun Austin: .NET Specialist. Spreading the word of .NET to the world... well the UK... well my tiny corner of it!!
|
|
|
|
|
It's stupid question (no relevance to C#, only relevance is that I want to use icons from MS Word toolbar).
Do you know which DLL in MS Office contains all the icons/bitmaps used by Word or Excel?
I googled for this Dll, but I didn't get it.
Never take a problem to your boss unless you have a solution. This signature was created by "Code Project Quoter".
|
|
|
|
|
|
Kannan Kalyanaraman wrote:
I suggest you try Resource Explorer [1]
Thx KK. I already have different tools like that. My question was specific to MS Office toolbar resources (icons/bitmaps) in the DLL.
Never take a problem to your boss unless you have a solution. This signature was created by "Code Project Quoter".
|
|
|
|
|
WiB wrote:
Try Shell32.dll
I already tried that. I want bitmap strip the one Word uses. Anyway I using the tool Kannan provided, it has search option.
Never take a problem to your boss unless you have a solution. This signature was created by "Code Project Quoter".
|
|
|
|
|
had a look in word.exe?
<a TITLE="See my user info" href=http:
|
|
|
|
|
I am trying to create a rather simple button that has an image on it. Everything is fine except that there is about 2-3 pixels worth of padding at the top of the button that I can't for the life of me get rid of. I've tried setting the image as a background image for the button and that gets rid of the padding but the image doesn't display correctly then. Is there any way to do this without creating my own button class that draws the entire button.. I really don't want to have to draw the button myself, you'd think this wouldn't be so unintuitive..
TIA,
-=- Kevin
|
|
|
|
|
Sorry for the slow response.. I just decided to make due with the few pixels of padding as it's not really worth it to worry about the space right now.. If I have the time to mess with it at a later time I may check back here and see if anyone can help..
Thanks for your reply though,
-=- Kevin
|
|
|
|
|
I have a question on setting clip regions in my custom user control. From the figure below, i have created a region in A, while B is my user control area. How do i set the clipping region so that nothing will be drawn in A? Also, in which event or function do it set it? Thanks alot.
-------------
| |
| ------- |
| | A | |
| | | |
| ------- |
| B |
-------------
Weiye, Chen
When pursuing your dreams, don't forget to enjoy your life...
|
|
|
|
|
Thanks for your reply. I tried out your code and manage to create a clipping region in B but A is gone. Is it possible to still see A while anything that is drawn in A and B will not be visible?
Weiye, Chen
When pursuing your dreams, don't forget to enjoy your life...
|
|
|
|
|
I am trying to help a friend...young guy who lives over in UK. He is starting to learn C# and I'm helping him. He has a little bit of experience in straight C, but even not too much there to be honest.
He is trying to learn C#, but from what I've worked with him so far he is really struggling more with the OO concept more than the language in general. For a book, he has "Beginning Visual C#" (a wrox book). However, from what he's told me...they don't back up enough for somebody totally unfamiliar with OO concepts.
What would be a good totally beginner C# book that goes into OO pretty well, and even better if they forget about forms for now and just do console program examples. Are there any books like that? All the books I have are a bit more advanced, and aren't suitable for him.
Can anyone give some suggestions?
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
|
I just finished Tom Archer's Inside C#[^] and I thought it was a great read. It covered basic OO design concepts, and how they apply to the C# language. Great for beginners, and has enough substance for an intermediate-type guy like myself.
Definitely worth a look...
-Mike Zinni
"No sh*t it's tough. If it wasn't, everybody and their sister would be an engineer and then you wouldn't have a job."
|
|
|
|
|
Hello there,
does anybody know how to find out the height
of a specific row in the DataGrid control?
I cant'use the PreferedRowHeight property
because the user could have changed the height
of some rows and I have to consider that.
Thanx a lot.
Brian
|
|
|
|
|
DataGridTextBoxColumn has a TextBox property. May be TextBox.Height will be usable.
Hi,
AW
|
|
|
|
|
Hi,
I have a collection of many objects (Collectionname : contracts; object : Contract).
I have also a listview I fill up like follows :
foreach(Contract contract in Contracts)
{
listview1.Items.Add(contract.number);
listview1.Items[listview1.Items.Count - 1].SubItems.Add(contract.name);
....
}
listview1.Focus();
In my collection I have a 7000 objects and in the listview I show only 15 lines.
Is there a way that I only fill 15 lines in the listview and when I scroll down or up I fill the following lines.
I think that it takes a lot of performance when filling up the whole listview.
Is there somebody who have idea's or knows some good articles?
Thanks,
x
|
|
|
|
|
you might notice a big speed increase in populating the list if you put listview1.BeginUpdate() before you start the loop, and a listview1.EndUpdate() after the loop..
still a newb.. cut me some slack :P
-dz
|
|
|
|