|
Thank you so much and It is really a great hint for me,
but it does not work by copy and paste.
Where should I place it in my module ?
Thank you~
|
|
|
|
|
To add it to a module you'll have to do two things...
1) Change the line
Private Shared Function IsThemeActive() As Boolean to
Public Function IsThemeActive() As Boolean (i.e. remove the word Shared and change the functions visibility to Public )
2) Add
Imports System.Runtime.InteropServices to the top of your file.
I havent done any VB.Net in a while so I hope that works
Cheers,
Will H
|
|
|
|
|
hi, i would like to insert a picture,(logo) of da company as a background and insert button ENTER on that.but i dont know how,sir, could u pls help me on doing that..thanx a lot.
|
|
|
|
|
You can specify a BackgroundImage for a form and place your buttons and other controls on the form as normal.
Other things that might be better for what you want are placing a PictureBox on the form with the logo in it. To make sure it stays behind the other controls, from the Format menu, choose Order > Send to back.
Or, place a Panel control on the form and set the Background image of it to your logo. You can then place controls on the Panel control itself (panels are container controls)
Hope that helps!
|
|
|
|
|
Hello!
This sample procedure extracts email addresses and adds to database. However, it is successfully adding the first address and creating empty records for the others. I decided to test the procedure with vb.net and took out adding the database section. It worked perfectly. So I would like to know what is causing not to add other emails except the first one.
Thank You
Sub AddEmails()
Dim GetEmails
Dim SrchKey
Dim xPos
Dim x1, x2
Dim xAddr
GetEmails = Request.Form("emails")
xPos = 1
x1=Instr(xpos,GetEmails,VbCrLf)
DO WHILE xpos <= len(Getemails)
x1=Instr(xPos,GetEmails,vbCrLf)
x2=Instr(xPos+1 ,GetEmails,vbCrLf)
If x1 = 0 or x2 = 0 Then Exit Do
If xPos = 1 Then
xAddr = Mid(GetEmails,1,x1-1)
Elseif xpos > 1 Then
xAddr = Mid(GetEmails, x1, x2 - x1)
End If
If len(xAddr) > 4 Then
'check here if email address is not exist in the database
SrchKey = "SELECT * FROM emails WHERE email="& "'" & xAddr & "';"
Call InitializeConnection()
Call Establish_Recording(SrchKey)
If ObjectRecord.RecordCount <= 0 Then
ObjectRecord.Close
ObjectConnection.Close
Set ObjectRecord = Nothing
Call InitializeConnection()
Call InitializeRecordSet("Emails")
'PROBLEM IS CAUSED BY THE FOLLOWING STATEMENTS
'IT IS ADDING THE FIRST ADDRESS BUT NOT THE OTHERS
ObjectRecord.AddNew
ObjectRecord("email") = xAddr
ObjectRecord("Accept") = True
ObjectRecord.update
ObjectRecord.Close
ObjectConnection.Close
Set ObjectRecord = Nothing
Else
ObjectConnection.Close
End If
xAddr = ""
xpos = x2
End If
LOOP
Response.Write ("Email have been added!")
Response.End
End Sub
|
|
|
|
|
This is just a guess. Wouldn't the ( xAddr="" ) set a blank each time the program made a loop?
|
|
|
|
|
Hello!
Thanks for your respond. Xaddr returns a value eact time in the loop. I have tested the code with vb.net. I think having connection to database or recordset inseide the loop is causing the problem even though connection is getting closed and object record set to nothing.
|
|
|
|
|
Hello, I want to know how to move a picturebox when the form is resized! I know that I want to put code in the Form1_Resize handler. But i dont know what to code in there! please help me
Thanks alot
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
The picture box will move automatically if you set the control to anchor.
eg. picturebox.anchor = Bottom
raj
|
|
|
|
|
Hello, I have a problem with this third party program. I installed the DevX program. Now this is the problem, that if a computer does not have this program installed than my program do not open because this third program isn't installed in that computer. How can i use my with the third program in it on another computer without installing the third program and that pc.
Can this thing happen pls?
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
Can anyone help me with with bringing up an IE window that prompts to first change the computername and second prompts for the username/password to join the domain?
|
|
|
|
|
Hi,
I have a question. How do you retrieve data from a textfile and have it displayed in VB. Net?
thanks for your help.
|
|
|
|
|
you can use IO.StreamReader(Server.MapPath("sms.txt")) to read ur text file.
or file open dialog box to open a file.
raj
|
|
|
|
|
Server.MapPath is only for a web environment. For a windows forms app you would need to know the whole path.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Hi,
Does anyone know how to format a floppy disc without using DOS or Windows format windows. I am looking for code to format a floppy.
|
|
|
|
|
|
This is driving me mad. I have been working on windows forms application for a while and suddenly straight out of the blue the visual style for the buttons stopped working. That is, they go back to looking like buttons in Windows 2000. All other controls that support visual styles seem to be working ok.
Does anyone know anything about how to fix this? The really wired thing is that when I tried to do a new form in the same project all works ok for a few compilations and then the buttons just go back to ugly mode again.
By the way I’m using .Net 1.1 and visual studio 2003.
Regards Johan
|
|
|
|
|
I just found the solution to the problem, here it is:
Just after calling Application.EnableVisualStyles() call Application.DoEvents()
Regards Johan
|
|
|
|
|
Hi,
I have a form where some selectioncriteria can be set. The form contains some comboboxes and also some datetimepicker's.
I want the following: when the form is loaded, I don't want any date to be shown in the datetimepicker's. Only when the user clicks the control, a date can be selected.
I tried:
dteFixDate.Value = Nothing , but this is not allowed.
dteFixDate.Text = "" , when the form is loaded, the current date shows in the control.
In fact, I want to use the values of the datetimepicker's in my SQL. So when no date is set (blank datetimepicker text), the date is not to be taken into account.
Does anyone know a way to do this. Or am I totally wrong in what I'm doing and is there an easier, cleaner way to obtain the result?
Thanks in advance,
|
|
|
|
|
I don't think you can set a DateTimePicker value to null/nothing/etc.
DateTimePickers have a .ShowCheckBox property which puts a checkbox next to the date. With the .Checked property set to false, the control is effectively disabled (but it still shows a date). As soon as the user selects a date, .Checked = True .
All you need to do is .ShowCheckBox = True and .Checked = False when you load the form. When you want to get the date just see if .Checked = True , indicating that the user has entered a date.
Hope that helps!
|
|
|
|
|
Hi ..
am very knew to VB
I have to design a software which can scan documents and enter its details in a Access Databse .
My problem is the scanning part ..
I want to know how can Twain_32.dll help or how to call this dll file ..
Although i have gone through many ocx files.. but they are paid ..
so i decided for going for the windows own twain utility
Any idea to to make use of it ..
Suraj jain
You mind is a weapon
Its onto you how to arm it .
|
|
|
|
|
Hi all
i have successfully managed to use dot net objects in perl, but i can't find out how to initialize a dot net object that takes an array as a parameter.
so basically the scenario would be:
--- PERL CODE ---
my($component) = Win32::OLE->new("componentTest.componentTestClass");
if (defined $component)
{
print "Created component object\n";
$component->initialize(@array);
# or even better a referenced array: \@array
my($result) = $component->main();
print "\nRESULT = " . $result;
}
else
{
print "COMPONENT NOT FOUND\n";
}
any ideas anyone?
il-gigi
|
|
|
|
|
the problem is
i have database that i stored it like 45145 this is number
when i use to pass this number into vb.net or from vb.net to console, some thing repeat at random time so that i can't define the problem where is when repeat it look like this number 445145
or 451145
please any one who can help send me
|
|
|
|
|
I would check that there is not some kind of interger overflow.
jhaga
It would be glorious to see mankind at leisure for once. It is nothing but work, work, work. I cannot easily buy a blank-book to write thoughts in; they are commonly ruled for dollars and cents. A[man], seeing me making a minute in the fields, took it for granted that I was calculating my wages. — business! - I think that there is nothing, not even crime, more opposed to poetry, to philosophy, ay, to life itself, than this incessant business.
Henry David Thoreau
|
|
|
|
|
Hi im using vb.net application to print data through dot matrix printer. what i need to do is once a printout is taken the paper should roll back to its starting position.
Is there any way in .net to handle such functionality of printer.
Im Using Epson Lx 300+ printer
----------
Pranjal
|
|
|
|