|
Thanks a lot Muhamad.
I did exactly what you did. When I run the application, , when it is time to view the report, i am getting database login again, and when i enter the details, i am getting login failed , try again. I am not sure why i am getting it. i set the databaselogon details in the program.
Please let me know
Thanks Shreya
|
|
|
|
|
Sorry What exactly you want to know. May be I'm not getting you point. Can you explain in detail? As I think there may problem in you connection seting in Report or from SQL Side.
Let me also know.
Thanks and best regards,
Muhammad Waqas Butt
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
Hey howzit,
I am new to .NET, was a VB6 user. In VB6 one clicks on a control and then if you go to the code window, you can see a list of possible events associated with that control that one can use.
e.g. paint, terminate etc etc
In C# you only see the ones you create yourself, how do I get the list of all possible events? Or Do I need to go to MSDN everytime.
|
|
|
|
|
When you click on a contro, you can go to the properties wizard and click the "Events" tab. This is denoted by a yellow lightening bolt. In there you will see a list of all the events for that control.
Hope that helps
James
|
|
|
|
|
Shot thanks James, thats exactly what I wanted!
|
|
|
|
|
Hey Howzit,
In VS 2003 I used to just right click on the + next to the method in the code editor and say Collapse all or Expand all, in VS 2005 you can't do that.
Does anyone know how to?
|
|
|
|
|
Right click anywhere in the editor, and select "Collapse to Definitions" from the Outline submenu to collapse all.
To expand all, select "Stop Outlining" from the same menu.
|
|
|
|
|
I want this feature in Richtextbox
|
|
|
|
|
Hello to All,
I have to take input from mic as a wav formate stream. How can i do this with C#. Can anybody know about this plz help me with example code if you have.
Divyang J Mithaiwala
|
|
|
|
|
|
Use the RichTextBox class.
<br />
RichTextBox r = new RichTextBox();<br />
r.LoadFile(@"C:\Document.rtf", RichTextBoxStreamType.RichText);<br />
r.SaveFile(@"C:\Document.txt", RichTextBoxStreamType.PlainText);<br />
r.Dispose();<br />
|
|
|
|
|
Hello,
When COM structures are imported into C# remoting server, is there a simple way to make structures serializable? The idea is to use same structures on native and managed components.
Thank you & Best Regards,
|
|
|
|
|
hey ....i wanna know something...first my project about face recognition system...so i used eigen face algorithm so i need to convert from matrix (100*150) to vector so i need to convert to vector ,how could i ???
thanks for efforts
|
|
|
|
|
|
Is your question about converting a matrix to a vecotr?
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
|
You have to be more precise, as I don't want to learn the EigenFace algorithm to help you.
Is your matrix a colletion of vectors? Do you want to convert to a normal?
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
ok ....look i'll explain briefly ...first i have an image (100*150)and i have about 15 training images so i need to change every image to one vector and collect all 15 images in one matrices so i'll have one matrices inside it 15 vectors for all 15 images .....ok .....hope now u know what i mean thanks for your efforts
|
|
|
|
|
I am trying to iterate through a list of public attributes of an object. I can get the list from using the Type object. Like the following.
DataColumn dc = dbSet.Tables[ParID].Columns[ID];
Type dcType =(typeof(DataColumn));
PropertyInfo[] pi = dcType.GetProperties(
BindingFlags.Public|BindingFlags.Instance);
By iterating through pi I can get the name of the properties and the data type, but I can't seem to figure out how to go back to dc and get the value for that property. What am I missing? Is there an easier way to get this information, when you really don't know all the available attributes of an object? I can't find anything that links these two together in the MSDN or anywhere else.
Thanks for your assistance.
Leo T. Smith
|
|
|
|
|
You can use the GetValue method on a PropertyInfo object:
object value = pi[someIndex...].GetValue(dc, null);
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick || Fold With Us! || Pensieve || VG.Net ||
|
|
|
|
|
Thanks, this was what I was missing. It worked great.
Leo T. Smith
|
|
|
|
|
I have some image preview control based on a Panel which remembers current preview image position. Its OnPaint method does nothing except drawing viewed part of the image using this DrawImage override:
Graphics.DrawImage(Image, Rectangle, Rectangle, GraphicsUnit)
This draws only desired part of an image. The preview control is very small, so the whole painting should be fast, but it isn't.
Drawing 50x50 px rectangular part from one image to second - for some unknown reason - depends on the size of the source image When this method draws little rectangle from 7 Mpx image, it tooks about 200 ms - that's not real-time, when image is moved and the control is repeatedly invalidated.
I saw similar preview controls, where the scrolling of image were smooth and doesn't depend on image size. These controls were part of the MFC apps. Then I tried professional .NET component for image previews, which was also slow. I'm confused - why can't this simple task be quick?
I spent a life solving this problem, so answer would be appreciated.
|
|
|
|
|
Here are some possible suggestions i've encountered with similar Stuff:
- Is the OnPaint method called very often? (stupid thing i once did number 1 )
- Try using a label instead of a panel. A label is double-buffered (if i remember right) and a panle isn't. Better yet, make your own custom control with the styles DoubleBuffer, AllPaintingInWmPaint and UserPaint on.
- Make sure the source rectangle and the destination rectangle are the same width and height, so the GDI doesn't have to schale the screen image.
- It can also be a problem as a result of the big image (i think 7 MB is a lot). If it's possible, try drawing a bitmap with a pixel format of Format32bppPArgb, it is said to be the fastest.
I hope this helps!
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick || Fold With Us! || Pensieve || VG.Net ||
|
|
|
|
|
In addition to what Marc said...
Instead of redrawing the image from the same 7M pixel image (huge!), have your control draw the thumbnail image to an internal buffer first, the same size as the preview window. Then when your preview has to draw, it can more quickly draw it from the internal buffer version, which should be pretty small.
I've had to do this a few times in some custom controls that I wrote. Instead of calculating the same image over and over again in order to redraw a control image that doesn't change much, I monitor the Resize events of my control and redraw the control image to an internal buffer. Then in the Paint event for the control, I draw the control image from the buffer.
For example, take a clock face. Most of what you see doesn't change, except for the hand positions. But, to get smoothly turning clock hands, you have to redraw the control about every 30-50 ms at least. Since calculating the positions of the various bits of a clock face can be time consuming, a clock face image should be calculated and drawn once to a cached image. When the control has to redraw itself (every 30ms), it merely has to draw the clock face from the cache, then calculate and draw only the hand positions. When the size of the control changes, you recalculate and redraw the cache image to match the size of the control.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In fact, I'm afraid that using buffer will enhance redrawing when image position doesn't change, but when user will need to shift image viewport by a "hand tool", the redrawing buffer with drawing it on control will take slightly more time than redrawing the control directly. However, the buffer idea is good, because there can be more OnPaint calls, not only on mouse moves...
Another idea was to use a three times larger buffer than the control. When user drags mouse over control, the cursor is locked inside the control bounds and OnPaint works just with the buffer. When user releases mouse button, the buffer will update. This can be a little frustrating, when user needs to scroll whole large image (more dragging), but this can be also fast.
I'll try these approaches, thank you very much for the new ideas .
|
|
|
|