|
I have an MDI application and I want to show/post messages from the child forms. How can I do this? Any examples?
|
|
|
|
|
make form & statusbar public
create object of mdi form
access statusbar's object using mdi form's object
access the properties of status bar like
objMDI.objStatus.Panels[0].Text="message";
thats all,
Atul
|
|
|
|
|
What on earth are you smoking?
You don't have to creat an object of anything... See my reply to the OP.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Easy. Make a public method on your parent MDI Form and call it from your children...
public void StatusMessage(String message)
{
}
this.MDIParent.StatusMessage(@"My status message goes here...");
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
im stuck here. right now i've a long form with groupboxes in it. when i run and display my app, the form is longer than the height of my window screen. i would like to shorten my form to be shorter than that of window screen. i want to add a vscrollbar in the form so that i can shorten the form and still be able to scroll through all my groupboxes. i've no idea how to reduce the size of my form and yet be able to scroll through all the groupboxes.
also, how do i create a link (say when i click on a button in form 1, it will display form 2).. im not sure whether u call that linking or is there a term for this kind of action?
pls help anyone..
thz.. appreciate your help.. =)
|
|
|
|
|
u can use tab strip control or
just use panels, this will show scrollbar as u want.
atul
|
|
|
|
|
On your Form set the property "AutoScroll" to True.
|
|
|
|
|
Hi!
I have this herculian task of converting an asp.net web application written in classic asp style(Application Logic and Presentation in one .aspx file) to Code-Behind and UI style.
Any tips or strategies with regard to this dirty job are welcome
Best Wishes
|
|
|
|
|
You might want to ask this in the ASP.NET Forum.
But in my humble opinion - scrap it and rewrite the thing from scratch.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
actually, I want to get the mean values of the intensity in each sub and then to get the global value,
so, first I need to classify an image into subimages, and want to store each sub image in separate memory space, and
anybody, knows
thanks!
shakeel
Image Processing & Multimedia Lab.
computer Engi. dept.
pknu. korea
|
|
|
|
|
hi
i need to change Cells[1].ToolTip backColor and foreColor,
is it possible?
|
|
|
|
|
eat your feces and you'll find the solution
damn this site!!!
|
|
|
|
|
You had a monkey throw its crap at you recently, haven't you? Caught you square in the face did it?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The ToolTip class doesn't support this. You can try this[^] article here on CP, but I don't know if it's going to help you. The code isn't documented or explained very well, as you can see by the articles rating.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
When I play a video(*.mpg) with Window Media Player, how can i get the detail format(eg. start & end time, duration, frame/sec, file size) of the video?
I use AxMediaPlayer to represent the WMP. Thanks for your help.
|
|
|
|
|
Hi guys,
I have two checkboxes on my datagrid and I have an event that fires whenever the first checkbox is checked (code follows)... but I don't know how to figure out where (what index) the checkbox that fired the event is coming from!!! Please Help!!!
private void cb_CheckedChanged(object sender, EventArgs e)
{
bool bIsChecked;
CheckBox cbTemp = (CheckBox) sender;
bIsChecked = cbTemp.Checked;
if (bIsChecked && ((CheckBox)this.Items[THE INDEX OF THE SENDER!].Cells[1].Controls[0]).Checked)
((CheckBox)this.Items[THE INDEX OF THE SENDER!].Cells[1].Controls[0]).Checked = false;
}
Thanks in advance to anyone who helps me out!
|
|
|
|
|
Set the IDs of the checkboxes as you create them, or in databinding, or something.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
i'm trying to get my C# application to connect to a database which is located in another computer.
what are the steps required to make it function?
i have installed odbc .net data provider and i've tried using this connection string:
myConnectionString = "DRIVER={SQL Server};SERVER=localhost;UID=rfid; Trusted_connection=true;DATABASE=rfid;";
but it gives me a error of access denied or server doesn't exist, i'm not so clear about this, thus i hope to know what are all the steps required for both the client and server to do inorder to make this work
thanks!
-----------------------------------------------
BingLin
|
|
|
|
|
Try changing your SERVER name from localhost to the actual name of the server machine. To get the machine name, right click on "My Computer" and select properties. Select the "Computer Name" tab and you will see the "Full Computer Name".
Hope this helps
Craig
|
|
|
|
|
i've tried connecting to a database in my own computer first, and this is my codes for the connection to test:
string myInsertQuery = "INSERT INTO test (id) Values(4)";
myConnectionString = "DRIVER={SQL Server};SERVER=localhost;UID=root; PWD=wq;Trusted_connection=true;DATABASE=rfid;";
OdbcConnection myConn = new OdbcConnection(myConnectionString);
OdbcCommand myOdbcCommand = new OdbcCommand(myInsertQuery);
myOdbcCommand.Connection = myConn;
myConn.Open();
myOdbcCommand.ExecuteNonQuery();
myConn.Close();
my userid is root, password is wq and database name is rfid, but still it gives me back a result of server doesn't exist or access is denied. is there anything wrong?
|
|
|
|
|
Are you using SQL Server database ?
If you are using SQL Server then you should use SqlConnection and SqlCommnad as follows.
string myInsertQuery = "INSERT INTO test (id) Values(4)";
myConnectionString = "Initial Catalog=rfid;Data Source=localhost;UID=root;PWD=wq"
//Build a SQL Connection
SqlConnection myConn = new SqlConnection(myConnectionString);
//Create a command
SqlCommand cmd = new SqlCommand(myInsertQuery,myConn);
myConn.Open();
cmd.ExecuteNonQuery();
myConn.Close();
myConn.Dispose();
|
|
|
|
|
i tried using the connection string u gave, but it gave me an error:
Data source name not found and no default driver specified
i'm using mySQL server 4.1, and sharpdevelop for my application
my database is in C:\Program Files\MySQL\MySQL Server 4.1\data\rfid
i can't find the error, is there any places with sample programs which i may refer to?
|
|
|
|
|
|
I have a bit of code which declares local variables in a loop, to perform intermediate calculations.
The issue is: the local variable declarations came naturally, as the thought process in designing the loop, but they could be criticised for putting 2 variables on the stack with each loop iteration, so, in the interests of efficiency, they should be declared outside the loop. However, I wonder if it would be better to leave the natural sequence, and trust the compiler to optimise.
The section of code is similar too...
System.DateTime startTime = System.DateTime.Now;
int step = 0;
while (true)
{
System.DateTime now = System.DateTime.Now;
System.TimeSpan span = now - startTime;
if (span.TotalMilliseconds >= step * 1000)
{
System.Console.WriteLine("Tick {0}",step);
step++;
}
}
Stephen Hosking
|
|
|
|
|
I'd do it right myself, and then not have to worry. And I wouldn't bother to declare a variable called 'now'.
Christian Graus - Microsoft MVP - C++
|
|
|
|