|
thanks for this Prompt & kind support
Hema Chaudhry
|
|
|
|
|
I have created a usercontrol in vb.net, but i want the ability to add other controls to this using the form designer?
This already happens in visual studio, for example when you drop a panel on the form and then drag and drop another control, button, panel, anything into that panel in then adds it to the control.
how can i add this function to my control?
e.g
Private Sub DragDropControl_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles MyBase.DragDrop<br />
<br />
'gets the control<br />
<br />
End Sub
Private Sub DragDropControl_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles MyBase.DragEnter<br />
<br />
'reads the data and check weather this type of control can be dropped<br />
<br />
End Sub
thanx
|
|
|
|
|
So, you want to drag a control from somewhere on your form, onto your usercontrol, at design time? Do you just want it to be visible there, or do you want it to be part of the control?
Normally, the drag an drop features for controls handle data from one control to another. What you want to do can probably be done, but it may take some work.
Roy.
|
|
|
|
|
Basically my usercontrol is like a toolbar control that you would move other controls onto, but like you say Roy yes the controls added would have to then become attached or added to the main base control.
|
|
|
|
|
OK. What you will need to do is, as the control is dropped on your user control, identify what type of control it is.
I assume that you want this control to be persistant (i.e. still there when you restart your app later). If so, you need to store a list of controls to be populated on your user control. You could store the list in an XML file, or in the registry.
Finally, you need to dynamically create the controls; both at startup, and when a new control is added. Remember that you are not actually dropping a control on your usercontrol, you are identifying the type of control.
Sorry is this is kind of vague. I have not actually done this. But this is how I would try it. Hope this helps.
Roy.
|
|
|
|
|
Hi guys :
which are the differences between ServicedComponent(com+) and ClassLibrary(component)?
are they incompatible??????
thanks
|
|
|
|
|
HI,
Do any one know how to use a user control of vb.net in vb6.0
and also i want expose all its events to vb application such as click event of that user control
How can i do this ,
If any one knows please help me......
Thanks
Animesh Misra
-- modified at 2:31 Thursday 15th December, 2005
|
|
|
|
|
Which of the following is faster :
1. if drRows.Length then
end if
2. if drrows.length > 0 then
end if
3. if Cbool(drrows.length) then
end if
Any Suggestions?
Thanks
|
|
|
|
|
It's rather easy.... test it!
Do a 1000000 loop and clock it or in a smarter way use system ticks (read them before and after the loop, the difference is the elapsed time).
|
|
|
|
|
Yeah..it would be easy to test. My guess it #1 is the fastest. All three are doing drRows.length but #2 and #3 are both doing an additional operation.
"Half this game is ninety percent mental."
- Yogi Berra
|
|
|
|
|
My suggestion (and dare I say the 'correct' way) is to use (#2) because you are comparing "apples with apples" and not forcing an implicit (#1) or explicit (#3) type conversion.
The conversion may cause problems in the future and there is no guarantee that (#1) for example will evaluate to Boolean, nor (#3) evaluate to False when the value is zero.
...Steve
"Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
Thanks Briga, dotnethead, and Steve for your replies.
As suggested by briga, i ran a test program with loop of 9999999. When i run the test about many times, each time the result was different. Some times Case #1,#2,#3 all took same time, at times #1 was the fastest, at times #2 , another time #3 and at other times there was a tie b/w the cases. so could not reach a conclusion.
As Steve pointed out [it was the reason i posted the question] #1 involves an implicit type conversion [integer is converted to boolean], #2 a comparison and #3 an explicit type conversion, it is difficult to say which would run faster.
After much thought i too reached the conclusion that #2 is better [it atleast explains the code better]
Thanks every one
|
|
|
|
|
l need to make a project of voice user inteface..can i use visual basic to make this project?and are there anybodies that already make this project?
sienosuke
|
|
|
|
|
Microsoft has a speech SDK. If it work with .NET, you can use any .NET language with it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thanks a lot ya... ...emm in your opinion which .net language is easier to use to make this project?
sienosuke
|
|
|
|
|
It really doesn't matter, whatever you're comfortable with.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ok thanks again..
sienosuke
|
|
|
|
|
Hi,
I am trying to use nhibernate in the VB.net,(Asp.net) but i am encountring a problem.
the error is -:
System.TypeLoadException: Could not load type Glas.Test.User from assembly NhiberTest.
I have embeded the User.hbm.xml file but still this error is comming.
The interesting part is that when i am using the same code in C# applicatiuon then the code executes fine.
Can anyone help
|
|
|
|
|
Hi All,
In my project, I want to check the version of Oracle SQL*PLUS used. The user will browse for the Oracle SQL*PLUS executable and give the path together with exe name in a text box. But if there are two SQL*PLUS exes installed in the machine (One with version 8 and the other with version 9), I want to check the version of the SQL*PLUS executable. Only the executable with version 9 will be working for my project. The confusion is that there are two types of SQL*PLUS available for each version. One is a windows based utility with name SQLPLUSW.exe [Oracle Version 9] and PLUS80W.exe [Oracle Version 8]. The other is a Dos utility with name SQLPLUS.exe [Oracle Version 9] and PLUS80.exe [Oracle version 8]. My problem is I am not getting the version of the Dos utilities (PLUS80.exe and SQLPLUS.exe) using the GetFileInfo() method.
Can anyone suggest a method to get the version of a DOS-based utility program?
Thanks in Advance
Padmakumar.G
|
|
|
|
|
DOS .EXE's don't have this kind of metadata in them. About the closest you're going to get is probably checking the file's date/time stamps or file sizes for the correct version. Or, possibly looking for some kind of signature in the .EXE file somewhere. You'd have to know what the differences are between the two versions of the same file, though.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dear All,
1. Develop by VB.NET 2003
2. Using MS-Access database
3. When execute in Windows NT 4.0 Server, pop up me an error message say "Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine".
Who can tell me what's wrong in Windows NT 4.0 Server.
|
|
|
|
|
Install MDAC if it is not installed. If it is installed try reinstalling it.
If that doesn't help try installing Jet 4.0 Service Pack 8.
You can also use the Component Checker to find problems with your MDAC installation.
|
|
|
|
|
Thank you. I was try myself to install Microsoft Jet 4.0 driver on it. Now can work already.
|
|
|
|
|
Are there any tools available to export Lotus Notes Databases to either Excel or SQL Server 2000?
Thanks
/jason
|
|
|
|
|
I'm trying to encrypt bytes that is larger than the allowed maxim length of RSACryptoServiceProvider.Encrypt. Does anyone know how to do that? Thank you!
Sunniawatz
|
|
|
|