|
if the ListBox.DataSource is a DataTable, isn't each item in the ListBox a DataRow?
|
|
|
|
|
|
Hy there,I hava a problem..I created a control that has a public Brush property that the developer chooses from the property window. But If i change it..it doesn't get serialized to InitializeComponent() so at runtime it still has the default value
I created a UIEditor for this property and a BrushConverter : TypeConverter to let the design-time know how to convert from a InstanceDescriptor to a Brush.
Why doesn't this work? I debugged the design-time and when I change the property..the breakpoint in the method ConvertTo from the type converter doesn't hit
Thank you in advance.
|
|
|
|
|
Can't anyone help me with this problem? How can I make a control that has a Brush property that gets serialized to InitializeComponent()??
I mean I know that Brush is an abstract class..but Image is abstract to and that doesn't stop a Form to serialize it's BackgroundImage..for example. Damn
|
|
|
|
|
ctoma2005 wrote: Can't anyone help me with this problem?
It would probably help if you post the code in question.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
I have a complete database software program in vb.net working perfectly but i have a problem. During installation i want the user to be prompted to insert a username and password as a connection string to their database, i think it is also called a dynamic installation, But i can not implement that i was also told i can call the sql interface login in my project to appear once during installation but i have no idea how to implement that. I will be very greatful if anyone could assist me with help.
Thanks in advance
Ivan
|
|
|
|
|
It's far easier to have the app prompt the user if it's run and the data is not there, than try to make an installer do it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
|
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.
|
|
|
|