|
Hello,
I want a C# code that I can use to open the CD driver.
thanks
|
|
|
|
|
|
Hi,
I read some data from SQLServer db and then draw some graphics (lines only) in my form's paint eventhandler. I know that this is time consuming and memory too. It works ok with local SQLServer but, takes a lot of time in case of a remote SQLServer and the page is not repainted/refreshed properly.
Is there any way to make it more efficient like caching, etc.
Cheers
CNU
|
|
|
|
|
hi,
which method you are using Disconnected or Connected ( i mean data adapter or data reader )
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
I am using data adapter.
I connect to the db when I start my application. I keep the connection alive as long as the appl. runs ( and I have to ). I close the connection when the appl is closed.
Just out of curiosity, what this data adapter or reader has got to do with this ??
Cheers
CNU
|
|
|
|
|
hi,
DataAdapter >> If you are using data adapter it will close the connection. that's is you don't want to close the connection explicitly. And if we are trying to update tables using data adapter it will automatically open the connection and will do ooperation and will close automatically.
If it is Data reader it is your headache to open and close the connection once you finish the operation or record fetching. It won't open or close connection automatically ( like our recordset).
So if you are using datareader here in your application , for all request it will goes to database and will give you record and keep the connection active until and unless you close.
I suggest you to use dataset(data adapter) to do your operation.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
hi,
i have one little problem. The overall problem that i am facing is splited into different steps. Please read and give me your idea. I submitted this problem once in this forum. But at that time i got lot of reply says "little more specific". That's why i splited my entire problem into different steps.
Setp one.
i have one panel control in my form. I am spliting this panel control into two part say working region and holding region. This spliting is only logic spliting.
That is i am dividing(logically spliting) panels few portion (region) for working region and the remaining for holding region. This much explanation is fine right.
Result :It's working properly.
Step two.
Next stage is based on user request ( Dynamically ) i am adding one label control into panel.
Say for a button click my logic will create a label control dynamically and it will add that label control into my panel's holding region. This much thing will do by the button click event handler.
After this user will drag the dynamically created control from from panel's holding region and will droup there in panel's working region.
( This dynamically created label is a custom control which inhrited from windows Label control.)
Result : It's working properly.
Step Three.
The autoscroll property if panel is set true. Why because user will create n number of label's. And he need to place it in somewhere in panel. User can deside and re-arrange the label control inside the panel.
Result : It's working properly.
Step four:
Just think. For user one label means his one work status. User can join more than one work status into one work status.(tecnically speaking we are joining two label controls into one label control.). if user join two or more work it will create a single control (after combining the selected control into one) and automatically come there in holing region of panel.
The remaining process will continue like the step two.
The control will be there in holding region of panel for all movement of hori or vertical scrolbar.
This won't dispose or remove the control from that holding region.
Result : It's working properly.
Step five :
Like work joining , i can split one work into fifferent work or i can de couple joined work (step four) into individual works. In this situation i am dynamically creating n number of label controls and place it in that holding region.
( You will get n number of individual work if split a joined work using n number of individual works).
So all controls will come there in holding region.
here my problem start's.
If i am moving my horizontal scrollbar then suddently the controls there in holding region ( not in working region ) will vanish from my panel. this problem is only with horizontal scroll bar.
Any body knows what is happening behind this ?
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
I want to a MDB database in VC#.net. The database isn't localhost, it is at other computer in intranet. When I run my programm, can't connect to the database.
|
|
|
|
|
|
In webapplication, how do set to ie timeout?
|
|
|
|
|
All,
I have been writing an app that has a "Windows-Like" taskbar. When a user minimizes a MDI child, I place the form's name in the taskbar and "Hide" the MDI Child (.visible = FALSE). However, if the user resizes the taskbar or if the MDI Parent is resized the "Hidden" MDI Children magically reappear minimized. I have stepped through the code in the IDE and the MDI child's visible property actually sets itself to TRUE. Is there any way around this? I have attempted to "re-hide" the MDI Child by putting (.visible = FALSE) in the child's "Move" event (this fires when the MDI Parent is resized or the taskbar is resized) , but this causes a flicker and does not consistently work. I have also tried the (.visible=FALSE) in the "Resize" event of the child form as well, but this does not seem to work either.
H E L P ! ! ! ! I just want the MDI child to be hidden and stay that way until "I" tell it otherwise.
Regards and thanks in Advance,
|
|
|
|
|
try this:
Form[] myChildren = this.MdiChildren;
foreach (Form child in myChildren)
{
child.Visible = false;
child.Enabled = false;
}
This signature left intentionally blank
|
|
|
|
|
Well I have been looking around for a while to an answer to this question.
Here is my problem:
I have a report that uses several graphics for operation information
White background with black text.
I just fell across an article on here that talkes about using a histogram to read barcode
information from a graphic.
My question is
Could you use the same method to get the text off a graphic?
Thanks for the info
any information here would be great...
Will
|
|
|
|
|
No, reading a barcode is just reading the gaps between black and white. What you're asking for requires a full OCR solution, unless you know exactly the font that was used, in which case a more simple match algorithm may work.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I know the Font and Font Size as I helped to make the graphics..
So I could:
Create 26 graphics A-Z (all text is in caps) of the same Font Size and Family.
then using those graphics look for a matching pattren..
If I name the Graphics correctly:
A.jpeg
B.Jpeb
I could use this to get the text on the graphic?
|
|
|
|
|
In theory, yes. Assuming that you've just got text, black on white ( or any other colors, the point is just that there is no noise ), this should be a relatively simple image processing task.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
could you point me to an example or a good reference for this kind of task??
Thanks
William O'Malley
|
|
|
|
|
I'd draw the alphabet on a bitmap, then I'd for each character, iterate through the bitmap and do a pixel by pixel comparison, keeping track of which bitmap has the least non matching pixels. My image processing articles will show you how to access the data of an image.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I have a C# program, which has two windows, the second is modeless, and when I create it, the parent loses keyboard focus. Try as I might, I can't seem to give input focus to this window programatically. My other problem is that my app sometimes pops up a window, which is set to centre on the parent, and sometimes it centres on the second window instead of the first. I presume if I can find a reliable way to set the focus, this problem will also go away.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Have you tried them all?
Select();<br />
Focus();<br />
Capture = true;
//probably more redundant stuff
Also did you add the modeless form to the parent as an owned form? how do you activate it? Show() / ShowDialog() ?
top secret xacc-ide 0.0.1
|
|
|
|
|
leppie wrote:
Select();
Focus();
Capture = true;
Didn't know about Capture = true, I'll try that, thanks. Tried the others.
leppie wrote:
Also did you add the modeless form to the parent as an owned form? how do you activate it? Show() / ShowDialog() ?
I'm not sure if I've made the modeless form a child of the main form, and I used Show. Surely ShowDialog would give me a modal form, or have I missed something ? ( Serious question, I'm pretty new at this WinForms stuff, I'm just trying to apply what I recall from MFC to how things work ).
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
This is just a comment Christian, That might be an Accessiblity problem.
MSDN Creating Accessible Windows Applications
Modeless forms are harder to program, because users can access them in an unpredictable order.
You have to keep the state of the application consistent no matter what the user does.
Displaying a modeless window that acquires the keyboard focus. Avoid this method when the user may be typing.
ProgLoad
|
|
|
|
|
In this case, it's a video jukebox program, and the second window is playing the video on a second monitor, so a modeless dialog that does not get the keyboard focus is precisely what I need. Also, I will eventually be using the parallel and serial ports for input from custom devices, so the keyboard focus is an issue mainly so the app is useable without those devices attached, although they usually will be.
Indeed, if you can tell me how to avoid my modeless window aquiring the keyboard focus, my problem will be solved
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I'm not sure how you would yet, but i'll kick it around,
in the mean time, I came across this.
A thread cannot use DestroyWindow to destroy a window created by a different thread.
Would running it in a seperate thread work for you.
Progload
|
|
|
|
|
progload wrote:
Would running it in a seperate thread work for you.
No, doesn't stop it getting the input focus. Thanks tho.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|