|
Hi all,
I am working in a vb project, which use only .exe file in the end user session. I am having a problem in .OCX file which is .exe not working in Vista and Windows 2008.
I used regsvr32. which required administration authentication. How i can solve this issue.
Can any one help me to resolve this issue. I great full for them.
Thanks in Advance
with regards,
Senthil.S
A Software Engineer
|
|
|
|
|
An ocx cannot work without being registered. On Vista and 2008, this requires an admin. There's no way around it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi.. i have read before that we can receive file using bluetooth through obex file transfer.. but there is one question that i just cant find the answer.. how can we receive multiple file using bluetooth.. thanks in advance..
Audrey
|
|
|
|
|
I want to add a button in a form and add Click and DoubleClick events for the button,but the code below doesn't work,why?How should I do?
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim btn As New Button
Me.Controls.Add(btn)
btn.Text = "hello"
AddHandler btn.Click, AddressOf btn_Click
AddHandler btn.DoubleClick, AddressOf btn_doubleclick
End Sub
Private Sub btn_doubleclick(ByVal sender As Object, ByVal e As System.EventArgs)
MsgBox("Double click")
End Sub
Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyButton1.Click
MsgBox("Click")
End Sub
|
|
|
|
|
Abraham1 wrote: the code below doesn't work
is not informative. Does not compile? does throw an exception? which one? etc.
why are you handling Click and DoubleClick differently? (there is a "Handles MyButton1.Click" but there is no "Handles MyButton1.DoubleClick")
why do you have two buttons, one called "btn" and one called "MyButton1"???
|
|
|
|
|
The Button control doesn't use the DoubleClick event, so it's never going to get fired.
|
|
|
|
|
strike 2.
|
|
|
|
|
Eh, both are kinda right. There is a double click event, but it's disabled by default through the control styles.
MSDN: By default, the ControlStyles.StandardClick and ControlStyles.StandardDoubleClick style bits are set to false for the Button control, and the DoubleClick event is not raised.
For more information about handling events, see Consuming Events.
Change the control style or extend the button and the doubleclick method yourself.
Article that is referencing C#, but you can get the jist.
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=1481968&SiteID=1
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Thanks for the info.
kissdznuts wrote: referencing C#, but you can get the jist.
Actually I do most of my stuff in C#, so that is all right; reading VB.NET is what might give me the jist if not an itch.
|
|
|
|
|
Well, we're all "kind of" right. What happens is that Control exposes all the stuff the's needed for DoubleClick to work, including the mouse handler stuff (WndProc mouse messages), the DoubleClick and MouseDoubleClick events and their subscribe/unsubscribe handlers, and the OnDoubleClick and OnMouseDoubleClick methods that fires those events. This entire chain is enabled by default, like you've said, through SetStyle, which just enables the various window message handlers. When the Button class inherits Control, it's constructor disables the StandardDoubleClick style, cutting off all double-click processing.
But, this is all nice and everything, but why would you want to change the behavior of a Button to include the non-intuitive ability to double-click it?
|
|
|
|
|
Well,thanks to everyone.Though I still can't solve this problem,I have learned a lot!
|
|
|
|
|
Let's say I create an object of one of my Forms in Class1
Dim _Form as new Form = pForm
And I know for a fact that the form will contain a method (sub) say..
Public Sub DeleteApproved(pObj as object) Implements IDataForm.DeleteApproved
' Do stuff here
End Sub
To ensure that this method is always there, I Impliment a custom interface IDataForm
How do I call this method from Class1?
This doesn't work:
_Form.DeleteApproved(pObj)
Regards!
modified on Friday, December 5, 2008 7:00 AM
|
|
|
|
|
It doesn't work because the variable you declared is of the type Form (wich doesn't contain that methode)
Declare the variable as a variable of the type of pForm and you should be able to access it
So something like:
'lets say pForm is a form of the type Form1
Dim _Form as new Form1 = pForm
_Form.DeleteApproved(pObj)
A little warning here if you try to assign a other type (like Form2) to the variable _Form you'll get an error.
If you have multiple forms that need this (Form1, Form2, Form3, ...) a possible way to do this would be to make all those forms inherit from a specific form (InheritForm), declare the methode there (overridable or mustoverride) and make _Form from the type InheritForm. Then in all the other forms just override the methode.
Hope this is a bit clear if not feel free to ask more
|
|
|
|
|
Hi again Tom, and thank you!
Tom Deketelaere wrote: If you have multiple forms that need this (Form1, Form2, Form3, ...) a possible way to do this would be to make all those forms inherit from a specific form (InheritForm), declare the methode there (overridable or mustoverride) and make _Form from the type InheritForm. Then in all the other forms just override the methode.
This was the next thing I was about to try, the problem is that depending on which form it is, I want different code to execute within the method.
In form1 I want to call an update service over WCF to say... delete a row from the DataSource that populates my DataGridView on form1.
etc.
etc.
|
|
|
|
|
First you might want to look into Luc's solution, could be the answer for you.
If not you can do what you want with intheritance.
Example:
Form1 is the form where all other forms will inherit from
declare the function on this form like:
public overridable function FunctionName (...) as ...
end function
Form2, Form3, ... all inherit from this Form1
here you place:
public overrides function FunctionName(...) as ...
end function
Now when you call the function from your class the code within the functions on Form2, Form3, ... will be excecuted, this code can be completly differant for every form.
On a side note if you place the following in the functions on Form2,Form3,...:
mybase.Functionname(...)
The code in the function on Form1 will also be excecuted otherwise not.
|
|
|
|
|
One of these days, Tom, I'm going fly over to Belgium and treat you to steak and a case of larger!!
|
|
|
|
|
evilnoodle wrote: One of these days, Tom, I'm going fly over to Belgium and treat you to steak and a case of larger!!
Any time you want I always have time for a good steak and a case of larger
|
|
|
|
|
Hi,
the purpose of an interface *is* to call its members, not just to declare them, so try something like:
Dim _Form as new IDataForm.DeleteApproved = pForm
_Form.DeleteApproved(pObj)
modified on Friday, December 5, 2008 11:05 AM
|
|
|
|
|
Luc Pattyn wrote: Dim _Form as new IDataForm.DeleteApproved = pForm_Form.DeleteApproved(pObj)
This doesn't look right. Isn't it supposed to be:
Dim _Form As IDataForm = pForm
_Form.DeleteApproved(pObj)
|
|
|
|
|
Hi Dave,
of course. I did copy/paste too much, trying to get it sufficiently verbose to
get it VB-like.
|
|
|
|
|
We all have those days where nothing goes right. I just have more of them than most people.
|
|
|
|
|
Hi,
Just a small qustion how many triggers we can have on one Table(or Entity or Object).
Thanks,
Aleem Mohammad.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
u can have many number of triggers in a table but the COMBINATIONS U
CAN MAKE can be 12 only
|
|
|
|
|
Means I didnt get your point pls, many number of triggers on one table. What is meant by this combination.
Is it like Insert - Instead of and After
Delete - Instead of and After
Update - Instead of and After. Do you mean this.
Then how can I have more than 6 combinations on one table?
Can you pls. explain me little much more detail.
Thanks,
Aleem Mohammad.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
Hey Aleem,
I'm not sure what your design specifications and intentions are on this project, but you should try and avoid excessive use of triggers. If you need to perform a bunch of actions before and after inserts (whether it is inserts into other tables, data checks, jobs, etc), you should probably use a stored procedure.
Depending on how you want these actions to occur, you can have transactional logic so that all the changes occur or nothing gets committed. Just from reading your question, I would go this way instead of using multiple triggers.....which could drastically slow down performance - esp. if you start doing this with multiple tables.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|