|
Hi everybody!
I would like to have toolbar and statusbar on the CrystalReportViewer -- modified (additional buttons, other graphics .., etc., additional panels)
What is the best way to do it?
I am using .NET studio and C#...
Thanks in advance...
|
|
|
|
|
I have one c# application containing Picture(Bitmap). I have one MFC dll thrugh which I want to change the bimap by sending message
like
LRESULT lResult=::SendMessage(hwndImage,STM_SETIMAGE,(WPARAM)IMAGE_BITMAP,(LPARAM)hBmpToSet);
returned lResult is 0
But It's not working. Plz help me !
VIKS
|
|
|
|
|
The Bitmap stored in your C# application isn't an HBITMAP, it is a GDI+ Bitmap; which could be part of the problem. Create your own message to send to the application then in that applications WndProc trap the message and use Bitmap.FromHBitmap to convert it to a GDI+ Bitmap.
Hope that makes sense,
James
|
|
|
|
|
thanx . I tried with Bitmap.FromHBitmap . It just works fine
Now I have one more problem. I have Bitmap on the c# application. Whenever I clicks on that Bitmap. I want it get WM_LBUTTONUP Message. But is directly goes to the handler. NO any WM_LBUTTONUP. In case of normal MFC application the thing are in this sequence .WM_COMMAND then WM_LBUTTONUP.but WM_LBUTTONUP
message is missing in c# application.what I need to do?
VIKS
|
|
|
|
|
You need to trap the MouseUp event on the control/form you are interested in. I assume the bitmap is displayed in a PictureBox (the MouseUp event is defined by Control, which all controls inherit from).
If that isn't the case how are you displaying the bitmap?
James
|
|
|
|
|
The case is simaple as above.Actually I am developing a utility like SPY++ in c# using some MFC routines
Sir using above event handling idea I got solution for my problem. I am very happy with this.Many many thanx .
VIKS
|
|
|
|
|
I Wrote one application (just having one form with some common controls).
It contains Wndproc. But the messages like WM_INITDIALOG and WM_COMMAND are not coming in my proc. Plz help me !
My proc is like this
protected override void WndProc(ref Message Am)
{
switch(Am.Msg)
{
case WM_INITDIALOG:
break;
case WM_MOUSEMOVE:
break;
case WM_LBUTTONDOWN:
break;
case WM_LBUTTONUP:
break;
case WM_COMMAND:
break;
}
base.WndProc(ref Am);
}
VIKS
|
|
|
|
|
Why do you want to handle these WM_ messages??
for example: Why not add the Load event to the form instead of WM_INITDIALOG?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C# and C++!
|
|
|
|
|
I know in PreFilterMessage you are able to 'cancel' incoming messages, but it possible to process the messages here ?? I need process WM_NCHITTEST and return e.g. always HTCLIENT.
Exist something like PreProcessMessage where you are able to preprocess all messages which are incoming into app ?
Thanx.
W.
|
|
|
|
|
You can use WndProc for that. It is not necessary to use PreFilterMessage
|
|
|
|
|
yes it is possibility, but Iam writing program like form desinger and I need ever when is called WM_NCHITTEST process this and return HTCLIENT ...Do you know how to do this ?
W.
|
|
|
|
|
I assume you're changing it to HTCLIENT so that the user can't drag the form around, correct? If thats the case just don't let the message be dispatched to the form (return true from PreFilterMessage).
James
|
|
|
|
|
I declare a byte array:
byte[] byteIn = new byte[1024];
I write to it like so:
newin = false;
Console.WriteLine("Waiting to recieve new data from client");
while(!newin)
{
mySocket.Receive(byteIn, 0, mySocket.Available, SocketFlags.None);
strIn = Encoding.ASCII.GetString(byteIn);
if(strIn != strInbuff)
{
newin = true;
}
strInbuff = strIn;
Console.WriteLine(strIn);
}
The problem is, next time I loop to this nested while statment if I write a smaller value to my byte[ ] it leaves some info unwritten... I need a way of clearing it. Is there some function for this that I can't find on msdn?
Also, If anyone has a better way of detecting new input from a socket let me know... for now I use this resource consuming while loop.. it requires a string for input and a string to see if that input is new (in which case the loop is broken).
Another quick question. I want to declare a class public, like so:
cserver CServer = new cserver();
is how i delcare it, but this object is not accessable to other functions/objects... i cant do public cserver CServer = new cserver(); , I already tried
Thanks.
|
|
|
|
|
...not accessible...
the members of the cserver-object are not accessible? by default all members are declared for private use only. so add a "public" keyword to each of the members you want to access from outside the class in the class-definition itself.
btw: to use "public" in the declaration of the CServer-variable makes no sense - access-rights are defined within the class-definition itself, thats by design.
it seems, you have to read another "introduction to object-oriented programming" article - or i misunderstood your question.
:wq
|
|
|
|
|
Specifically it says 'type or namespace not found'
My only prior use of objects was in php, I never had to deal with a class being declared in another class.
class myClass
{
int number;
public upNum()
{
this.number++;
}
}
class anotherClass
{
public static void myFunction()
{
numclass.upNum();
}
}
class app
{
public static void Main()
{
myClass numclass = new myClass();
anotherclass.myFunction();
}
}
Sorry for the formatting, but why won't anotherclass be able to access numclass (well I know why, I need to know how to let it).
Thanks.
|
|
|
|
|
Is there any way to check how long since the last user input on the PC? Ie: ICQ sets itself to 'Away' status after x minutes.
I've seen ppl call windows functions from their c# apps and i have a feeling this will be the same (user32.dll perhaps).
I am a novice in this area, so any tips would be appreciated...
|
|
|
|
|
what about the dirty way? have a timer reset each time a mouse or keayboard event occurs?
:wq
|
|
|
|
|
http://www.saurik.com seems to be down.
does anyone have an alternate download-location?
thx in advance.
:wq
|
|
|
|
|
|
yeppa!
you're right. today it works again
seems there were serverproblems yesterday...
:wq
|
|
|
|
|
Hello
I'm having extreme problems adding a WebBrowser control to a .NET C# application, that is if I add the COM control from Microsoft then the COM brigde seem to be so badly broken that the BeforeNavigate2 will never ever fire. (All other events of the control will fire correctly as expected)
I also tried to wrap the Control into another control in VB6 and import that com control, but .NET does not like that and simply gives a blue screen there.
So my question here is has anyone been sucessful in using a browser control in .NET app, and been able to get the BeforeNavigate2 event to work ?
Thanks
Björn
|
|
|
|
|
Its been a known bug for 6 months now so who knows if it'll ever get fixed.
Andy Gaskell, MCSD MCDBA
|
|
|
|
|
|
Hi
How can i display the "sub" properties of a class or struct (like image, size, font) in the property grid?
I am designing custom controls and would like to "group" related information. IOW. control have Borders property that refers to a Borders object (class/struct) , that contains 4 Border objects (class/struct) for each side. Each object contains various info like color, width, style, etc.
Thx
|
|
|
|
|
You can get each one and convert it to string and put the text in grid.Something like this:
datagrid[1][1].Text = yourcontrol.BackGroundColor.Tostring();
Is that what you want or I'm in wrong way?
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|