|
but then i need to display certain user controls in this panel. how am i to achieve this if i get rid of the centre panel.....
thanks and regards
Madhu Srinivasan
|
|
|
|
|
The centre panel is blocking the child MDI windows. You can either get rid of the centre panel and place your user controls elsewhere, say the toolbar, or set aside an area within the centre panel, maybe another panel, and set this as the parent of the child windows (the child windows would then be normal windows, not MDI children, and set the WindowState to Maximized.
I am leaaving for work now, but if you are still having problems, e-mail me a *small* sample project and I will take a look at it when I get there.
barkingtreeAT hotmail.com
|
|
|
|
|
is there no way to make the form visible in front of the panel when they are mdichildren forms??
they have to be clid forms as i need to have a reference to the mdiparent on each traversal....
thanks and regards
madhu srinivasan
|
|
|
|
|
If you only need to reference the main form from the sub-forms, then you could just set the Owner property after it is constructed.
ie from the main form:
NewSubForm form = new NewSubForm();<br />
form.Owner = this;<br />
form.Show();
...in the sub-form:
this.Owner.Text = "New Caption";
|
|
|
|
|
I recently found that you can associate a file type with an application through creating file types in a setup project. However, how do you handle loading the file when you double click it? Say to load all of the elements within the file into a dataset and then a sorted list?
Thanks
|
|
|
|
|
All the setup program does is associate the file type with an executable. It usually registers something like
YourApp %1
so that the file you double clicked on will appear as a command line parameter to your app. Assuming it's setup that way, all you have to do is check for the file name in Main and do the required action.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Could you post an example or point me in the right direction?
thanks
|
|
|
|
|
Would you need to create another static void main with a string as a parameter?
Thanks
|
|
|
|
|
Hi,
I've a activex browser control in a form. I've added proxy server support to the control by modifying the proxy server settings in the registry. This works fine before the browser control is created (the browser control is only created after a button on the form is pressed). However, once the initial proxy settings are commited and the browser control is created, the browser control does not respond to any new settings even though the registry shows the correct new settings. The browser control seems to be "stuck" on the old settings. How does IE apply any new settings?
Any suggestions?
Thanks
Pieter
|
|
|
|
|
I need to develop a system that can transfer data from 1 pc to another pc using dialup because the user dont want use any FTP service..
so i think i need to create a service at one side that can accept called from another side and get the transaction and stop the connection...
and i need to create i utlity that can dialup and get data and disconnect..
2 utility 1 dialup and 1 accept call..
how do transfer this to my coding any example or source that i can use.. in c#...
or is there any otherway for me to settle this issue.
thanks
joe
|
|
|
|
|
Hi
How I add double quotes to a string.
For instance, I have following;
string s1 = "first string";
string s2 = "second string";
Now I want to combine the two and the result should be:
"first string , second string" (Note: the stirng should contain the starting and ending double quotes")
regards
|
|
|
|
|
You have to escape them with \
string s1 = "\"first string";<br />
string s2 = "second string\"";<br />
<br />
string middle = " , "<br />
string combined = string1 + middle + s2 <br />
You get: "first string , second string"
HTH
Pompiedompiedom...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
You have to use escape characters.
string s1 = "first string";
string s2 = "second string";
string result = String.Format("\"{0}, {1}\"", s1, s2);
|
|
|
|
|
and this is one solution
char q = '"';
string one = "first string";
string two = "second string";
string result;
result = q + one + "," + two + q;
"first string,second string"
|
|
|
|
|
My dilema is I have an app that on Button1 starts another app that I need hidden.
So my question is how can I make it so the app that Button1 starts stays hidden?
I appreciate any help,
Thank you
Here is what I have and I have tried every thing to no avail.
Process myProcess = new Process();<br />
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;<br />
myProcess.StartInfo.FileName = "foo.exe";<br />
myProcess.StartInfo.CreateNoWindow = true;<br />
myProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;<br />
myProcess.StartInfo.FileName = "c:/program files/MyHiddenapp/foo.exe";<br />
myProcess.Start();<br />
myProcess.WaitForExit();
bklynjava
-- modified at 20:07 Sunday 18th December, 2005
|
|
|
|
|
Ultimately, you can't control what the app itself does. If the app forces itself to be shown, there's nothing you can do about it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I don't think thats the case with this, as there is a windowHider app tutorial that will hide it - I may be wrong and the method is different - But I'm pretty sure the right person will know how to either hide it or minimize to tray anything that will remove its Ugly console face from in front of the Primary app.
|
|
|
|
|
Console app? Then you've already done it the correct way.
Process proc = new Process();
proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
proc.StartInfo.FileName = @"NSLOOKUP.EXE";
proc.Start();
Works perfectly fine for me. No console window shows up.
[EDIT]
Might help if I posted the correct language...
[/EDIT]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 23:13 Sunday 18th December, 2005
|
|
|
|
|
Yeah thats the odd problem I been having.
Seems I can't get it hidden.
|
|
|
|
|
In some computer training institutes, the instructor uses a software whose functions are:
1. when teacher is teaching, whatever he does on his computer appears on the computer of the student as a demo.
2. the student cannot use his keyboard or mouse and all input functions are disabled.
How can these things be managed in C#?
|
|
|
|
|
|
I have a C# problem that I need a solution for. I've pretty much mastered in in VB6, but keep running into brick walls, even with all the tutorials for C#.
Here's the definition of the variables you're about to see...
"ClassStudents" is a class I created to manage an array of students read in from...
"LogReader" This is the name given to the SQL select statement that returns the information I'm trying to use.
"logCount" is simply to keep the array element in check.
while (LogReader.Read())
{
ClassStudents[] Students = new ClassStudents[logCount+1];
Students[logCount].setKnown(LogReader.GetInt32(0), LogReader.GetString(1).....
logCount++;
}
Basically, I need to be able to populate an array of what in VB6 would be a simple 'Type' so I can go back to it for data 'after' the fact.
Everything's fine until I leave the while loop, at which point I seem to lose the ability to reference the "Students" array I created. I tried using Structs as well. I know it must be a fundamental rule I'm breaking, but I just can't find any reference to what is happening in any documentation or help files. I found a post basically outlining the method I'm using, but they stop short of any reason why I wouldn't be able to access the data outside of where it was populated. Kinda defeats the purpose, if you ask me.
|
|
|
|
|
Hope i get this straight....
You want to get an array with ClassStudents, and then fill it using LogReader? Ok, let me try:
ArrayList students = new ArrayList();
int logCount = 0;
while (LogReader.Read()){
ClassStudent student = new ClassStudent(logCount);
student.SetKnown(LogReader.GetInt32(0), LogReader.GetString(1));
students.Add(student);
logCount++;
}
ClassStudent firstStudent = (ClassStudent)students(0);
And structs or classes don't really matter for this, the differences between those are completely different.
HTH!
Pompiedompiedom...
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
Ok. That 'kind of' works...
I was able to declare the ArrayList "students", create a new class object "student", pass the values into the object "student" (as far as compile time goes.. can't really test it because of the following...) and add the object "student" to the ArrayList of "students". Ok so far. Now when I try to use the intellisense for "students." I don't get any of the functions that I need to be able to call from the class object that it is comprised of. Pretty pointless if I can't use the functions the whole class was designed for. Any suggestions?
Here's a summary of what I need to accomplish...
1. read multiple records (with multiple fields of varying data types, of course) from a table in a database into an array of some sort.
2. While reading the rows, populate a listbox with a built sting with some of the information (but not all) // This much I can handle all well and dandy
3. I need to be able to pull up various elements from the 'full' array of data for a given line when a user clicks on one of the corresponding "index number" line in the listbox.
4. I had this licked with a handy-dandy "type" variable array in VB6, but C# is just TOTALLY not going to settle for the same approach. I need some advice on the best way to approach this problem. I've wasted over 8 hours already, trying to find a means for something that took me a whopping 20 minutes in VB6, and I feel no closer now than when I started.
|
|
|
|
|
As an ArrayList contains reference to the type Object, you have to type cast the item to use it:
((student)students[42]).MyMethod();
---
b { font-weight: normal; }
|
|
|
|