Something's not right, SetWindowPos should just resize the dialog. It shouldn't touch the parent
How did you find out the address dialogs handle?
i'm having a go at creating a frontend.. I'm new to VB so please dont laugh to hard if i'm missing something simple.
Problem - Address input window
On call of this dialog the window appears full screen and takes over the form
What I what
The dialog window to be able to be resized
What I have tried
I have copied all my code into MDI Project, putting all the destinator code into a child, in the hope that the address dialog would just take over the child form, no luck still takes over the parent. Also tried grabbing the address dialogs handle and using setwindowpos to resize it, but this just resizes the parent as well..
so i'm stuck, as I said only been playing with VB for a few weeks so go easy
cheers
CdR
Something's not right, SetWindowPos should just resize the dialog. It shouldn't touch the parent
How did you find out the address dialogs handle?
Destinator 3 For PC! - http://www.map-monkey.co.uk/
I was using the 'GetActiveWindow' function, but it seems this is just returning the wrong handle.. I used it twice, first on the MDIForm Load, and stored the value in a label in the MDIchild form, this got the parent handle, then I used it again after the Address dialog call was sent, then did a SetParent command to make sure the MDIForm was its parent, then did a SetWindowPos which resized the whole app rather then just the window.
BTW thanks for the reply.. , the VB book that I got for xmas (learn VB in 21 Days) doesnt cover Window control really, thats why i'm stuck !
CdRsKuLL
Why not recreate the 'Navigate' dialogue?
You can get a list of streets/cities using GetListOfCitiesID/GetListOfStreetsID (or something like that - the streets/cities are indexed and ordered alphabetically)
Then when you have the city ID selected, you can use GetListOfStreetsForCityID or whatever it is to get a list of streets.
I'm doing this for my T9 Nav Input App (but i kinda lost interest at the moment...)
(might not be accurate, i dont code VB very often)
Then when you get the CityName ... you can get a list of streets with another function.
yeah this was going to be my next option to rebuild the address window, but this looked alittle trick for my forth week of vb :-) I may still give it ago
CdR
ok.. seem to be gettting alittle closer..
Having probs now finding a way to grab the name, I've used spy++ and know what i'm looking for, just unsure how to go about getting it, I've managed to get the correct handle of its parent, so been trying to use the line below.. but no luck :-(
thisform = FindWindowEx(hParent, 0, "#32770", "")
any pointers ?
cheers
CdRsKuLL
its ok sussed it :-)
Are you going to let in on the secret?Originally Posted by CdRsKuLL
![]()
well, i've got to the next step, the example I was using was setting a picture1 as its parent, the address dialog didnt like this so now I scrapped that and manually set the form as its parent, this now allows me to move the address dialog around using the setwindowpos command..
I'm still having probs trying to find the handle of the input dialog box, so I can use the sendmessage function. Crist.. this is getting a bit much after 3 weeks of being a vb virgin
You are now me...two years ago. Yech !Originally Posted by CdRsKuLL
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
Bookmarks