|
Hello to everyone!
I have a project to do in VB. My problem is, that this program is divided to 2 purposes - 1-operator's entry form of some data, 2-displaying this data in another form in a second display (both displays are connected to 1 comuter). How can I display 2 different forms running at the same time in one program?
Thank you all in advance.
|
|
|
|
|
If you want to create a second window, or form, then you will need to do something like this.
' Declare the form variable
Dim secondForm as Form1
' Create the form object
Set secondForm = New Form1
' Set the form to visible.
secondForm.Show
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I am making a kind of monitor programme in visual basic 6.0
When i say monitor i mean it does things like tell you if someone is trying to phone you / dial up to the internet/ detect internet connection e.t.c
It is going well but i have several questions.
1 Is there a command for monitoring your telephone line so when someone calls you - visual basic does something like put a message box saying " you are being called by ..... "
2 On msn messenger whenever you get a new email it brings up a messaeg telling you. Is this possible in vb?
3 is there a command to launch dial up so you can connect to the internet?
4 Has anyone got a copy of anonymous mailer because the link doesn't work in the download section.
AND 5 I WANT TO MAKE AN INSTANT ADVERT REMOVER For my programme. So how do i write some code to see what windows internet explorer has open and close ones if their address is such and such.
Thanks to anyone who helps!
zeusra2
|
|
|
|
|
How can I know the length of an dynamic array in VB?
For example:
a = split(s,"|")
a.length???
|
|
|
|
|
UBound(a) + 1
If you could kick in the pants the fellow responsible for most of your troubles, you wouldn't be able to sit down for six months. - Unknown
|
|
|
|
|
I write a DLL, in that i create a Word application object for open a Word document. In VB app, it works well. But when i use that DLL in an ASP project. It doesn't work. How can i do that? Use Web service?
I want to write a Web application like Mail Merge in VB. Give me some idea to write it for the Web. Thanks a lot!
|
|
|
|
|
how I get all contents of a word doc wirh a macro written in VB ? after this I need to get it and put into a Rich Text field into another application using API !
|
|
|
|
|
use the clipboard anc copy it to that
|
|
|
|
|
use the document's select or range object and select the lot (or wotever part of the doc u want)
and use copy, its in the clipboard now
so get your app to paste
bryce
|
|
|
|
|
hi bryce !
I use
ActiveDocument.Select
Selection.Copy
and if I open a new doc and use Paste the content will copy !
but I need to copy this into a variable as :
doc.Body= "content"
How can I made this ?
thanks again !
|
|
|
|
|
Hi
I load a picture (bmp) into a picture control.
The picture control have AutoSize on true and the picture is bigger then the screen.
I need to check the color of every pixel.
With picture.point (x,y) I have access only to the region on the screen (otherwise return -1)
How can I check the color of all pixels?
Thanks
|
|
|
|
|
make picture1.AutoRedraw=True
this worked but the problem is that autoredraw property consumes alot of memory I think.
|
|
|
|
|
[VB6]
Anybody know of a way to create a new instance of a form if you only know the name of the form?
Right now i'm doing a huge hack... a big select case statement.
there has to be a better way!?!?!
|
|
|
|
|
Could you give us a better idea of what you are doing exactly. There are ways to create new forms programmatically.
Nick Parker
|
|
|
|
|
aight, here's the deal...
on the left, I have a treeview that holds a bunch of nodes which represent forms to open. They hold the name of the form as a string as their key.
when somebody clicks on a node, it should open a new instance of the form, by name.
If there is a better overall way to do the same effect, that'd be fine as well.
The basic gist of what I want is a list of the form's which can be shown, and to make a new one when the user clicks on it. It is possible to open more than one of the same form at a time.
|
|
|
|
|
Dim myForm as Form<br />
Set myForm = new Forms("MyFormName")
I've seen something similar to that, but I don't have VB 6 installed so I can't check it.
Should give you a start anyway,
James
Simplicity Rules!
|
|
|
|
|
hrm
the Forms collection only shows forms which are already loaded. besides, I don't think I'd be able to create a _new instance_ with this method.
also, the New Forms("MyFormName") syntax doesn't compile.
I even tried a CallByName hack ( Set myForm = CallByName( App, "MyFormName", vbGet ) ), but that didn't work either.
any other ideas?
|
|
|
|
|
Hello !!
How can I operate a MP3 file from VB program.
I know to operate a wav files. Is it the same way??
Thank you !!!
Ahuva
|
|
|
|
|
Add a Media Player component, it`s pretty easy
|
|
|
|
|
If you want to use winamp instead, check out http://winamp.com/nsdn/
|
|
|
|
|
My problem is both simple and complex...
I am writing an RS232 protocol layer that was meant for Visual C++, however now the boss man wants me to integrate it in to Visual Basic. So I decided to convert the static library to a DLL. Everything seems to work fine, and from the outside the IDE all the visual basic apps run well. However inside the IDE, after running, the VB IDE has many problems. On my machine it only causes an application error on exit. On others, it causes application errors at random times. I thought maybe I was trashing the stack, but my DLL is not doing it. I am thinking it is the arguement passing...
These are my definitions in the DLL..
[code]
#define INCOMMSTACK_API extern "C"
INCOMMSTACK_API long WINAPI Initialize (long lHwndOwner);
INCOMMSTACK_API long WINAPI ExpediteMessageByte (LPBYTE pbMsg, DWORD cBytes);
INCOMMSTACK_API long WINAPI ExpediteMessageText (LPCTSTR szMsg, DWORD cChars);
INCOMMSTACK_API long WINAPI SendMessageByte (LPBYTE pbMsg, DWORD cBytes);
INCOMMSTACK_API long WINAPI SendMessageText (LPCTSTR szMsg, DWORD cChars);
INCOMMSTACK_API long WINAPI SetRetryCount (DWORD dwRetryCount);
INCOMMSTACK_API long WINAPI SetTimeout (DWORD dwTimeout);
INCOMMSTACK_API long WINAPI SetProtocol (DWORD dwProtocol);
INCOMMSTACK_API long WINAPI ConnectRS232 (int iCommPort, int iBaudRate);
INCOMMSTACK_API long WINAPI ConnectUDP (LPCTSTR szAddress, int iPort);
INCOMMSTACK_API long WINAPI CloseConnection ();
INCOMMSTACK_API long WINAPI GetReceivedMessage (LPBYTE pbByte,
DWORD cBytes,
DWORD wParam,
long lParam);
[/code]
and these are the declaration in VB...
[code]
Private Declare Function CreateWindowEx _
Lib "user32" Alias "CreateWindowExA" _
(ByVal dwExStyle As Long, _
ByVal lpClassName As String, _
ByVal lpWindowName As String, _
ByVal dwStyle As Long, _
ByVal x As Long, _
ByVal y As Long, _
ByVal nWidht As Long, _
ByVal nHeight As Long, _
ByVal hWndParent As Long, _
ByVal hMenu As Long, _
ByVal hInstance As Long, _
lpParam As Any) As Long
Public Const GWL_WNDPROC = (-4)
Public Declare Function SetWindowLongApi _
Lib "user32" Alias "SetWindowLongA" _
(ByVal hwnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Public Declare Function CallWindowProc _
Lib "user32" Alias "CallWindowProcA" _
(ByVal lpPrevWndFunc As Long, _
ByVal hwnd As Long, _
ByVal msg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long) As Long
Private Declare Function V4Initialize _
Lib "incommstack.dll" Alias "Initialize" _
(ByVal hwndOwner As Long) As Long
Private Declare Function V4ExpediteMessageByte _
Lib "incommstack.dll" Alias "ExpediteMessageByte" _
(ByRef pbByte As Byte, ByVal cBytes As Long) As Long
Private Declare Function V4ExpediteMessageText _
Lib "incommstack.dll" Alias "ExpediteMessageText" _
(ByVal szMsg As String, ByVal cChars As Long) As Long
Private Declare Function V4SendMessageByte _
Lib "incommstack.dll" Alias "SendMessageByte" _
(ByRef pbMsg As Byte, ByVal cBytes As Long) As Long
Private Declare Function V4SendMessageText _
Lib "incommstack.dll" Alias "SendMessageText" _
(ByVal szMsg As String, ByVal cChars As Long) As Long
Private Declare Function V4SetRetryCount _
Lib "incommstack.dll" Alias "SetRetryCount" _
(ByVal lRetryCount As Long) As Long
Private Declare Function V4SetTimeout _
Lib "incommstack.dll" Alias "SetTimeout" _
(ByVal lTimeout As Long) As Long
Private Declare Function V4SetProtocol _
Lib "incommstack.dll" Alias "SetProtocol" _
(ByVal lProtocol As Long) As Long
Private Declare Function V4ConnectRS232 _
Lib "incommstack.dll" Alias "ConnectRS232" _
(ByVal iCommport As Long, ByVal iBaudRate As Long) As Long
Private Declare Function V4ConnectUDP _
Lib "incommstack.dll" Alias "ConnectUDP" _
(ByVal szAddress As String, ByVal iPort As Long) As Long
Private Declare Function V4CloseConnection _
Lib "incommstack.dll" Alias "CloseConnection" () As Long
Public Declare Function V4GetReceivedMessage _
Lib "incommstack.dll" Alias "GetReceivedMessage" _
(lpByte As Any, ByVal cBytes As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
[/code]
I included the win32 calls for handling the WM_MESSAGES that the static library used to communicate to the frame in the VC++ implementation.
Any ideas on what might be happening or am I just wading in hot water with no raft....
Thanks,
Brian
Stop the insanity and free the mallocs. If not then memory will call a work stoppage and your computer shall begin a revolt, causing the current operating system to fail. Down with the man....
|
|
|
|
|
I need to make a form that can open up and then be able to look in your hardrive and search for a file and load it into a text box. I know this isnt hard but i have not done this before. Can someone please help me?
|
|
|
|
|
I need to make a form that can open up and then be able to look in your hardrive and search for a file and load it into a text box. I know this isnt hard but i have not done this before. Can someone please help me?
|
|
|
|
|
Hi,
I use VB6 & SQL Server. My database is saved in a server. The operating system in the server is Windows NT that supports only English Language, and my data, which I need to save, is written in Arabic. The problem is that the data saves as garbage.
Note: There is no problem with Visual C in the same database.
Thanks
|
|
|
|
|
Hi,
I've solved my problem by adding this statment "Auto Translate=False" to the "ConnectionString".
|
|
|
|