|
Hi,
How can I scroll the standard ScrollBars of an MDI Form, programatically ??
(note: I am talking about the Standard/Default scrollbars and not the ScrollBar control)
I tried using the Following APIs :
SendMessage(...WM_VSCROLL...) and SetScrollPos(...)
But it doesnt work...
Please someone suggest me a way to do this...
Thanks,
FiroZ
|
|
|
|
|
Try using the following API functions...
ScrollWindow()
ScrollWindowEx()
I haven't tested it on an MDI form yet, but logically it should work. Also, don't forget to call UpdateWindow() afterwards, so the the client area is redrawn.
Jeremy L. Falcon
"The One Who Said, 'The One Who Said...'"
|
|
|
|
|
how can i attach scanner with my vb program
i want to get result from scanner and display that picture in picture box
help me please
|
|
|
|
|
visit www.twain.org
Peter
|
|
|
|
|
Now, I've been flipping through VISUAL BASIC 6.0 STEP BY STEP (the Microsoft book ) and it doesn't seem to have any info on implementing sound. I was hoping to make a multimedia database with some background music in it and sounds (like clicking on buttons and such).
Help?
TheBadProgrammer
Everyone welcome the NewbiE!!!!
First Programmer: "How many bits are in a bite?"
Second Programmer: "You spelled bytes wrong."
First Programmer: *stares* "It's a joke, moron."
Second Programmer: "Joke...?"
|
|
|
|
|
How about the PlaySound(...) Win32 function? IIRC, VB is able to call Win32 functions...?
Peace!
-=- James.
|
|
|
|
|
I use microsoft multimedia control and its quite flexible. give it a try.
|
|
|
|
|
DirectSound is another option
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hello !!
How can I save the last value of a variable even after turning off the computer??
I have an Index (static i As Integer). THe value of the index is equal to 10, but after I quit from VB and entering again to the program, the value of the index is zero (0), again.
Is there any way to solve this program ???
I hope you can help me.
Any way, Thank you !!!
Ahuva
|
|
|
|
|
What your looking for the the propbag
PropBag.WriteProperty
PropBag.ReadProperty
or you could put it in a recordset..
Dim rs As Recordset
Set rs = New Recordset
rs.CursorLocation = adUseClient
rs.Fields.Append "Value", adsingle
rs.open
rs![value]=10
rs.save "c:\myvalue.dat" , adPersistADTG
rs.close
then to retrive the data
Dim rs As Recordset
Set rs = New Recordset
rs.CursorLocation = adUseClient
rs.open "c:\myvalue.dat"
txtValue.text=rs![Value]
|
|
|
|
|
Hi folks,
I'm rather inexperienced with VB, but since this is pretty easy with VC, I hope some of you gurus out there has done it before or has a hint.
Think of a calculation, where you have a result of, 3/4 = 0.75
If I simply use the code ResultWindow = 3/4 the VB form will display "0.75" as desired. BUT: some languages, including German, use a different format, the figure above should be written "0,75"
Speaking Windows, I'd rather get and put the number format as specified in the control panel.
Anyone has an idea to do VB excatly this?
Thomas
BTW: for VC, this piece of code in OnInitInstance does all the job:
setlocale( LC_ALL, "" );
|
|
|
|
|
Take a look at FormatNumber() and FormatCurrency() functions.
|
|
|
|
|
I am trying to create a simple drag and drop setup between two list boxes. They are initally filled with a cell array from 2 excel spreadsheets I need the selected data object to move from it's location in one listbox to a SELECTED location in the other list and vice versa where the user drops the mouse. I can only make it drop at the end of the current list though. Any ideas would be much appreciated.
Racer Shaggy
|
|
|
|
|
I need to know how to get sound to come out of my internal speaker.
I know that using the Beep command from the Kernel should do it, except it sends it out my sound card to my external speakers.
It does this even when I have the power off to the speakers (and power unplugged). I have tried unplugging the speakers from the computer and then I get no sound, so it still wants to use my sound card.
Two questions - why is this happening and how can I get the internal speaker to play for me? There is an internal speaker I have another program that uses it. soundmax integrated audio is what I have for a sound card, I think (not my comp, work comp)
Thanks
|
|
|
|
|
On Windows 9x if there is an audio device installed and selected for playback Windows will not use the PC speaker (internal one). The beep statement doesn't always use the PC speaker like in QBasic. It's a wrapper for the Beep Windows API, which will use the sound card if possible.
NT based systems will use the PC speaker for the Beep API. Why is it this way? Who knows, but it is. If you want to ensure you can use the PC speaker you'll have to do things manually. Fortunately, it's already been done.
Look into using the following DLL to help you out...
http://www.stormpages.com/bojanjurca/CSamples.htm#Speaker
Jeremy L. Falcon
"The One Who Said, 'The One Who Said...'"
|
|
|
|
|
Thx for the help with that. I think it will work. I'm not at the comp to test it on but I will find out in about an hour from now. Anyway I think the source coede to the DLL will help me in C++ as well. I've been meaning to learn how to write a DLL, that should help me a great deal. So I thank you two fold for your reply
Quinn
|
|
|
|
|
Hello,
I am trying to determine the best option for storing locally-created data
for a PocketPC financial analysis application. I have skimmed several books
on PocketPC development, and searched the web and various newsgroups for
opinions and guidelines on using flat files, binary files, ADOCE, SQLCE,
XML, and other options **for local application data storage**; but have found little to crystalize my thinking/decision-making. The application is
currently implemented using the basic FileSystem/File control with simple
sequential operations. However, as I extend functionality, the data storage
requirement expands accordingly - resulting in degrading app performance.
So, I thought I would appeal to the PocketPC developer community for some
assistance. I appreciate any thoughts on the subject.
OK, here are some app details:
1) Financial analysis application where the user currently enters 60 - 200
inputs that need to be stored on the PocketPC
2) The data can be grouped into 5 generic categories, each containing 12 -
40 data entries
3) Need to support exporting of user entered data, and approximately 320
app-generated result calculations (for importing into Excel /MS Office apps
on desktop PC) -- a total of 380-520 data items per exported file.
4) Snappy performance when loading and saving data files is desirable
5) The solution can employ either multiple files for each analysis (e.g.,
user data file + app results file + app export file that combines user data
and app results) or a single file containing user data and app results
Thanks in advance,
Donovan Dillon.
|
|
|
|
|
Private Type RECT
left As Long
top As Long
Right As Long
Bottom As Long
X As Long
y As Long
data As String
color As Long
index As Integer
End Type
dim Die() as RECT
I have a class module which populates this array for RECTs from xml fie
Now i want to pass this array to Form which will then use and modify
this data.i want to pass it byref so that form will modify data of
this instance of class.
VB is not allowing me to pass this array as argument to a function.
Anybody can suggest how should i modify this data of class from form.
This is very urgent
thanx in advance
Tushar
|
|
|
|
|
Wrap it in a class module and then pass the class module, and put properties in the class module so it looks like the original type definition.
--
Andrew.
|
|
|
|
|
Wow...That really is a great idea...
FiRoZ
|
|
|
|
|
Hi!
I am using shell to start ftp and send a few commands to a server, resulting in a file being retreived. I then process the file locally. I need to do this with a group of files, so i'm running this in a loop and this gets me into trouble.
All of a sudden, ftp commands show up in the document, since the processing of one file conicides with the retreival of another. I believe that the source of my problems is that shell runs asynchronously. MS states that it does this *by default*. How can I change this default? Or is there some smart work-around I haven't thought of? I already use a loop with DoEvents(), to give the ftp process time to get started before I send any commands to it, and I have a control to ensure that only one ftp process is running at a time (static variable in the procedure).
Any ideas on how to solve this?
Consultant, system/web developer.
IMS Consulting AB, Sweden
|
|
|
|
|
You need to run the preocess with the CreateProcess API...
You can test if the process is running, etc.
If you want I made a COM dll with VC++ for make that you need...
Best Reagards
Enter any 11-digit prime number to continue...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
I'm not sure what the CreateProcess API is. If you have a nice little component that might help, I'd be very glad to try it out! Please send it to my email
If you understand my dilemma, would you mind trying to explain to me how this process works/should work?
Consultant, system/web developer.
IMS Consulting AB, Sweden
|
|
|
|
|
Is anybody out there using the DLLs from www.vbaccelerator.com for menu icons successfully under XP? The icons do not show up for me. Compatability mode does not help the situation
The DLL is working, and is drawing borders around where the icons would noramlly go, but it would appear that the call to ImageList_Draw is not doing anything. Has anyone else had any problems with this?
--
David Wengier
|
|
|
|
|
I finished my little utility program, nothing fancy, just a little printer program for one purpose. When I run it in VB 5 it works just fine, I tell it to Make EXE, it starts compiling, stops with no errors reported so I assume it did it's thing. I goto the dir I told it to compile to and the dir is empty. Any ideas ? I did a search on all my harddrives and file isn't found anywhere.
Any suggestions would be greatly appreciated, thanks in advance
Zed350
|
|
|
|