|
Hi ,
Thanks for your reply,my basic idea is calling everything from command prompt without showing windows or hiding windows,clearly what i want i have to pass username and password... from command prompt like this,
windowsApp1 -U userName -P password -S serverName -F fieldname(which is in database),after that every thing will have run as a background without showing windows.if possible send o/p to console.
i think its clear now,if you have any samples send me
thanks.
|
|
|
|
|
Why don't you just run it mininmized and set the form show in taskbar property to false. That makes it run invisibly.
|
|
|
|
|
Hi ,
Thanks for your reply,my basic idea is calling everything from command prompt without showing windows or hiding windows,clearly what i want i have to pass username and password... from command prompt like this,
windowsApp1 -U userName -P password -S serverName -F fieldname(which is in database),
after that every thing will have run as a background without showing windows
i thinkits clear now,if you have any samples send me
thanks.
|
|
|
|
|
Hi
Could anyone please explain to me why the following results in two mdi forms but the textbox only appearing on the second one? Clearly there is some sort of mechanism preventing me from hosting the same control on two different forms but I can't find any documentation regarding this.
<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
<br />
this.IsMdiContainer = true;<br />
<br />
TextBox box = new TextBox();<br />
<br />
Form frmchild=new Form();<br />
frmchild.MdiParent=this;<br />
frmchild.Controls.Add(box);<br />
frmchild.Show();<br />
<br />
Form frmchild2=new Form();<br />
frmchild2.MdiParent=this;<br />
frmchild2.Controls.Add(box);<br />
frmchild2.Show();<br />
<br />
}<br />
Thanks in advance!
Ewan.
|
|
|
|
|
Try this:
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
this.IsMdiContainer = true;
TextBox boxA = new TextBox();<br />
TextBox boxB = new TextBox();
Form frmchild=new Form();
frmchild.MdiParent=this;
frmchild.Controls.Add(boxA);
frmchild.Show();
Form frmchild2=new Form();
frmchild2.MdiParent=this;
frmchild2.Controls.Add(boxB);
frmchild2.Show();
}
There are 10 kinds of people in the world.
Those that read binary...
...and those who don't.
|
|
|
|
|
No - i think you've missed the point of my original post. I know perfectly well I could do ask you suggest but that wasn't my question.
|
|
|
|
|
I answered your question with code. You need separate instances of the textbox -- one for each form. So yes, I answered your question.
There are 10 kinds of people in the world.
Those that read binary...
...and those who don't.
|
|
|
|
|
I think your trying to add the same instance of a TextBox control to two different forms at the same time?
This will not work because of threading, concurrency, message pump, and window handle issues. You MUST use two different instances of the control. Think about it. How is a dual-hosted, single instance control going to fire events in one window and not the other?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to read the properties of a MS Word file (like author, comments...) and I found two solutions:
- by starting a word application class
- by using the system32.dll
The problem with the first solution is that it uses a lot of ressources and takes quiet a bit of time (you actually open up the whole MS Word Software only to get some properties).
The problem with the second solution is that it doesnt work on Win2k or lower. It only works with WinXP or higher. The system32.dll of Win2k or below only gets the file size and creation dates and other properties but none of all those other MS Word specific properties.
So can anyone give me a hint how to get those properties on Win2k without opening a word application?
Thanks for any hints!
Bertram Weckmann
|
|
|
|
|
When is size assignment is done for the first time is done to a control?
|
|
|
|
|
at the form constructor in InitComponents() ,the windows designer handwork
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
Look in the "Windows Form Designer Generated Code" Region. You'll find all the properties, that are not default values, of your controls are set in there.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
From Life Cycle point of view when the page's Initialise id called it in turn calls the init of all controls on that page. At this point the control is initialised with all its properties. And finally after all the controls the Page initialise gets over.
Is this what u wanted.
Ketty
|
|
|
|
|
How can I print the content from a RichTextBox control?
the richTextBox.Document thing does not exist so how can I do it!
|
|
|
|
|
I think i already post answer for the same question.
Anyhow don't upset.;)
<br />
try<br />
{<br />
PrintDia=new PrintDialog();<br />
PrintDia.Document=printDocument1;<br />
string content=this.RitchEditor.Text;<br />
StrReader=new StringReader(content);<br />
if(PrintDia.ShowDialog()==DialogResult.OK)<br />
{<br />
this.printDocument1.Print();<br />
}<br />
}<br />
catch(Exception Ex)<br />
{<br />
MessageBox.Show(Ex.Message.ToString());<br />
}<br />
This much is very easy one who know how to print the content. Next is importent.
<br />
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)<br />
{<br />
try<br />
{<br />
float Lines_Per_Page = 0;<br />
float Y_Position = 0; <br />
int Count = 0;<br />
float Left_Margin = e.MarginBounds.Left;<br />
float Top_Margin = e.MarginBounds.Top;<br />
<br />
string Line = null;<br />
Font fnt = Editor.Font;<br />
SolidBrush Solid = new SolidBrush(Color.Black);<br />
<br />
Lines_Per_Page=e.MarginBounds.Height/Font.GetHeight(e.Graphics);<br />
<br />
while(Count < Lines_Per_Page && ((Line=StrReader.ReadLine())!=null ))<br />
<br />
{<br />
<br />
Y_Position =Top_Margin + (Count * fnt.GetHeight(e.Graphics));<br />
<br />
<br />
e.Graphics.DrawString(Line ,fnt ,Solid ,Left_Margin ,Y_Position ,new StringFormat());<br />
<br />
Count++;<br />
}<br />
<br />
if(Line !=null)<br />
e.HasMorePages=true;<br />
else<br />
e.HasMorePages=false;<br />
}<br />
catch(Exception Ex)<br />
{<br />
MessageBox.Show(Ex.Message.ToString());<br />
}<br />
<br />
<br />
}
Sreejith Nair
[ My Articles ]
|
|
|
|
|
|
Dear Mr. Gold !
I'm trying to find out about Face Recognition system using neural network (back propagation algorithm). I intent to write a program using C#.The most importance in face recognition is preprocessing step, i know that we can feed network with a pixel matrix of image but i don't know how to do this?? And would you mind give me some algorithm for image processing to improve its quanlity as reduce intensity, light, noise????
|
|
|
|
|
Hi
I am writing a windows forms app in C# and sometimes when i build and run the application in debug mode I get the two error screens with the following messages
An unhandled exception of type 'System.NullReferenceException' occured in Unknown Module
There is no source code available for the current location.
Does anyone have any ideas about this? There is no call stack to see where the issue is.
It does not occur every single time. Only about fifty percent of the time but it is anoying.
Thanks for any help.
|
|
|
|
|
try starting the program in debug mode directly. take every code line that is in main and surely you will find the code that makes you headaches. i don't think that the exception is from the .net implementation, maybe you letted an variable unalocated (when one defines a variable assignes it a value, a default value, just to be sure )
I hope you understand...
By the way... visit http://nehe.gamedev.net[^]
|
|
|
|
|
Excuse me, but what are you talking about?????????????????????????????????????
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
//VC++:
memset( SPTWB, 0, Marshal.SizeOf( Win32.SCSI_PASS_THROUGH_WITH_BUFFERS ) );
If C# has an identical funtion to do the same work?
|
|
|
|
|
|
can anybody help me to suspend a process and then resume it also
|
|
|
|
|
What do you mean by "suspend process"?
If your talking about what I'm thinking, you can't. A process can be tagged low priorty, but must remain running to keep it's message pump alive and processing messages. This would include having the app repaint it's client window when necessary, even though the user is not interacting with the app. If you suspend the process and move a smaller window over the suspended process, it won't repaint itself. This would have the effect of having one window "erase" the window of the suspended process.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is Thread.Sleep(milliseconds) what you need?
Regards,
Alvaro
Our enemies are innovative and resourceful, and so are we. They never stop thinking about new ways to harm our country and our people, and neither do we. - George W. Bush
|
|
|
|