|
It is exactly whant i was lookinig for!!
Tahnks!
|
|
|
|
|
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
|
|
|
|
|
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#
|
|
|
|
|
We got a problem in our project
We get the error: Connot call invoke or invokeAsync on a contrik until the window handle has been created.
we tested: this.creatHandle
but it says that there already is an handle.
We use Invoke in some usercontrols
How could we solve this proble.
Regards
Jimmy
|
|
|
|
|
You should actually query the Control.IsHandleCreated before setting it. If this is your own control, a common solution is to queue requests and invoke them / set them / whatever in an override to OnHandleCreated . If this is not your control you're writing, then do something similar: invoke what you need to in your event handler for the HandleCreated event. This solution is suggested on MSDN for many different situations. Just calling CreateHandle may not work because some changes to some controls cause the handle to be recreated.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
How do i quary the control.IsHandleCreation in the OnHandleCreated override on my own made control?
Is there any information about this? and where?
Reagarads
Jimmy
|
|
|
|
|
You don't get IsHandleCreated in your OnHandleCreated override - the reason the event was raised (i.e., OnHandleCreated was called is because the handle was created, so of course IsHandleCreated will return true.
As with anything related to the .NET FCL, all the documentation is in the Class Library[^] reference in the .NET Framework SDK.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
i use BitBlt to capture screen. but i feel the speed is
too slow. it cost me 140ms on my P4 1.8G,i845G pc.
|
|
|
|
|
When you P/Invoke native functions, data must be marshaled. This can take some time. Another reason is that your code could be inefficient. Since you didn't post any details, it's impossible to know.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
First of all: sorry for my poor english.
I have a question I hope someone can answer to. I need my .NET/C# application has more than one icon visible from ExtractIcon(...) function. But it seems this is not possible to set from VS.NET 2003.
I can't believe. Where I get wrong?
cheers
|
|
|
|
|
if possible make it little bit more clear
hai, enjoy coding
Sreejith SS Nair
|
|
|
|
|
ok, sorry for my foggy question.
Developing an app with VC++ you can add more than one icon inside app resources.
If you want to change an icon associated to a shortcut you can select a .exe or .dll finding an icon that fits you. Usually .dlls (such as shell32.dll) have many icons available, while .exes have one. But it is possible to find more than one icon inside .exes resources.
I need to have 2 icons available from my .exe written with VS.NET and C# but it seems I can add only one icon throught "Application Icon" property in [MyApp Property Pages] dialog.
Every resource file you add to your project with "Build Action" property set to "Content" or "Embedded Resource" is not visible from the "Change Icon" dialog.
So, I'd like to know if there is a way to do what I need.
|
|
|
|
|
You don't need to use IExtractIcon , then; you're trying to add icons to your application.
When you compile an assembly - despite the similar extensions to native applications - it is very different. If you want to add icons to your application, you either have to open your application after compiling in VS.NET (as resources) and add icons manually. This can be a pain, obviously, since you have to do this after each compile. There is no support in VS.NET 2002 or 2003 to add additional icons (might be in VS.NET 2005, but I haven't looked for such an option and it's installed on my other partition).
You can do this with the command-line compiler, however (csc.exe). Create a resource file (.rc - the "old school" resource file format for VC++) and pass the path to the /win32res switch when you compile. If you don't want to use the command-line compiler with all the necessary files (plus other compilation steps necessary, like running the licgen.exe and resgen.exe to compile licenses and resourse), then you can use a build tool like NAnt[^]. You still have to create a build script with everything necessary, but this at least tracks whether files have been changed and builds them in a similar fashion as VS.NET.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanks a lot. That's what I need to know
|
|
|
|
|
i am not sure about C#(upto mylevel best)
but i got a little code from VC++.net
// The pointer to my image list.
extern CImageList* pmyImageList;
extern CDC* pmyDC;
int i, dx, cx, cy, nCount = pmyImageList->GetImageCount();
HICON hIcon;
::ImageList_GetIconSize(*pmyImageList, &cx, &cy);
// Draw the images of the image list on the DC.
for (dx=0,i=0;i < nCount;i++)
{
hIcon = pmyImageList->ExtractIcon(i);
pmyDC->DrawIcon(dx, 0, hIcon);
dx += cx;
}
try this
hai, enjoy coding
Sreejith SS Nair
|
|
|
|
|
Except he's actually trying to add icons to his compiled executable. I don't know why he thought he needed IExtractIcon or some wrapper function.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I NEED TO ASK YOU ONE THING. WHETHER ANY WRAPPER IS THERE IN C3 TO GET A LIST OF ICON AS HE TOLD ABOVE
hai, enjoy coding
Sreejith SS Nair
|
|
|
|
|
Do you have any "netiquette"? Don't type in all caps. Not only is it harder to read, but it's also called "flaming" and is an online form of yelling.
There is none in the .NET FCL, but there may be on this site. I do know that there are articles that talk about how to enumerate and get all the icons in an executable (note, this doesn't use IExtractIcon , which is used by the shell and other applications to extract a file association icon). I even wrote a C++ COM object (ATL) that does this.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I am really sorry for that violation. b'cause my keyboard is not worked properly on morning. Right now it is fine.
thanks for information
hai, enjoy coding
Sreejith SS Nair
|
|
|
|
|
My Dataset if filled with a table, I want to get distinct rows from non primary key column.
Thanks
|
|
|
|
|
Hi,
You can do that by using this function.
public DataTable SelectDistinct(string TableName, DataTable SourceTable, string FieldName,string FilterCondition)
{
DataTable dt = new DataTable(TableName);
dt.Columns.Add(FieldName, SourceTable.Columns[FieldName].DataType);
object LastValue = null;
foreach (DataRow dr in SourceTable.Select(FilterCondition, FieldName))
{
if ( LastValue == null || !(ColumnEqual(LastValue, dr[FieldName])) )
{
LastValue = dr[FieldName];
dt.Rows.Add(new object[]{LastValue});
}
}
return dt;
}
Hope this will help you....
regards,
Aryadip.
Cheers !! and have a Funky day !!
|
|
|
|
|
dataset have a method called select(). using this method you can do your selection.
ie,
eg: you have a dataset which consist of customer table.
i think you know the basic things to open a connection and fetch record from table using any datadapter. am i right?
Ok
YourdataAdapter.Fill(YourDataset,"yourtablename");
so you have data on yourdataset.
next line is like this
dataset.table[0].select("distinct custname");
(here i used table[0] why b'cause only one table is there in dataset. otherwise you have to mention table name in double quarts inside the square bracket)
finally you can use datarow[] (recommanding) or someother dataset (if you want) to fetch the record.
datarow[] dr;
dr=dataset.table[0].select("Select distinct custname");
hai, enjoy coding
Sreejith SS Nair
|
|
|
|
|
Have you actually tried this, though? According to the documentation, the distinct keyword is not supported. The expressions that are supported are the same as those that are available to use in the DataColumn.Expression class.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
EXTREMLY SORRY FOR THAT.
hai, enjoy coding
Sreejith SS Nair
|
|
|
|
|
Is it possible to programmatically remove namespaces from an XML string?
For example :
<ControlActEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:monkeys-org:v3" attrib1="A1" attrib2="A2">
Would become :
<ControlActEvent attrib1="A1" attrib2="A2">
OR
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Logon xmlns="http://www.domain.com/EP/">
<userId>int</userId>
<strPassword>string</strPassword>
<strSessionId>string</strSessionId>
</Logon>
</soap:Body>
</soap:Envelope>
becomes
<?xml version="1.0" encoding="utf-8"?>
<Envelope>
<Body>
<Logon>
<userId>int</userId>
<strPassword>string</strPassword>
<strSessionId>string</strSessionId>
</Logon>
</Body>
</Envelope>
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|