|
|
|
You posted in another forum here. Do not do that. It is cross posting and considered very rude.
mwanyu wrote: playground
The playground is in the Soapbox :->
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
mwanyu wrote: I think its going to be my playground.
Not this forum it is Soapbox.
In BTW,why are you cross posting it? this is not a good practice.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
If i try to display child form then child form disappears, only MDi remains on the screen what might be the reason?
|
|
|
|
|
Master Mind'z wrote: what might be the reason?
I would assume you have a bug.
|
|
|
|
|
You haven't set the parent of the child form. When you create an instance of the child form, set its MdiParent to the MDI form. In C#, this would be:
ChildForm form = new ChildForm();
form.MdiParent = this;
form.Show();
|
|
|
|
|
I have written following in VB.Net
Dim childform As New Form1
childform.MdiParent = Me
childform.Show()
Do I need set some other property of childfom?
|
|
|
|
|
thanks
|
|
|
|
|
Hi,
I have created a service not specifying the username/credentails i.e. local-account. I am trying to change the user to "domain\username" dynamically using ChangeServiceConfig API. This API always returns me error code 87 i.e. “The parameter is incorrect”.
I have explained the problem below. Does anyone why this behavior?
I have detailed the steps below:
I have an issue. I create a service under the local system account. After that I am trying to change the user to domain\user. E.g.: if my domain name is “MSDN” and username name is “me”, I am trying to change the user credentials to “MSDN\me” using the ChangeServiceConfig API. This API is always throwing me an error 87 i.e. “The parameter is incorrect”.
#define SZSERVICENAME “Trial”
ServiceCreate()
{
schSCManager = OpenSCManager(NULL, // machine (NULL == local)
NULL, // database (NULL == default)
SC_MANAGER_CONNECT | SC_MANAGER_CREATE_SERVICE // access required
);
schService = CreateService(schSCManager, // SCManager database
TEXT(SZSERVICENAME), // name of service
TEXT(SZSERVICENAME), // name to display
SERVICE_ALL_ACCESS, // desired access
SERVICE_INTERACTIVE_PROCESS|SERVICE_WIN32_OWN_PROCESS, // service type
SERVICE_AUTO_START, //SERVICE_DEMAND_START start type
SERVICE_ERROR_NORMAL, // error control type
szPath, // service's binary
NULL, // no load ordering group
NULL, // no tag identifier
TEXT(SZDEPENDENCIES), // dependencies
NULL, // LocalSystem account
NULL); // no password
}
ChangeServiceParms()
{
//Domain = “msdn.try.com”, computer name is “comp”
LPTSTR szServerDNS = “comp.msdn.try.com”;//Fullname of the computer
LPTSTR szAccountDN = “MSDN\me”;// User to which I am trying to logon
SC_HANDLE schSCManager, service;
schSCManager = OpenSCManager(szServerDNS,
NULL,
SC_MANAGER_CONNECT );
ervice = OpenService(schSCManager,
TEXT(SZSERVICENAME),
SERVICE_ALL_ACCESS);
BOOL success = ChangeServiceConfig(service,
SERVICE_NO_CHANGE,
SERVICE_NO_CHANGE,
SERVICE_NO_CHANGE,
NULL,
NULL,
NULL,
NULL,
szAccountDN,
NULL,
NULL);
if(!success)
{
DWORD err = GetLastError();
}
}
|
|
|
|
|
nlharshini wrote: LPTSTR szAccountDN = “MSDN\me”;// User to which I am trying to logon
Are you aware that the backslash character is an escape character?
|
|
|
|
|
What does your question have to with Windows Forms?
/ravi
|
|
|
|
|
I'm not sure whether this can be achieved, but here goes.
I have created a new color dialog for a simple html editor. I would like to packeage the form into a dll, so that when added to a project, the dialog appears in the toolbox. I am using C# express 2005. I can achieve this when creating a normal control but I am stumped when it comes to having a form in the dll instead.
If anyone has any ideas as to how to achieve this, or even a small demo, I would be truly grateful.
|
|
|
|
|
This is actually done quite frequently. It wouldn't be a Control in the DLL, but rather a Windows Form in the DLL, which you can initialize and invoke just like you would with any other form outside of the DLL.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Hi, Yes I can do this. What I want to achieve, is see the form like the current colordialog in the toolbox to the side of the design window.
|
|
|
|
|
Mike Kitchen wrote: Hi, Yes I can do this. What I want to achieve, is see the form like the current colordialog in the toolbox to the side of the design window.
In design view, just right-click on the Toolbar, choose "Add/Remove Items" and select your custom library that contains your control. You can only do this for custom controls though, not for actual forms.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Mike Kitchen wrote: like the current colordialog in the toolbox to the side of the design window.
Then you need two things. You need the custom control with a designer implementation so it can be in the toolbox and dropped on a form by a developer. The interface (API) you create for the control supplies the mechanism that is used at runtime to launch the Windows Form that is also in the assembly (or in another assembly I suppose).
|
|
|
|
|
OK. I am being a bit slow with this. So could you point me in the right direction to achieve this please. If I get it sorted I will post the dialog as an article.
|
|
|
|
|
I doubt you will find an example of doing exactly what you intend. You need to piece the inforamtion together. I suggest you first learn how to create a custom control. That's pretty simple but then you need to learn about implementing the Visual Studio designer support. From there you should be able to see how your non windowed control is used by a developer to implement the showing of the form that is in the assembly. My original post contains the key words you would use in google to start researching, something like:
MSDN Windows Forms custom control designer
|
|
|
|
|
Hi
Yep, started doing a few google searches and I have come up with a few links, so hopefully I am on my way with it now.
Thanks for the help, and if I get it sorted I will post the control as an article.
|
|
|
|
|
I have a ClickOnce application downloadable on the web set to be Online only - no install on user's machine.
One user couldn't get it to work. Then, looking at screen shots she sent me, realised that the custom error messages did not match the text that I could see in front of me in VS.
So I changed the title of the form in question, bumped up the build number, just to be sure there hadn't been a typo and I was publishing a lower number, re-published and when the screen shots came back, it was an older version of the app that was running(which doesn't exist on the web server)
It works perfectly on my PC.
The user claims to have cleared all Temp files and browsing history to no effect.
All I can think of is that this might be related in some way to the WINDOWS\Prefetch folder. Could the app have gotstored on the PC even though it's designed not to install locally?
Anyone have any ideas?
Rich
|
|
|
|
|
How to Generate the Crystal report in Asp.Net using C#
nadi
|
|
|
|
|
Is to export the report to PDF and then render the pdf.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
hello can somebody tell me how to get the binary data sended by a joystick connected on my pc through a serial port
regards
dghdfghdfghdfghdgh
|
|
|
|
|