|
|
i have a pagesetupdialog that returns me the height and width of page
but the richtextbox's size property store's height and width in pixels
how can i set the richtextbox's size property in inches as the values comes in inches
psd1.PageSettings.PaperSize.Height
psd1.PageSettings.PaperSize.Width
i have to convert pixel to inches as the richtextbox shows on the form lools like exactly as the page
some have any idea how can this work be done
thnx in advance
|
|
|
|
|
You have to know the resolution to do that, i.e. what ppi (pixels per inch) are you using? This value is often (inaccurately) refered to as dpi.
Then it's just a simple calculation. Just divide the pixel value by the ppi value, and you get the value in inches.
---
single minded; short sighted; long gone;
|
|
|
|
|
|
in the keypress of the textbox test if the key pressed is the "enter" key and run whatever method you want.
|
|
|
|
|
handle the keydown or keypress methode of the textbox
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Enter Then
'do something here
End If
End Sub
I thought there was an easyer way but could be that it was in JAVA don't know any more
but this does work
|
|
|
|
|
hi,
use following code at keypress event of textbox
If e.KeyChar = Chr(13) Then 'Chr(13) is the Enter Key
call yourProcedure()
End If
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
more of a dotnet syntax...
If e.KeyChar = ControlChars.Cr Then
'call procedure
End if
|
|
|
|
|
On keypress:
if e.keychar = cchar(chrw(keys.enter)) then<br />
'do actions<br />
end if
|
|
|
|
|
Hi
Using VS2005 - Visual Basic
I'd like to make a control like a button, but that looks like the Play, Stop, Record, Pause, Skip Forward and Skip Backward.
I'd like to be able to resize the button, and the images must resize.
I's like to be able to set the color of the button as well as the color of the image that shows the fuction of the button.
It only needs a click event.
I'd like to be able to add it under user controls.
I'd like to be able to set the 'function'
I'd like to be able to use the control as follows:
myButton.Style = myButton.Styles.Play
myButton.Forecolor = Color.Red
myButton.Backcolor = Color.Gray
So far I have:
Opened a new project
Chose 'Windows User Control'
Placed a normal button on the form
What do I do next???
|
|
|
|
|
check out:
http://www.codeproject.com/cs/miscctrl/Ribbon_Panel.asp[^]
You probably are thinking that's not what I want (I know it's a ribbon control)
BUT the devoloper creats his ribbonbuttons himself (draws them, does the eventhandling,...) and that is what you want (you will need to adjust a bit but take a look at this code and you should be able to adjust it to what you want)
|
|
|
|
|
Thanks for your reply. I'm pretty much a novice, and battle enough with Visual Basic, so trying to cope with C# is a bit beyond me. Do you know of anything in VB?
|
|
|
|
|
|
How do I send Arguments to a form when I open it?
EG. frmMyForm.Show("MyOpenArgs")
(I know that wont work, but that's more or less what I'm looking to do)
_______________________________________________________________________
http://www.readytogiveup.com/[ ^]
"you can't forget something you never knew..." M. Du Toit
|
|
|
|
|
Hi,
I prefer this way:
- create an instance of your form
- make sure the class has one or more setter properties; use these to pass
1 or more parameters
- then Show it.
An alternative is:
- give your form class a second constructor that accepts parameters
- use that constructor to create the form's instance
- now Show it.
In the special case your form needs the command line, it could
fetch that itself through the Environment class.
|
|
|
|
|
hi all
i need to write the events of the titlebar of the form plz tell me how can do that.
thnx
|
|
|
|
|
what events do you think are present?
|
|
|
|
|
like click event, double click event etc
|
|
|
|
|
i don't think you can trap those events... maybe some api call but vb itself doesn't seem to allow it.
|
|
|
|
|
There are no events for the title bar of the form.
|
|
|
|
|
How about:
me.text = "Whatever you want here"
or:
dim whateverHere as string<br />
<br />
whateverHere = yourFunction<br />
<br />
me.text = whateverHere
The second one is more complete and probably better for your purposes.
Maybe that's what you were looking for. Hope it helps!
|
|
|
|
|
I Want To Programing Mobiles With VB
Can Any One Help Me?
Can You Send Me Any 3Th Part Program?
Tanks
Mogtabam
|
|
|
|
|
You mean vb.net? or vb6.
You nead to be more specific.
For vb.net theres the .Net Compact Framework[^] that works on Windows Mobile phones.
For vb6 i think theres probably no chance.
|
|
|
|
|
Hi
I Want Write Program For All Mobiles
Not For Only Windows Based Mobiles
Tanks.
Mogtabam
|
|
|
|
|
Then you can't use VB.NET for that. Not every mobile phone supports every language and runtime out there. If you want your application supported on EVERY phone out there, you'll have to rewrite your app in various languages to do that.
|
|
|
|