|
You need to send the parts of the app individually, or create this shared class in a dll that both projects use, so their type is the same.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi all.
iam developing webchat application that hosted on the internet explorer when first tested it it gets to me an exception of type security namespace but i solved that probelm by adding permissions in my dot net configuration manager in my control panel ok and that exception i overcome it successfully but when i ran my server that listens to my port 5151 and ran my internet explorer it takes alot of time to connect to the server and then the client connected and disconnected immediately without anything or any reason i don't know why any help about what is the probable reason for that ?
Miss With The Best And Die Like The Rest
|
|
|
|
|
If you use punctuation, it might be possible to understand what you are writing...
---
b { font-weight: normal; }
|
|
|
|
|
hi,
anyone noes how can i display/pop-up a form IN a tab page? instead of simply typing
form2 frm = new form2();
frm.Show();
wat codes do i write to tell the program to display the form at a certain place such as in a tabpage for my app?
thanks..
|
|
|
|
|
Why do you keep asking the same questions over and over ? Why would you want to do such a thing ?
The tab page has a controls collection, adding your form to that would be the only way, but it means the form needs to be written badly, if you want the tab page to have any access to it's properties.
It's a hack, I recommend against it. Just create tab pages, if that's what you want.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Why do you keep asking the same questions over and over ?
sorry, cos i was afraid nobody'll see n ans the older posts.. so i posted again.. also, i don get wat u mean sometimes cos im still tryin to grasp c# concepts.. i read articles n books but still hardly get it.. i really need hands on learning - exploring/learning c# in the process of doing this app.. i feel that i learn better n faster like this.. im v sorry that u've to tell me over n over again.. but im stressed... it's kinda rush as there a few parts to my app and i gt to make it neat n working in time.. so i really really do appreciate your effort..
i wan to let forms display in a window-like or panel-like format.. dat's y i chose to use tab page.. mayb that's not a wise choice but as long as i can get it workin n displayin the way i hope to, i wld like to move on wif my tasks already..
firstly, i wan to check wif u how to add my form to controls collection.. do i click on tab box > properties > controls collection? den frm there how do i add the form? i need some simple guidance here.. pls help me...
thanks a lot..
|
|
|
|
|
nidhelp wrote:
also, i don get wat u mean sometimes cos im still tryin to grasp c# concepts..
Then ask again You wouldn't be the only person I keep posting back to for several days.
nidhelp wrote:
i read articles n books but still hardly get it..
Perhaps you need to write some console stuff before you start trying to grasp how a GUI app works ? That's sure what I did when I learned C++, and I'm sure I'm all the better for it. Bite off a piece at a time, don't try to swallow it all at once.
nidhelp wrote:
it's kinda rush as there a few parts to my app and i gt to make it neat n working in time.. so i really really do appreciate your effort..
It worries me how many people are asking questions that show a lack of basic knowledge, and at the same time talk about being worried for their deadlines. THere's nothing wrong with being a beginner, but why do you have a deadline ?
nidhelp wrote:
i wan to check wif u
Dude, the deliberate bad spelling is just annoying.
nidhelp wrote:
firstly, i wan to check wif u how to add my form to controls collection..
That was a guess, I just tried it and it doesn't work. You CANNOT add a form to a tab page. You need to recreate the form in a tab page, you can just copy and paste in the designer to do this. The form class is useless to you if you want it to show in a tab page.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Then ask again You wouldn't be the only person I keep posting back to for several days.
>> first, thanks for your encouragement.. just hope that u wont find me annoying for bugging u all the time..
Perhaps you need to write some console stuff before you start trying to grasp how a GUI app works ? That's sure what I did when I learned C++, and I'm sure I'm all the better for it. Bite off a piece at a time, don't try to swallow it all at once.
It worries me how many people are asking questions that show a lack of basic knowledge, and at the same time talk about being worried for their deadlines. THere's nothing wrong with being a beginner, but why do you have a deadline ?
>>this is my sch proj which has a deadline.. having to do dis app individually using c# n IDE which are alien to me, plus the fact that im really weak in programming really stress me up.. i know i'll learn more n better if i learn bit by bit but im kinda forced to do it the fast n easy way with the deadline -_-''.. what i need n hope now is to be able to continue working on my app just so that i can finish it in time.. if i have time i really would love learning bit by bit for that's my style =)
That was a guess, I just tried it and it doesn't work. You CANNOT add a form to a tab page. You need to recreate the form in a tab page, you can just copy and paste in the designer to do this. The form class is useless to you if you want it to show in a tab page.
>>does that mean it's IMPOSSIBLE to show a form in tab page with a button press that calls to show form?
i want to display those popup forms in one selected part of my form.. at the selected part of my form, i will create a viewing panel/window/frame/box where forms show up in.. the layout is like what u see in your screen now: MANY WINDOWS(/forms for my case) SHOWN IN TASKBAR so that user can see what forms are opened n select what he wants to view + ONLY ONE WINDOW THAT'S OPENED/MAXIMISED to allow user neat n easy viewing.. i really dont want those forms to popup/show everywhere in my screen... help..
thanks..
|
|
|
|
|
nidhelp wrote:
this is my sch proj which has a deadline..
Then either you've been jerking off in class, or your teacher is an idiot to give you an assignment she has not prepared you for.
nidhelp wrote:
i know i'll learn more n better if i learn bit by bit but im kinda forced to do it the fast n easy way with the deadline
The point is, you won't learn at all, you'll end up in online forums, using whatever code people give you, because you don't have time to understand it all. But that's not your fault, obviously, if you've been given an assignment of this size to start with.
nidhelp wrote:
does that mean it's IMPOSSIBLE to show a form in tab page with a button press that calls to show form?
Yes. It means you need to recreate the form as a tab page, like I said a couple of days ago
nidhelp wrote:
MANY WINDOWS(/forms for my case) SHOWN IN TASKBAR
You want these forms to show in the taskbar ? They will do that, but not if they are in a tab page.
nidhelp wrote:
ONLY ONE WINDOW THAT'S OPENED/MAXIMISED to allow user neat n easy viewing..
If there's one window, there will be one task bar item at maximum.
nidhelp wrote:
i really dont want those forms to popup/show everywhere in my screen... help..
You can't have the taskbar functionality you want, if the forms are all in one window. You need to recreate these forms as pages on a tab control, if that's the way you want to go. But then you will have nothing on the taskbar, just buttons in your app, using the code I showed you the other day.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hmmm im not sure whether u get what i want to create.. how i wish i can draw n show u.. haha.. well.... i don get it.. u said to create the form as tab page.. does that mean clicking showformbutton will display a tab page made up of the form?
haha.. it's the teacher's way of training us.. by learning new language on our own...
well.. i do learn thro forums... though bit by bit gives me better understanding but forums help me get on with my app quickly when im lacking of time.. that's reality.. too fast, too rush.. but no choice got to survive!! haha..
|
|
|
|
|
nidhelp wrote:
hmmm im not sure whether u get what i want to create..
I think I do, you've been telling me for days.
nidhelp wrote:
u said to create the form as tab page..
Yes.
nidhelp wrote:
does that mean clicking showformbutton will display a tab page made up of the form?
Yes, it means that you use the code I gave you, and the tab pages that you have in the dialog each contain the same layout as the forms you're using now, so you create tab pages that look like the forms you need.
nidhelp wrote:
haha.. it's the teacher's way of training us.. by learning new language on our own...
Complain to the school. Seriously.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i saw a glimpse of hope when u helped me out.. im so thankful for u.. =)
btw im trying out what u said reg the codes... hope i can get it working today..
no use complaining, that's the sch's system.. they say learn not to be spoon-feed by teachers, to be independant n resourceful, to be productive n not learn too much for we may not get to use all that we learnt.. is this the world today??? so realistic.. well i still prefer moderate amount of guiding n self-learning... haha..
|
|
|
|
|
Good luck - once you recreate the forms as tab pages, it's pretty straightforward.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ok so what do i do with
if (tabControl1.TabPages.Contains(tabPage1))
{
tabControl1.TabPages.Remove(tabPage1);
}
else
{
tabControl1.TabPages.Add(tabPage1);
}
where do i add them in my program?
how do i add event handlers to hook up to the buttons on the main page, and when i press a button, a tab page appears or disappears?
can u tell me where do i go to in order to add event handlers as well as the steps to do it..
|
|
|
|
|
nidhelp wrote:
where do i add them in my program?
That's what the method does which is called when you press a button. For the sake of time, I'd just add a public method for each button to call that does this, and call it from your main dialog class.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
it's ok.. i managed to do it..
but it's not the way i want it exactly..
1)how can a user close a tab page including the tab after viewing it??
i dont mean it this way:
tabControl1.TabPages.Contains(tabPage4)
{
tabControl1.TabPages.Remove(tabPage4); }
2)how do i disallow the user from opening the same tab page of information?
i dont want to disallow the button function.. just want to disallowing opening of tab page..
thanks
|
|
|
|
|
I’m developing an C# Application that uses an (old) ActiveX that I still do some modifications on.
My problem is that I can’t compile the ActiveX while I’m running my Applicaion project. That’s because the ActiveX is running in the environmet (on one of my Forms). Any tip how to handle my problem…
_____________________________
...and justice for all
APe
|
|
|
|
|
You must close your application if you want to comiple the ActiveX control. Generally people change the name of the .ocx file generated after the build to see if it compiles correctly in this situation. If you are happy with changes of ActiveX control, close the application, change the name of the output ActiveX and recomiple. Start the application again and you are done.
Live Life King Size
Alomgir Miah
|
|
|
|
|
Alomgir Miah wrote:
You must close your application if you want to comiple the ActiveX control. Generally people change the name of the .ocx file generated after the build to see if it compiles correctly in this situation. If you are happy with changes of ActiveX control, close the application, change the name of the output ActiveX and recomiple. Start the application again and you are done.
...and that's is just what I don't want to do.
I don't want Visual Studio .NET to run the AxtiveX in the environment...
_____________________________
...and justice for all
APe
|
|
|
|
|
Hi Friends,
I have a small problem.
I am working with C#.net and asp.net
I am using try cath block to detect the errors.
But if I write like this
try
{
.........
.......
}
catch(FormatException x)
{
.........
..........
}
it is not catching the exception in catch block rather it simply give me error in browser.
and if I write like this
try
{
................
.........
}
catch(Exception x)
{
...........
.........
}
it works fine.
But I want to diplay different message according to the exceptions caught.
Plz help me in this problem
Thanking all of u in advance.
Chetan Ranpariya
|
|
|
|
|
are you sure that exception type is FormatException
any way why not try some thing like this
try
{
}
catch(FormatException ex)
{}
catch(Exception ex)
{}
finally
{}
|
|
|
|
|
Hi,
Thank u for ur reply.
I tried the way u suggested.
When I printed the message of exception that is of system.formatexception.
but that exception was not being caught.
Then I tried to know the type of exception and I got it was the ArgumentException and I tried to catch that and I got success.
But the question is that if it is ArgumentException then why the message shown is of system.FormatException.
Can u plz clarify this?
Thank u again.
|
|
|
|
|
what do you mean by saying message shown is of system.FormatException.
can you post the code and exception message
may this help
|
|
|
|
|
Following is the code that I am running in a clikc event of a button followed by the message that I am getting when the exception is caught.
private void bttnSaveUserPersonalInfo_Click(object sender,EventArgs e)
{
DataRowView drwNewUserPersonalInfo;
string strUserRoles = String.Empty;
try
{
drwNewUserPersonalInfo = dvUserPersonalInfo.AddNew();
drwNewUserPersonalInfo[0] = txtUserLoginID.Text;
drwNewUserPersonalInfo[1] = txtUserLoginPassword.Text;
drwNewUserPersonalInfo[2] = txtUserLastName.Text;
drwNewUserPersonalInfo[3] = txtUserFirstName.Text;
drwNewUserPersonalInfo[4] = txtUserMiddleName.Text;
drwNewUserPersonalInfo[5] = txtUserDateOfBirth.Text; drwNewUserPersonalInfo[6] = txtUserSSNumber.Text;
drwNewUserPersonalInfo[7] = cboUserMaritalStatus.SelectedValue.ToString();
drwNewUserPersonalInfo[8] = cboUserSex.SelectedValue.ToString();
drwNewUserPersonalInfo[9] = txtUserNationality.Text;
drwNewUserPersonalInfo[10] = txtUserAliasName.Text;
drwNewUserPersonalInfo[11] = txtUserCurrentLocale.Text;
drwNewUserPersonalInfo[12] = Session["UserID"].ToString();
drwNewUserPersonalInfo[13] = DateTime.Now;
drwNewUserPersonalInfo[14] = Session["UserID"].ToString();
drwNewUserPersonalInfo[15] = DateTime.Now;
drwNewUserPersonalInfo.EndEdit();
dstUserPersonalInfo.WriteXml(MapPath"./DataBase/UserPersonalDetails.xml"));
ViewState["NewUserLoginID"] = txtUserLoginID.Text;
}
catch(System.ArgumentException) //This exception is caught the message *
{
Response.Write(x.Message);
}
}
//Message displayed when ArgumentException is caught
System.FormatException: String was not recognized as a valid DateTime. at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at System.DateTime.Parse(String s, IFormatProvider provider, DateTimeStyles styles) at System.DateTime.Parse(String s, IFormatProvider provider) at System.Convert.ToDateTime(String value, IFormatProvider provider) at System.String.System.IConvertible.ToDateTime(IFormatProvider provider) at System.Convert.ToDateTime(Object value) at System.Data.Common.DateTimeStorage.Set(Int32 record, Object value) at System.Data.DataColumn.set_Item(Int32 record, Object value)Couldn't store <> in USER_DOB Column. Expected type is DateTime.
Plz review this code try to get the solution.
Thankin u
|
|
|
|
|