|
i know may be i am being unreasonable by asking the same question again and again but i really need the help that how can i send the right click msg out of my Vb.net application plzzzzzzzzzzzzzzzzzz
farah
|
|
|
|
|
What do you mean when you say
right click msg out of my Vb.net application
Explain what you want to do in Details
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
without more detail :
use the mousdown event
check to see if its the right button
send the message (whatever you mean with this)
form1_mousedown
if e.Button=Windows.Forms.MouseButtons.Right then
messagebox.show("bla")
end if
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
you have to use API mouse_event to simulate a mouse click.search for it
A.E.K
|
|
|
|
|
You can keep asking, but until you answer the questions you've been asked about your requirements, you're going to get ignored.
This is the third of forth time you've asked this question and you've repeatedly ignored answering the critical questions asked of you and ignored the advice you've already been given.
No, we're not going to write the code for you. This is NOT something for someone very new to programming, let alone someone who doesn't know how Windows works.
|
|
|
|
|
Hi everyone
Could anyone help me. I would like to restrict the users of my software from maximise the form. Is there any way of disabling the form maximise property?
The other thing is I would also like to detect when the user closes the form using the X in the right corner.I would like to ask the user if they want to save before closing down. What event is this and how is it called?
Thanks for reading this and I hope u will be able to help me.
|
|
|
|
|
hi twsted f8
to Remove the button to Maximise, Right Click on your Form and click on Properties, in your Properties Window, look for Window Style --> You will find the Option "ControlBox", set it to "False" and you Buttons will be gone.
but Now if you set the Controlbox to false then you will not see the (X) button to close your Form, you will just have to create your own button.
you can but the same code in the Following events
The Following code is in your Form closing event
<code>
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
If MessageBox.Show("Do you want to Exit", "Question", MessageBoxButtons.YesNo) = DialogResult.Yes Then
Me.Dispose()
Else
'''Do nothing
End If
End Sub
</code>
Note that you can Create a button for your self and write the same code.
Hope this helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswamb wrote:
<br />
Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing<br />
If MessageBox.Show("Do you want to Exit", "Question", MessageBoxButtons.YesNo) = DialogResult.Yes Then<br />
<br />
Me.Dispose()<br />
Else<br />
'''Do nothing <br />
End If<br />
<br />
End Sub<br />
now in both cases the form will close
instead of '''do nothing there should be e.cancel = true
Vuyiswamb wrote: to Remove the button to Maximise, Right Click on your Form and click on Properties, in your Properties Window, look for Window Style --> You will find the Option "ControlBox", set it to "False" and you Buttons will be gone
the user is still able to maximise his window by dubbleclicking the title bar
using the formborderstyle property might be a better way to accomplish what he wants
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
twsted f8 wrote: I would also like to detect when the user closes the form using the X in the right corner.I would like to ask the user if they want to save before closing down. What event is this and how is it called?
look at the formborderstyle property there are several wich will do what you want all with different looks
twsted f8 wrote: I would like to restrict the users of my software from maximise the form. Is there any way of disabling the form maximise property?
events:
formclosing
formclosed
whith e.CloseReason=CloseReason.UserClosing you can distinguish between a user closing you'r form or another programme (or you'r own programme)
hope this helps
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
the best i found to let my form remain in maximized state is by overriding onSizeChanged method (or by handling sizechanged event) and writing following lines there
If Not DesignMode Then
If Not Me.WindowState = FormWindowState.Maximized Then
Me.WindowState = FormWindowState.Maximized
End If
End If
if user tries to change the size even by clicking on maximize button the form will restore back to previous stat. keep in mind initially you will have to set the windowstate of form to Maximized
Salman Sheikh
|
|
|
|
|
true this will work nice if you want the form to be maximised but the OP asked to prevent maximising so I figured the form isn't maximised at all (also not at start).
you can still use you're code to accomplish this (just put the size back to original size) but the user will get the arrows for resising the window, will be able to click and drag, might even be able to resize the window for a split second. All of this will result in a very confused user and a flickering screen so...
but if you want the windowstate to be maximised at all times you'r code would work, although I think the window will flicker for a split second (not shure about this)
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
Just an idea - why not allow the users to maximize the form and anchor objects on the form.
This will then rescale the form as the user resizes it.
I mention this just in case you have not yet figured out how to allow the form to rescale - and in case that is what you were trying to prevent.
Apologies if I am teaching my grandmother to suck eggs here...
Regards
Guy
You always pass failure on the way to success.
|
|
|
|
|
i think we have a property called Cancel in the event of form_close
so you have to do this to prevent closing window
e.cancel=true
A.E.K
|
|
|
|
|
How convert txt file to ms-access please urgently
for e.g
txt file format
[2007/09/01-00:04:58]/1/0/5/0
Details
Date Time Id Id Id Id
[2007/09/01 - 00:04:58] /1/ 0/ 5/ 0
-- modified at 2:22 Tuesday 9th October, 2007
|
|
|
|
|
Gagan Deep Garg wrote: please urgently
It's rude to say this. It can't be that urgent, otherwise you would be paying someone for assistance.
Doesn't Access have a text file import facility?
Paul Marfleet
|
|
|
|
|
you will have to parse the string for doing this
you can create an access database with a table with your required schema
and then start reading file using streamreader line by line and split every line on separator and use the literals as values for your access datatable
Salman Sheikh
|
|
|
|
|
hi,
i want to create Convertor of English statement To my own mother tongue(i.e. Gujarati) Language via VB 6.0.
please anybody help me. it's very urgent.
pleeese help me....
vijay a. parmar
|
|
|
|
|
without more detail this is all I can tell you:
you'll need a database with all translations
then you'r user types in a word (or sentence) and you look this word up in the database and display the corresponding translation
(for the sentence you can split it into words using the split methode)
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
DataGridView Help... How to insert windows control inside the DataGridView row or cells as an input control?
for example: datepicker inside a Datagridview to input a valid date?
or neither maskbox inside a DataGridView cells or row??
I've seen it before in some application in the internet but i dont have an idea how to do that??
Is there anybody there have an idea or solutions??
Please...
|
|
|
|
|
It's not easy, since you have to pretty much make you're own DatGridViewColumn class.
I think you can find an example here[^] on MSDN.
|
|
|
|
|
how to convert pdf to html by using source code? pls help me.
karthi
|
|
|
|
|
Usually it goes the other way around.
Google for "pdf to html component" and you might come up with something.
|
|
|
|
|
I am working in vb.net and it is web application here I want to validate for uppercase or restrict to user to enter lower case in text box. how can I do this.
Ashish K. Vyas
|
|
|
|
|
You can use UCase()...
Eg
Dim stDest as string
stDest = UCase(text1.text)
this will convert content of text box to upper case
Good luck
|
|
|
|
|
You can either do it server-side by converting whatever they type in whatever case to the case you need AFTER the page is submitted, or you can write the JavaScript code into the page to handle it on the client-side.
And the is a question for the ASP.NET forum. It really has nothing to do with VB.NET at all.
|
|
|
|