|
hi,i have a Databound Datagrid that needs to be sorted by two columns at run time eg
column DISTANCE(order must be ascending )and Column STATUS(must appear in this order good,bad,ugly)
if any of you can refer me to articles or samples that work the same way
i hope it makes sense
thanks
regards paula
|
|
|
|
|
Aoa,
i want the code or C# algo,which remove extra pixels & thinn or skelton the image.
for example in the image there are double or triplr lines,i want to reduce this lines into a single line
|
|
|
|
|
Hello,
How can I ignore the keys the user inserts into a textbox ?
I've tried signing up to the keydown event, end use the e.SuppressKeyPress = true to achieve it in .NET 2005, but this is not supported by .NET 2003.
Maybe use the Handle property for this ?
Thanks, Eyal
|
|
|
|
|
use KeyPress Event and make
e.handle=true;
sameer
|
|
|
|
|
hi
Iam having a problem in focussing button on a form,
in the form i have 1 rich textbox and a button before showing the form i changed the text of RTB like this
FrmHelp frmHelp = new FrmHelp();
frmHelp.HelpTextBox.Text = "This is help";
frmHelp.ShowDialog();
and in the load event i changed the focus to button
private void FrmHelp_Load(object sender, EventArgs e)
{
buttonClose.Focus();
}
but the button didn't get focus and the rich textbox still had a focus on it the text "This is help" has been highlighted(selected),
How to override this. even i checked the Focused property of Both control it says False.
Thanks and Regards,
Srini
|
|
|
|
|
Hi,
Try also buttonClose.Select() (after the .Focus() or before )
I remember thats sometimes terrible to set a focus
Good luck
|
|
|
|
|
Thats work perfectly,
Thanks and Thank you very much,
This is a very strange problem, i Think this problem mainly occurswhen we assign some text to text control and try to focus on some other control.
Thanks
Srini
|
|
|
|
|
use this
buttonClose.Select();
buttonClose.Focus();
sameer
|
|
|
|
|
hi
you can try to set the tabIndex property of the button to 0 and the tabIndex property of the textbox to 1. i think this will automaticlly give the focus to the button when the form loads.
If you need any more help contact me on MSN: jamilaboukhalil@hotmail.com
Jamil Abou Khalil
|
|
|
|
|
Can anyone tell me why is this scenario not working?
A tabcontrol's paint event draws a rectangle and simultaneously a thread should update a label on that tabcontrol. Thread is created when the form is loaded. but its not working.....
Label is not shown untill the drawing is completed.
i cant figure out, what did i miss???
Any suggestions
Thanks in advance
-- modified at 2:37 Tuesday 17th October, 2006
|
|
|
|
|
Even if a separate thread is updating the label, the event for redrawing it is executed in the main thread.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks ,
but how can this be achieved. i need to do both the things in parallel,,what do u suggest?
|
|
|
|
|
If you draw a rectangle and then update the label, the time difference should not be noticable. Most of the time they would both be drawn within the same page refresh, so there would be no delay at all. What is is that you do that is taking time?
---
b { font-weight: normal; }
|
|
|
|
|
i hope this.Update(); will solve your problem
sameer
|
|
|
|
|
Hello, developers!
I have a problem, and i don't know how to solve it. Below i describe this situation:
I have a COM object(in C++) without TypeLIB and I there is a late bound client in C#.NET. During work
a COM object send different events to client. And i don't know, how i can recieve this events in C#. If a had a C++ client, i would write this code:
#include "stdafx.h"
#include <basetyps.h>
#include
#include
#include
#include
#include
#include
using namespace std;
_COM_SMARTPTR_TYPEDEF(IConnectionPointContainer, __uuidof(IConnectionPointContainer));
_COM_SMARTPTR_TYPEDEF(IConnectionPoint, __uuidof(IConnectionPoint));
_COM_SMARTPTR_TYPEDEF(IEnumConnectionPoints, __uuidof(IEnumConnectionPoints));
class CoFomatikEventSink : IDispatch
{
public:
enum DISPIDS
{
DISPID_OnStateChanged = 1,
DISPID_OnProgressChanged,
};
STDMETHODIMP_(ULONG) AddRef();
STDMETHODIMP_(ULONG) Release();
STDMETHODIMP QueryInterface(REFIID riid, void** ppv);
STDMETHODIMP GetTypeInfoCount(UINT *pctinfo);
STDMETHODIMP GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
STDMETHODIMP GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
STDMETHODIMP Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);
CoFomatikEventSink() : cookie(0), refCount(1) {}
~CoFomatikEventSink() { Disconnect(); }
bool Connect(IUnknownPtr object);
bool Disconnect();
// Event Handlers
void OnStateChanged(IUnknownPtr state);
void OnProgressChanged(UINT value, const BSTR text);
private:
IConnectionPointPtr defaultConnectionPoint;
ULONG cookie;
ULONG refCount;
};
STDMETHODIMP_(ULONG) CoFomatikEventSink::AddRef(void)
{
return ++refCount;
}
STDMETHODIMP_(ULONG) CoFomatikEventSink::Release(void)
{
if(--refCount == 0)
{
delete this;
return 0;
}
return refCount;
}
STDMETHODIMP CoFomatikEventSink::QueryInterface(REFIID riid, void** ppv)
{
if(riid == IID_IUnknown)
*ppv = (IUnknown*)this;
else
if(riid == IID_IDispatch)
*ppv = (IDispatch*)this;
else
{
*ppv = NULL;
return E_NOINTERFACE;
}
((IUnknown*)(*ppv))->AddRef();
return S_OK;
}
STDMETHODIMP CoFomatikEventSink::GetTypeInfoCount(UINT *pctinfo)
{
*pctinfo = 0;
return S_OK;
}
STDMETHODIMP CoFomatikEventSink::GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
{
*ppTInfo = NULL;
return E_NOTIMPL;
}
STDMETHODIMP CoFomatikEventSink::GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
{
for(UINT i = 0; i < cNames; ++i)
{
if(_wcsicmp(rgszNames[i], OLESTR("OnStateChanged")) == 0)
{
rgDispId[i] = DISPID_OnStateChanged;
}
else
if(_wcsicmp(rgszNames[i], OLESTR("OnProgressChanged")) == 0)
{
rgDispId[i] = DISPID_OnProgressChanged;
}
else
return DISP_E_UNKNOWNNAME;
}
return S_OK;
}
STDMETHODIMP CoFomatikEventSink::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags,
DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
switch(dispIdMember)
{
case DISPID_OnStateChanged:
{
if(pDispParams -> cArgs == 1)
{
OnStateChanged(pDispParams->rgvarg[0].punkVal);
return S_OK;
}
}
break;
case DISPID_OnProgressChanged:
{
if(pDispParams -> cArgs == 2)
{
OnProgressChanged(pDispParams->rgvarg[0].uintVal,pDispParams->rgvarg[1].bstrVal);
return S_OK;
}
}
break;
}
return DISP_E_UNKNOWNINTERFACE;
}
bool CoFomatikEventSink::Connect(IUnknownPtr object)
{
IConnectionPointContainerPtr connectionPointContainer = object;
IEnumConnectionPointsPtr enumConnectionPoints;
ULONG numConnectionPoints = 0;
connectionPointContainer->EnumConnectionPoints(&enumConnectionPoints);
if(enumConnectionPoints->Next(1, &defaultConnectionPoint, &numConnectionPoints ) == S_OK)
{
if(defaultConnectionPoint->Advise(this, &cookie) == S_OK)
{
cout<<cookie<<endl;
return true;
}
defaultconnectionpoint="NULL;
cookie" =="" 0;=""
}
return="" false;
}
bool="" cofomatikeventsink::disconnect()
{
if(cookie)
{
defaultconnectionpoint-="">Unadvise(cookie);
defaultConnectionPoint = NULL;
cookie = 0;
}
return true;
}
void CoFomatikEventSink::OnStateChanged(IUnknownPtr state)
{
/* OnStateChanged handler HERE */
}
void CoFomatikEventSink::OnProgressChanged(UINT value, const BSTR text)
{
/* OnProgressChanged handler HERE */
}
// ===========================================================================
int main(int argc, _TCHAR* argv[])
{
::CoInitialize(NULL);
{
IUnknownPtr fomatik;
fomatik.CreateInstance("MyCOM.Application");
CoFomatikEventSink* ev = new CoFomatikEventSink();
ev->Connect(fomatik);
ev->Release();
}
::CoUninitialize();
}
But i don't know how i can implement IDispatch in C#? Yes, i know, that RCW and CCW do all work to marshal parameters and call functions, and implement IUnknown and IDispatch, but in my application it is neccesary to implement IDispatch myself, because i don't have a TypeLIB for COM object and that's way i can't cache DispIDs from another source.. I have been trying to write this event handler already 3 days, but unsuccessful!!!!
Plese, if anybody know how to solve this problem, help!
Big, hearty thanks in advance!!!!
|
|
|
|
|
Hello all,
I want to Compress folder by Icshorp library.
I search this help, but not found any sample.
Now, I want some sample of Compress Folder(no a file)
|
|
|
|
|
hi all
have created a groovy c# app in c# express edition 2005.
I see that i can create an installer - "publish" option
can i just make a stand alone statically built .exe file which doesnt need an installer?
if so, how do i go about it ?
cheers and thanks
Bryce
|
|
|
|
|
Build a release version and goto the bin/release directory and the .exe file there is the file you need.
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
|
|
|
|
|
dear programmers
i have made a help file contains many topics. i have a application contains forms when user press F1 then respective form help to be shown
i am using
Help.ShowHelp(this,"c:/help.hlp","Form1");
but is not working not giving any error
only simply
Help.ShowHelp(this,"c:/help.hlp");
is showing the help which is not required..
if any body have done before plz forward
sikandar
|
|
|
|
|
Hi
how can i get the list of all databases in Oracle 9. Can anybody help me please???
regards
sAqIb
|
|
|
|
|
Oracle 9i is one data base what are u talking about plz clear ur question.
there are users which are connected through it
sikandar
|
|
|
|
|
i meant to ask the list of databases in oracle 9. like we have a database 'Northwind', then we have another database 'Test1', then another database 'Test2' etc. so i want to get the list containing names of these databases.
regards
sAqIb
|
|
|
|
|
sorry i got wrong.
sikandar
|
|
|
|
|
Hi everyone,
In my page am using an image button.In that how can i get the change of backcolor continuously.Looking for ur help.
Thanks in advance.
Thanks,
Mirunab
|
|
|
|
|
Your question is not very clear... Do you mean a change over time, or do you mean a gradient? Do you want to monitor changes, or do you want to do the changes?
---
b { font-weight: normal; }
|
|
|
|
|