|
sender is the menu. so
sender.text is the text and so on. you can play with the properties using
sender. Name of property
Rizwan Bashir
|
|
|
|
|
Thank you !!!
|
|
|
|
|
I have a program that can scan an image. I have a msgbox come up after each scan asking if the user wants to add a page to the original scan. Can anyone help me with this problem. Below is the code:
NextPage:
On Error GoTo ScanErr
'Scan an Image
If ImgScan1.ScannerAvailable = True Then
With ImgScan1
.OpenScanner
.StartScan
End With
ImgEdit1.Image = ImgScan1.Image 'sets imgedit1 to show scanned image
ImgScan1.CloseScanner 'close scanner
Else
MsgBox "Scanner Not available!", vbExclamation, "Error!"
End If
ScanErr:
If Err.Number = 1002 Then 'Exited without scanning
Exit Sub
Else
Exit Sub
End If
-- modified at 14:58 Monday 8th May, 2006
|
|
|
|
|
use this
With ImgScan1
.MultiPage=true
.OpenScanner
.StartScan
End With
' adding multi page will not stop the scanner. Like if you have ADF Scanner then it will stop when all the papers are scanned in feeder.
Regards
Rizwan Bashir
|
|
|
|
|
I have a project that I have successfully completed using VISUAL BASIC 6 PROFESSIONAL and ACCESS as back end. Now I want to convert this codes to VB.NET how do I acheive this or how do I go about it.Thanks
Ademola
|
|
|
|
|
After ensuring that your VB6 prog works without errors do...
Run VB.Net open the vb6 project using file/open project this will lauch the upgrade wizard. A few seconds/minutes later there will be a _UpgradeReport.html file in solution explorer.
Study that document it should tell you what it was able to upgrade and that which it could not, and prepare for some disappointments. The upgrade wizard tries its best but is not perfect.
In any case, fire-up the help file that comes with vb.net and search the index for "Upgrading a project with the upgrade wizard" and it walks you through what happens.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Thanks for your respond. but i want to know may be this is applicable as to convert VISUAL BASIC 6 TO VISUAL STUDIO 2003 AND 2005 as the way I will convert it to VISUAL STUDIO .NET
Ademola
|
|
|
|
|
Yes, I understand they are similar.
BUT
As in my original reply, the MSDN help file will guide you.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
how to add a windows control(e.g. Button Control) to a collection
Suman
|
|
|
|
|
What kind of collection do you mean?
ArrayList list = new ArrayList();
list.Add(button);
|
|
|
|
|
'Declaring Collection
Dim mycol as collection
'If I have two button control button1 & button2, Then I want to add this two button to the collection so that I can control them using
"For each button in mycol " command
Thank you
Suman
|
|
|
|
|
Dim coll As Collection
coll = New Collection
coll.Add(Button1)
coll.Add(Button2)
Dim b As Button
For Each b In coll
b.Text = "Got you!!!"
Next
|
|
|
|
|
hi
please send me source code for audio recording for incoming/outgoing voice.
advance thanks
purnachender@photontelecoms.com
|
|
|
|
|
Firstly your question is one of the vaguest I have heard. What exactly do you want to capture. Do you want to capture audio from a microphone plugged into your PC or from a modem or from a VoIP phone?
Secondly nobody will send you the source code. Most people however will be willing to help with a specific problem. I will forgive the rather aggressive and ignorant tone of your question as I am guessing English is not your fist language. Others may not.
So….. If you are really at a total loss try google. Its pretty good for general ‘How do I …?’ type questions.
(It wasnt me who voted you a 1 by the way. In case you dont know a 1 vote means somebody was a little bit annoyed by your post).
Jon
|
|
|
|
|
Afternoon All
i was hoping some 1 could guide me in the wright directione here. Is it possible that in the Datagrid.click function that the line you click in the datagrid can become highlighted and several other lines highlighted if clicked. i really need to find this out(and don't say keep ur finger on control and click). I want to highlight 1 or several rows that have been clicked
regards
Allan
|
|
|
|
|
Hello,
I want to initialize a variant in VB6. I want this variant to hold a double arrary. To do so, I did the following .
<br />
Dim a(0 To 6) As Double<br />
Dim Points As Variant<br />
<br />
a(0) = 0#<br />
a(1) = 0#<br />
a(2) = 0#<br />
a(3) = 0#<br />
a(4) = 0#<br />
a(5) = 1.2<br />
<br />
Points = a
This piece of code does not give me any error on compiling as well as on run time. but the trouble in "Points" in not filled. and when it is passed to one of the activeX controls I am using, it has nothing in it. I think I am not doing enough to intialize the variant. Can any body suggest me the right way of doing it.
thanks
|
|
|
|
|
This code will create a variant array named Points that holds 6 elements of type Double. If it isn't being received by the activeX control, then something else is wrong. How is the receiving function defined, and how are you passing it?
----------
There go my people. I must find out where they are going so I can lead them.
- Alexander Ledru-Rollin
|
|
|
|
|
Here is how I am sending it
Dim a(0 To 6) As Double
Dim Points As Variant
Dim np As Long
Dim nr As Long
Dim b(0 To 1) As Double
Dim Radii As Variant
a(0) = 0#
a(1) = 0#
a(2) = 0#
a(3) = 0#
a(4) = 0#
a(5) = 1.2
b(0) = 9.5
b(1) = 8.9
Radii = b
np = 2
nr = 2
MyCtrl1.Insert_Polycylinder np, Points, nr, Radii, "cap"
!!!!!!!!!!!
And here is how my control recieves it
STDMETHODIMP StreamCtrl::Insert_Polycylinder(int pcount, VARIANT * points_var, int r_count, VARIANT *radii_var, BSTR capping)
{
if (m_pView)
{
HPoint *points = new HPoint[2];
int dummy;
float *radii = new float[2];
char capping_char[4096];
ConvertToChar(capping_char,capping,4096);
GetPointArrayFromVariant(points_var, &points, dummy);
GetFloatArrayFromVariant(radii_var, &radii, dummy);
Insert_PolyCylinder(pcount, points, r_count, radii, capping_char);
}
return S_OK;
}
and then
Here are other relevent functions
void StreamCtrl::GetPointArrayFromVariant(VARIANT * varKeys, HPoint **arrayfloat, int &length)
{
int len;
GetArrayFromVariant(varKeys, (float **)arrayfloat, 0, 0,len);
length = len/3;
}
void StreamCtrl::GetArrayFromVariant(VARIANT * varKeys, float **arrayfloat, int **arrayint, char **arraychar, int &length)
{
length = 0;
VARIANT jArray;
VariantInit(&jArray);
if ((varKeys->vt & VT_TYPEMASK) == VT_DISPATCH) {
IDispatch* disp =
(varKeys->vt & VT_BYREF ? *varKeys->ppdispVal : varKeys->pdispVal);
DISPID DISPID_GET_SAFEARRAY(-2700L);
DISPPARAMS dispParams = {NULL, NULL, 0, 0};
HRESULT hr = disp->Invoke(DISPID_GET_SAFEARRAY, IID_NULL,
LOCALE_USER_DEFAULT,
DISPATCH_PROPERTYGET, &dispParams,
&jArray,
NULL, NULL);
if (SUCCEEDED(hr))
{
length = jArray.parray->rgsabound[0].cElements;
if (arrayfloat)
*arrayfloat = new float[length];
else if (arrayint)
*arrayint = new int[length];
else if (arraychar)
*arraychar = new char[length];
for (int i=0;i<length;i++)
{
VARIANT *res = (VARIANT *)jArray.parray->pvData+i;
if (arrayfloat)
(*arrayfloat)[i] = res->dblVal;
else if (arrayint)
(*arrayint)[i] = res->intVal;
else if (arraychar)
(*arraychar)[i] = res->bVal;
}
}
}
}
|
|
|
|
|
Hi,
I am working on VB application in which i want a textbox to accept only integers and few other characters.
like for house no I want only integers, #, / and backspace to be allowed. I wrote code it restricts alphabets only, not other alphabets.
If KeyCode >= 48 And KeyCode <= 57 Or KeyCode >= 35 And KeyCode <= 44 Or KeyCode = 45 Or KeyCode = 47 Or KeyCode = 8 Then
txtDoorNo.Locked = False
Else
txtDoorNo.Locked = True
End If
but its not working properly.
plz help ASAP.
With Regards ,
Chandan Kumar
|
|
|
|
|
Chandan_Kr wrote: If KeyCode >= 48 And KeyCode <= 57 Or KeyCode >= 35 And KeyCode <= 44 Or KeyCode = 45 Or KeyCode = 47 Or KeyCode = 8 Then
txtDoorNo.Locked = False
Else
txtDoorNo.Locked = True
End If
If you are using vb6 try to use the code keyascii = 0 or in vb.net use e.handle = true or e.handle = false
Try to test it.
|
|
|
|
|
Chandan_Kr wrote: If KeyCode >= 48 And KeyCode <= 57 Or KeyCode >= 35 And KeyCode <= 44 Or KeyCode = 45 Or KeyCode = 47 Or KeyCode = 8 Then
Looks like the logic is not being expressed rigorously. Perhaps a few parenthesis would help.
If (keycode >= 48 and keycode <= 57) _
or (keycode >= 35 and keycode <= 44) _
or keycode = 45 _
or keycode = 47 _
or keycode = 8 then
George
|
|
|
|
|
salam every one
i want ask again about data base with vb.net
iam working in project to build compiler to c++ not proffetional one but its project to compiler class
iam stop now in type cheking that takes about check if the type for the identefier correct or not
i was storing the data type as reserved in tabel and i connected this with the vb.net program to show if the string that i have it from reading it from text foun in data base or not
if found return it from data base if not found insert it as identefier with it's type
like when i type (int x;) in text and read it as line store it in string and convert this string to char array
and take int alone and search about it in the database if it found in data base return int
and take x alone too and search about it too if not found in the data base insert it as identefier x type int
what is the sql statment that i can use it
i know it is select and insert statement but how i can use it correctly
if i can do this one (type checking) it will be easy with parssing too
thanks alot and iam sorry to this long letter
noor al-huda
|
|
|
|
|
Hello
I would like to know how can I get a list of all the registered domain names in Mycomputer. I would like to get this information thru my code ( in VB )
thanx in advance
-- modified at 6:29 Monday 8th May, 2006
|
|
|
|
|
|
how do I use event with Datagridviewcolumn in datagridview control?
can you send me a code project about some event usage with datagridviewcomboboxcolumn?
my email address: sumroitha@yahoo.com
Datagridview control not Datagrid control.
|
|
|
|