|
It wasn't a comment about "how best to be contacted" It was about sharing information so that everyone benefits.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
How to I can know in that remote computer beginning session a X user? In Visual Studio 2005
In a domain without Active Directory.
Thankz
Sorry for my english
|
|
|
|
|
Hi!
I need to make somehing like this! For example: 4 forms, and 4 buttons where there is one button on each form!
When i press button on 1st form, that form is hiding or closing, and second form is showing! When i press button on second form, that form is closing and form 3 is showing, and so on ( when i press 4th button, first form is showing)! I don`t need circular moving! The moving have no rules! It can be first jumps to 4th... How can i control the moving thru program!? Do i need to make some method, like moving control or something!? What is the best solution!? Do i need to make a new instance of the form every time i calling that form or i can do something else! Thanks
|
|
|
|
|
What you want is fairly easy to do.
Each Form already has a ".Visible" property, which you can use to show one form and hide all others.
Each form should get a member "NextForm" which is initialized to the form to be shown when the button on the form is clicked.
In the button handler, hide the current form, and show the next form.
Your main program just needs to initialize the forms, chain them together (by setting nextForm), and you are done.
However, you might consider using a Wizard as this is the typical user interface
We say "get a life" to each other, disappointed or jokingly. What we forget, though, is that this is possibly the most destructive advice you can give to a geek.
boost your code || Fold With Us! || sighist
|
|
|
|
|
Wizard!? I`m not sure i understand what you are talking about! Can you explain me on some example!? When i initialize the forms
Form1 f1 = new Form1();
Form2 f2 = new Form2(); and so on, later, in code, when i type f2.show(); or on Form2, when i type f1 or any f(f3,f4..), i get an error message:
The type or namespace name 'f1' could not be found (are you missing a using directive or an assembly reference?)
|
|
|
|
|
If you want to keep track of your forms, try implementing a cache which will contain all forms.When you want a specific form you simply retrive it from the cache and show/hide/manipulate.
Hope this help.
|
|
|
|
|
How to I can unlock users account of a domain (without Active Directory).
In Visual Studio 2005 ??
Thankz
|
|
|
|
|
how to kill a remote process in Visual Studio 2005 ???
Is a Domain without Active Directory.
Thankz
|
|
|
|
|
Hi
I'm creating a component inherit from Panel under the .NET Framework 2.0 in C#. This component have a title bar in which I draw a text.
I would like to allow other developper who will use my component to edit this text directly via the designer and not only by the propertygrid. For exemple, I would like to do the same thing than in a Menu where you can write the title of your MenuItems in the designer.
Is there anybody can help me ?
|
|
|
|
|
I am trying to write a small web server that will receive POST's.
The data being sent to me does not include length in the header so I just need to read the socket until it no longer has any data. I have tried setting it up by adding this to my current code.
I started with the following which works for small items.
Int32 bytesRead = sock.Receive(byReceive, byReceive.Length, 0);
Then I added a while loop.
Int32 bytesRead = sock.Receive(byReceive, byReceive.Length, 0);
while( bytesRead > 0 )
{
bytesRead = sock.Receive(byReceive, byReceive.Length, 0);
} I have looked at lots of examples that are either too simple or too complex.
I never get out of the while loop.
Anyone have any example code or know where one is?
|
|
|
|
|
Did you try using the Available[^] property instead of (bytesRead > 0)? Also, make sure that the last Receive requests exactly Available bytes, otherwise the socket will block trying to receive byReceive.Length.
int bytesToRead = 0;
while ((bytesRead = sock.Available) != 0)
{
int bytesToRead = Math.Min(bytesRead, byReceive.Length);
sock.Receive(byReceive, bytesToRead, 0);
}
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Yes, I ended up trying some thimg very similar
do
{
bytesRead = sock.Receive(byReceive, byReceive.Length, 0);
totalRead += bytesRead;
Thread.Sleep(100);
strRetPage = strRetPage + Encoding.ASCII.GetString(byReceive, 0, bytesRead);
}
while( sock.Available > 0 );
Now the problem is that without the Sleep it reads the socket once and bails out.
Another problem is that 10% of the time the socket claims to be empty and receives nothing.
I have little hair left to pull out
-- modified at 21:17 Thursday 22nd December, 2005
|
|
|
|
|
when i display Arabic words from data base i see it as ???????
what is the problem ?
and who can solve it in ASP.Net , C# .
Palestine
|
|
|
|
|
Use Nvarchar datatype for storing into database.
and also write n'non english text' in insert query.
Santosh Satalkar
Sr. Software Engineer
Sinoindia GTT
China
|
|
|
|
|
plz give me an example to use this insert query
Palestine
|
|
|
|
|
I am barely a novice in c# and was wondering of any examples writing form variables to Word file variables. I know this can be done in Windows Forms, but I would like to do it in a WebForm. Any help would be appreciated.
dstayton
-- modified at 15:05 Wednesday 21st December, 2005
|
|
|
|
|
Hi,
For one of my project, I need to create a Directx Surface which is Circular. I dont have ides how to do it As All the Draw function of Surface and its overloads will create either Rrectangular or RoundRectangular surfaces.
My basic need is to read a part of surface information from some surface and pass it to a new surface which is Circular in nature and draw it on primary surface.
RVS
|
|
|
|
|
Hi
I have simply created a form in vs2003.
Then i added another form to the project.
when the first form load it starts the other form like this
private void OnLoad(object sender, System.EventArgs e)
{
Form2 fm2 = new Form2();
fm2.Show();
}
But then the I want to get notified when Form2 close,
and i cannot use the ShowDialog(), I simply use
this.close(); to close Form2.
Can someone help me how to get notifed when Form2 close?
Thanks
QzRz
|
|
|
|
|
Try to come up with a subject that is a little more specific. Every question in this forum is a C# questions...
Make an event handler and add it to the Closing or Closed event of the second form.
---
b { font-weight: normal; }
|
|
|
|
|
QzRz wrote: Can someone help me how to get notifed when Form2 close?
Just wire up one of the existing Form events. Wire up Closed if you only care that the form has gone away, or Closing if you want to prevent the close from occuring for some reason:
Form2 fm2 = new Form2();
fm2.Closing += new CancelEventHandler(fm2_Closing);
fm2.Show();
private void fm2_Closing(object sender, CancelEventArgs e) {
}
Share and enjoy.
Sean
|
|
|
|
|
In the mainform (the first form) i have a few events
it has to run through when it close.
So it is in the first form I want to be notified when
form2 close.
I have tried to make the stuff in the first form to
public, but that does not make them to be thrown from Form2.
|
|
|
|
|
QzRz wrote: In the mainform (the first form) i have a few events
it has to run through when it close.
So it is in the first form I want to be notified when
form2 close.
Right, I understood that. The code in my earlier message goes into your "form1", we'll call it.
You have some event in form1 that causes form2 to be displayed (a button click, or a menu selection, or something). That action happens and form2 is created, the Closing event is wired to an event handler in form1 and finally form2 is displayed. The creation of form2, its event wiring and event handling code are all in form1.
When your user closes form2, by invoking a Hide() method, or setting form2.Visible = false , or by clicking on the Windows close button at the top right of the form, the fm2_Closing event handler in form1 will be invoked.
You can do whatever you need to do with the data collected by form2 in that event handler (probably some sort of data validation).
Dig? Share and enjoy.
Sean
|
|
|
|
|
Yes, that did it
I did not know you could do this.
I appreciate you help
Thanks
|
|
|
|
|
Hi:
I am using COM Interop to transfer an array of doubles from Excel to C#. The only way I could find to do this from a google search was to have the data passed to an object. (see code below)
I am unable to cast the generic object into a double[]. In debug mode in C# I can single step into the method and see that dataObject has the elements in it, but I cant find a way to access the elements. Please could you tell me how I can access the elements of the vector?
VBA:
myInterface.CallMethod(doubleVector)
C#:
public int CallMethod(object dataObject)
{
double[] thisArray = (double[]) dataObject; // does not work: says invalid cast
}
Regards, Sam
|
|
|
|
|
What does dataObject.GetType() report the type as?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|