|
what is the size of Windows form when it is in maximized state, as in the height and width of the form?
With Best Regards,
Mayur
|
|
|
|
|
Form Height and Width Depends on the Screen Setting.
For 1027 x 868
The height = 748 and width = 1032
For 800 x 600
The height = 580 and width = 808
Regards
|
|
|
|
|
Thnx Javed, for 1024 x 768 it is (1036, 780). Thnx A Lot !!!
With Best Regards,
Mayur
-- modified at 0:46 Thursday 19th January, 2006
|
|
|
|
|
Hi everyone I am trying to compare userid i.e, if the user exists I want to display the message.I am getting error when comparing the text in the textbox and the text from the database.Please tell me how to convert the value into string. the code is as follows...
cmd.commandtext="select user from reg"
da.selectcommand=cmd
da.fill(ds,"reg")
for each dr in ds.tables("reg").rows
If textbox1.text=dr.item(0) then
msgbox("UserExists")
endif
next
thanxin advance
yamini
|
|
|
|
|
may be "user" field have null values thats y it will be giving error
Try this:
cmd.commandtext="select user from reg"
da.selectcommand=cmd
da.fill(ds,"reg")
for each dr in ds.tables("reg").rows
If textbox1.text= (dr.item(0) & "") then
msgbox("UserExists")
endif
next
|
|
|
|
|
The data you get from dr.item(0) is of the type Object. That means that you are comparing the values as objects, not strings, and as they are not the same object, the expression never will be true.
Convert the object to a string:
If textbox1.text = dr.item(0).ToString() then
---
b { font-weight: normal; }
|
|
|
|
|
I'm fairly new to programmimg and I'm also a 20-year musician. I'm trying to create a pitch tuning program for when I'm tuning my guitar. I have buttons that when clicked will play the correct pitch and I have images set up to display an image of the corresponding guitar string. I would like for both to occur at the same time, but the audio wave will play first and when its done it then diplays the image. Is there any way to have both occur at the same time? Also, how can I interrupt the audio playback once its begun? Thanks to those who respond. I've tried and read and I can't seem to go in the right direction.
Richard
|
|
|
|
|
You can do one of two things. First, use an asyncronous method of playing audio ( i.e. one where you tell it to play and the app does not wait ), and two - play audio in another thread.
How you interupt the audio depends entirely on how you play it. If you were to use WMP as a control, then you could interact with it. If you use a PlaySound type API then you're out of luck.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
my problem is that,,,,if i check my checkbox in a runtime,it will not appear to the to the datagrid,,,supposed to be there is a check there,,can you help me to solve this problem
neobags
|
|
|
|
|
Im getting System.OverflowException, with a very large number for OwnerhWnd
I have:
<br />
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long<br />
Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long<br />
and in load method of mainform,
<br />
Dim OwnerhWnd As Integer<br />
Dim ret As Integer<br />
Dim hWnd As Long<br />
hWnd = FindWindow("MainForm", "")<br />
OwnerhWnd = GetWindow(hWnd, GW_OWNER)<br />
Anyone tell me whats wrong here?
I want to do that so I can call
ret = ShowWindow(OwnerhWnd, SW_HIDE)
but crashing on line OwnerhWnd = GetWindow(hWnd, GW_OWNER)
thanks
|
|
|
|
|
The .Handle property of a Form is the HWND.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks, instead of all that other stuff, I only needed
<br />
Dim OwnerhWnd As Long<br />
OwnerhWnd = Me.Handle.ToInt64<br />
' Hide from task list:<br />
Call ShowWindow(OwnerhWnd, SW_HIDE)<br />
to achieve what I wanted
|
|
|
|
|
And the overflow problem was because I used ret as Int rather then Int64
|
|
|
|
|
Why are you expecting a return type of Long?? Long is 64 bits on a 32 bit proc and 128 bits wide on a 64 bit proc.
Any function that returns a handle returns a value the same as the data width for the processor it's running on. The proper return type for FindWindow is IntPtr since IntPtr is the width of the proc it's on.
Private Declare Auto FindWindow Lib "user32" ( _
ByVal lpClassName As String, _
ByVal lpWindowName As String ) _
As IntPtr
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote: Long is 64 bits on a 32 bit proc and 128 bits wide on a 64 bit proc.
Is it ? In C++, it's 32 bit for 32 bit processors, the same as int.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
In VB.NET, Long is 64-bits wide. In VB6, it's 32-bits, same as an Int32 in the CLR. Visual Basic.NET: Integral Types[^]
Come to think of it...I really can't confirm that a VB.NET Long is 128-bits wide on a 64-bit proc. I don't have one to test it. It could very well be locked at 8 bytes wide.
I can, however, confirm that IntPtr is the same width as the proc data width.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well, you learn something new every day
As it happens, I've been doing lots of C++ work making a project 64 bit ready of late.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: I've been doing lots of C++ work making a project 64 bit ready of late.
You lucky dog! Got a test platform setup for it? What's under the hood?
Oh! That little "thing" you sent me apparently worked. I haven't gotten a confirmation yet, so I guess we'll have to wait and see what happens. Thanks again!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote: Got a test platform setup for it? What's under the hood?
No, at this point I'm just turning on 64 bit warnings and working through the code. However, with tax time coming up, it seems like a good excuse to lash out sometime soon....
Dave Kreskowiak wrote: I haven't gotten a confirmation yet, so I guess we'll have to wait and see what happens. Thanks again!
You're welcome. LMK if there's any hassle, I can chase it up on my end.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks, I just played around until it worked, but that one I shouldnt have missed.
|
|
|
|
|
I have an experience on Using VBA list box,
There is a mode for the list box to have a checkbox before the item text.
Does the VB.NET listbox have this function ?
If not ...
Any suggestion to do that?
Thanks~!
|
|
|
|
|
The ListBox control doesn't do this anymore.
Instead, use the CheckedListBox control.
|
|
|
|
|
You could also use ListView amd turn on checkboxes.
Use listview if you also want to change colour of items in the list.
However I had trouble disabling checking items on click, CheckedListBox was easier for that.
|
|
|
|
|
I have create a control for my own use,
There are number of text box, labal, ...
And there is a save button named "btnSave"
When Click the "btnSave"
I would like to show a message to the status bar,
where the status is a control on the Form.
The structure like
Form
+---myControl
| +---label1
| +---label2
| +---textField1
| +---btnSave
| +---etc ...
|
+---StatusBar
|---StatusItem1
How can show the the message to StatusItem1 when I click the btnSave?
for example,
Click "btnSave", the Message is "Hello", which will show in statusItem1.text
Thank YOu!
|
|
|
|
|
StatusBar1.Panels(1).Text = "Hello"
|
|
|
|