|
I will try to make it work that way.
Thanks.
|
|
|
|
|
I noticed the Thread.Sleep after the this.Close(), but as I could not even start to imagine what was, or was supposed to happen. I therefore very deliberately refrained from mentioning it.
Now you have gone and stirred the whole thing up again!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Henry Minute wrote: Now you have gone and stirred the whole thing up again!
Yeah, that's me. Always fighting against those silly Thread.Sleep(Timeout.Infinite); statements which waste an entire stack without achieving anything.
Sorry for being a tad more radical; "Try commenting it out and see if everything still works..." is not really my style.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
NP
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
I know that that command should not be there but it was a temporary solution and it was working in a way.
This shows that this.Close(); doesn't work. I still couldn't figure out why, if it could then there would be no problem.
|
|
|
|
|
It doesn't close because the ShowDialog method blocks the current thread. It means that the rest of the RestartAll method body is executed after a fresh copy of your mainwindow is closed. Switch to Show() instead. I think that you can also move this.Close above _mainwindow.Show() .
Greetings - Jacek Gajek
|
|
|
|
|
If I do it that way, then no new mainwindow appears.
|
|
|
|
|
please give me a sample codes for Handwritten character recognition in c#,becose i had not idea to implement neural network part,can give me the ideas about neural network layers, which layers can i use for that.
|
|
|
|
|
You seem to have decided that a neural network might help you resolve your problem, but you do not understand neural networks. Well the best way to understand new programming techniques is to try them out. Start with something simple, related to your problem domain, and gradually increase the complexity, until you have solved the problem or run out of talent.
The important thing is to try different things to get an understanding.
We therefore come back to that age old question. What have you tried? I would guess that you haven't tried Google.
You might loke to take a look at Designing And Implementing A Neural Network Library For Handwriting Detection, Image Analysis etc.- The BrainNet Library - Full Code, Simplified Theory, Full Illustration, And Examples[^].
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi, when we click a link(which opens a PDF file) in IE, the PDF file is opened in adobe reader or in IE(if "Display in Browser" is enabled). If the PDF is opened in adobe reader, how can I cancel that, I mean the adobe reader should not be open that file.
How can I do this in c#?
|
|
|
|
|
Generally speaking, you can't.
This is a setting in the browser that the user has control over. The user chooses what should happen when a PDF file is opened.
If you get the user to run an application on the client computer, it would be possible to change this setting, but that is nothing that you would normally do, and nothing that a user would normally allow.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hello Experts!!
i am making visible false after validating my login form and open MDI form.But i got problem is login form cant disappear.It shows in taskbar.what to do?
i am using following code for it
frmLogin login = new frmLogin();
login.Visible = false; //THIS CONDITION
MDIPROJECT mdi = new MDIPROJECT();
mdi.Show();
|
|
|
|
|
I suspect there is code you haven't included:
KIDYA wrote: frmLogin login = new frmLogin();
login.Visible = false; //THIS CONDITION
MDIPROJECT mdi = new MDIPROJECT();
mdi.Show();
Will not display your login form, on the display or in the taskbar. On it's own, setting the Visible property will not do anything useful - until you ask for
login.Show()
or
login.ShowDialog()
Check in your other code, and see where you are displaying the form.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Which one is your startup form, the Login form or the MDIParent form?? It should be your MDIParent, not the Login.
|
|
|
|
|
hi all
i am using vs.net 2005 c# window application to learn to make a crystal report which connect to a ms sql database programically
hence i tryed this code:
my_rp objRpt;
objRpt = new my_rp();
String ConnStr = "Data Source=com-DEV;Initial Catalog=DB;Persist Security Info=True;User ID=abc;Password=abc";
SqlConnection myConnection = new SqlConnection(ConnStr);
String Query1 = "SELECT [index], [Model name] FROM Valve";
SqlDataAdapter adapter = new SqlDataAdapter(Query1, ConnStr);
DataSet Ds = new DataSet();
adapter.Fill(Ds, "dt_my_project_table");
if (Ds.Tables[0].Rows.Count == 0)
{
MessageBox.Show("No data Found", "CrystalReportWithOracle");
return;
}
objRpt.SetDataSource(Ds);
CrystalDecisions.CrystalReports.Engine.TextObject root;
root = (CrystalDecisions.CrystalReports.Engine.TextObject)
objRpt.ReportDefinition.ReportObjects["TEST1"];
root.Text = "Sample Report By Using Data Table!!";
crystalReportViewer1.ReportSource = objRpt;
how ever the data doesnt show out, i created some break in the code and reliase that the Ds.Tables[0].Rows.Count have the data found in it meaning it works fine how ever the data just dont show out in the crystal report only the header does.
anyone know whats the problem please advice me please
|
|
|
|
|
Give me report showing fields then will tell u what to do?
|
|
|
|
|
i have verified that my dataset contains data
its just that the data is not being shown in the crystal report for some reason.
and yea i already made sure i have the field up in the report so they can get displayed
i also tryed to make a dummy report by dragging my database into the dataset and creating another report same thing happens the crystal report shows no data although i have comfirm that there is.
any one know if its a setting error, bug or something? please advice
|
|
|
|
|
new to tablet pc application. is it possible to get noncontionous regions on which i can ink on a single form. i need ascii representation of character followed by its glyph for all the characters on a single form.i want to define area for each character separately. the stroke for one region should not interfere with the ink area of other.
right now i m using groupbox as a control and line control dll to draw horizontal lines so as to draw glyph in defined area.
InkOverlay mInkoverlay;
mInkoverlay = new InkOverlay(groupBox1);
mInkoverlay.Enabled = true;
thanks in anticipation
|
|
|
|
|
I'm making a vs.net addin which has a custom treeview, in a custom toolwindow.
I'm trying to replicate some of the basic features of the solution-explorer treeview but i have come across a snag when trying to show a tooltip for a partially visible treenode, when my treeview control doesn't have focus. Basically ToolTip.Show(...) fails to show a tooltip when my treeview isn't focused.
vs.net can surprisingly do this in its solution-explorer treeview so long as vs.net has focus... it's treeview doesn't need focus. You can be typing away in the ide and mouse hover over a half visible file in the solution explorer and see its tooltip. I want that functionality for my treeview :P
|
|
|
|
|
Can you trap the mouseover event on the node (does the node have a mouseover event) even if the control is not selected? Then handle the tooltip manually.
If the node does not then use the treeview and hittest. Still it will be a lot of faffing about to get a tooltip.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
yes in my derived treeview i override OnMouseMove and this code does seem to execute even if the control isnt focused... atleast the breakpoint fires when i slide the mouse over the non-focused control. It's just the call to toolTip.Show(...) which fails to display a tooltip when the control has no focus. hmm.
ok i checked out the Tooltip class with reflector and i see the problem. "IsWindowActive"... microsoft explicitly checks for being "active" before allowing a tooltip to show... i'll do more digging to see if their's an acceptable alternative to being focused.
//from .net framework ToolTip class
public void Show(string text, IWin32Window window, int x, int y)
{
if (window == null)
{
throw new ArgumentNullException("window");
}
if (this.HasAllWindowsPermission && this.IsWindowActive(window))
{
NativeMethods.RECT rect = new NativeMethods.RECT();
UnsafeNativeMethods.GetWindowRect(new HandleRef(window, Control.GetSafeHandle(window)), ref rect);
int pointX = rect.left + x;
int pointY = rect.top + y;
this.SetTrackPosition(pointX, pointY);
this.SetTool(window, text, TipInfo.Type.Absolute, new Point(pointX, pointY));
}
}
|
|
|
|
|
Then you'll find there is something buried under NativeMethods.RECT that needs addressing, 2 weeks from now you will be pushing 1s and 0s at the hardware .
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
ya... i could decompile tooltip... recompile without the offending check... or i can just let this one slide lol
|
|
|
|
|
I have a process, i can start, and hide working fine, but i want to read from the console program, when i runs, not after, i tried to run a timer, anbd read at the tick, but my program just crashes and when it not do, i get nothing at all.
startInfo= new ProcessStartInfo("cmd.exe");
startInfo.Arguments ="/C uus.exe "+ arg.ToString();
startInfo.RedirectStandardError = true;
startInfo.RedirectStandardOutput = true;
startInfo.UseShellExecute = false;
startInfo.CreateNoWindow = true;
this.timer1.Enabled=true;
this.listBox1.Items.Clear();
p= Process.Start(startInfo);
Application.DoEvents();
void Timer1Tick(object sender, EventArgs e)
{
string str="";
str=p.StandardOutput.ReadLine();
if(str != null)
{
this.Text=str.ToString();
this.listBox1.Items.Add(str);
}
Application.DoEvents();
}
So what do i do to solve this?
Update: I tried a solution i found now My program don't crash anymore, but it also don't recevie any data at all
proc.StartInfo.UseShellExecute=false;
proc.StartInfo.CreateNoWindow=true;
proc.StartInfo.RedirectStandardOutput=true;
proc.StartInfo.RedirectStandardError=true;
proc.StartInfo.FileName="uus.exe";
proc.StartInfo.Arguments=arg;
proc.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(SortOutputHandler);
proc.Start();
proc.BeginOutputReadLine();
void SortOutputHandler(object o,System.Diagnostics.DataReceivedEventArgs e)
{
string str="";
string str2="";
str=e.Data.ToString();
if(str!=null && str!="")
{
this.listBox1.Items.Add(str.ToString());
this.Text=str.ToString();
}
str2=proc.StandardOutput.ReadLine();
if(str2!=null && str2!="")
{
this.lsw1.Items.Add(str2.ToString());
}
}
The program is a process whichs take some arguments, and if no error happends run and close is self, what i'am trying to do is run the process, read how long the process is done with the task, while it does the task not after, and write it in my program
some body have a working solution?
|
|
|
|